Do not generate non-relocatable files in yarp_configure_plugins_installation #2445
Labels
Component: CMake
Component: Library - YARP_os
Issue Type: Bug
Involves some intervention from a system administrator
Is your feature request related to a problem? Please describe.
The
yarp_configure_plugins_installation
macro (that is also called inyarp_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
oryarp_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 viaDESTDIR
.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 arelative_path
argument that specifies the relative location of the plugins directory, instead of specifying the absolute path withpath
.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.
The text was updated successfully, but these errors were encountered: