Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREO2URDF – How we deploy the plugin #15

Closed
Nicogene opened this issue Apr 6, 2023 · 4 comments
Closed

CREO2URDF – How we deploy the plugin #15

Nicogene opened this issue Apr 6, 2023 · 4 comments
Labels
domain-software Related to Software request-discussion Request for discussion team-fix Related to Team Fix

Comments

@Nicogene
Copy link
Member

Nicogene commented Apr 6, 2023

This discussion started via chat between @traversaro and me, but I think it is better to track it in a dedicated issue.

As reported here @mfussi66 and I faced some issues trying to load the creo2urdf.dll when it links libraries that are not the system or creo ones.

As proposed by @traversaro, in order to make easier the fruition of the plugin in the future, we might think to compile everything static in order to deliver something selfcontained.

This is something more in line with the philosophy of Windows, but we have to see if we can do without unlocking the plugin

cc @pattacini

@Nicogene Nicogene added domain-software Related to Software request-discussion Request for discussion team-fix Related to Team Fix labels Apr 6, 2023
@traversaro
Copy link
Member

Something that it is important to know is that if you want to do this probably we need to compile the library as static but still with the /MD option, we did something similar in the danieli joint lab for some deployments, see https://github.com/iit-danieli-joint-lab/idjl-software/issues/2421 .

@traversaro
Copy link
Member

To help on #13 (comment), let me write down how to proceed to do:

Try with idyntree compiled all static

To do so, we need to:

  • Download vcpkg (https://github.com/microsoft/vcpkg)
  • Bootstrap vcpkg
  • Run [path to vcpkg]/vcpkg install --triplet x64-windows-static-md eigen3 libxml2 assimp and wait for the compilation to ends successfully
  • Compile idyntree from source following the instructions in https://github.com/robotology/idyntree/blob/master/doc/build-from-source.md, remembering to pass -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static-md and -DBUILD_SHARED_LIBS:BOOL=OFF to ensure that iDynTree is compiled as static. Furthermore, make sure that indeed iDynTree is compiled with MD (that should be the default)
    • (the previous step could be avoided if we packaged idyntree directly in vcpkg)
  • At this point, install iDynTree and add pass -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static-md to the creo2urdf compilation, remembering also to pass the iDynTree's installaton location via CMAKE_PREFIX_PATH.

After doing so, the creo2urdf should link statically iDynTree and libxml2, reducing all possible interferences.

@Nicogene
Copy link
Member Author

Right now the only way to use it is linking everything statically, as also is reported in the readme, I think we can close it

@traversaro
Copy link
Member

I think eventually we should think of producing/hosting the compiled version of the .dll in the release (I guess asking people that use Creo do use CMake/Visual Studio/vcpkg would be a great source of possible problems), but probably we can track this in another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain-software Related to Software request-discussion Request for discussion team-fix Related to Team Fix
Projects
None yet
Development

No branches or pull requests

2 participants