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

Do not generate non-relocatable files in yarp_configure_plugins_installation #2445

Closed
traversaro opened this issue Dec 23, 2020 · 1 comment · Fixed by #3069
Closed

Do not generate non-relocatable files in yarp_configure_plugins_installation #2445

traversaro opened this issue Dec 23, 2020 · 1 comment · Fixed by #3069
Labels
Component: CMake Component: Library - YARP_os Issue Type: Bug Involves some intervention from a system administrator

Comments

@traversaro
Copy link
Member

Is your feature request related to a problem? Please describe.
The yarp_configure_plugins_installation macro (that is also called in yarp_configure_external_installation) installs a non-relocatable configuration file to correctly find devices installed by downstream packages, see:

This is problematic as it make YARP and downstream packages that depend on YARP and use yarp_configure_plugins_installation or yarp_configure_external_installation to install YARP devices non-relocatable packages, i.e. packages that will not work if you change the installation directory path after the installation, or if installed via DESTDIR .

Describe the solution you'd like
A possible solution is to modify the .ini generation logic in https://github.com/robotology/yarp/blob/v3.4.1/cmake/YarpInstallationHelpers.cmake#L77 to create a relative_path argument that specifies the relative location of the plugins directory, instead of specifying the absolute path with path.
Furthermore, it would be necessary to modify the C++ logic that reads this files in https://github.com/robotology/yarp/blob/v3.4.1/src/libYARP_os/src/yarp/os/YarpPlugin.cpp#L96 to interpreter correctly this new relative_path argument.

Describe alternatives you've considered
A possible alternative is to have some custom logic in the packaging, such as done in https://github.com/robotology/icub-packaging/blob/5768d6c1768a26c583ecb6866b67494fe37841c5/linux/build-iCub-packages.sh#L404 or how conda does automatically (https://docs.conda.io/projects/conda-build/en/latest/resources/make-relocatable.html), but this solution need to be ad-hoc for each packaging system, and do not work for example if you want to just distribute installation prefixes simply as .zip directories.

@drdanz
Copy link
Member

drdanz commented Feb 2, 2021

Partially related: #522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CMake Component: Library - YARP_os Issue Type: Bug Involves some intervention from a system administrator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants