icub-models icon indicating copy to clipboard operation
icub-models copied to clipboard

Make the C++ library relocatable when compiled as shared library via reloc-cpp

Open traversaro opened this issue 3 years ago • 2 comments

Until now, the C++ library of icub-models was not relocatable (i.e. "It can't be moved across filesystem and be used with no changes to itself or environment", see https://indico.cern.ch/event/848215/contributions/3591953/attachments/1923018/3181752/HSFPackagingRelocation.pdf). With this PR, the library when compiled as a shared library is relocatable, thanks to the use of https://github.com/ami-iit/reloc-cpp .

This is useful when the package is used in package managers that create the package with a given CMAKE_INSTALL_PREFIX and install it with a different prefix, such as conda, vcpkg or conan (see https://github.com/gazebosim/gz-sim/issues/626).

Fix in https://github.com/conda-forge/icub-models-feedstock/issues/18 . Tested in https://github.com/conda-forge/icub-models-feedstock/pull/25 .

traversaro avatar Nov 15 '22 10:11 traversaro

The patch is working fine (see https://github.com/conda-forge/icub-models-feedstock/pull/25), but the PR is not working as Ubuntu 18.04 with apt compilers/dependencies has incomplete C++17 support. So probably we can just wait for https://github.com/robotology/robotology-superbuild/issues/481 (that in turns is blocked on the availability of JetPack 5 [based on Ubuntu 20.04] for ConnectTech's Quark Carrier for NVIDIA® Jetson Xavier™ NX) and then merge this PR once breaking 18.04 support is not an issue anymore. Working to get this to work on Ubuntu 18.04 apt compilers at this moment seems just a waste of time at this point.

traversaro avatar Nov 15 '22 13:11 traversaro

cc @GiulioRomualdi , we can't merge for now but you may be interested anyhow in it.

traversaro avatar Dec 01 '22 20:12 traversaro

Probably we can finally do this: https://github.com/robotology/robotology-superbuild/issues/481 .

traversaro avatar Jun 16 '24 14:06 traversaro

Probably we can finally do this: robotology/robotology-superbuild#481 .

Given that, @GiulioRomualdi you originally requested yourself a review, do you want to do it?

traversaro avatar Jun 16 '24 14:06 traversaro