robotology / icub-models

Official URDF and SDF models of the iCub humanoid robot.
Creative Commons Attribution Share Alike 4.0 International
33 stars 34 forks source link

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

Closed traversaro closed 5 months ago

traversaro commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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

traversaro commented 5 months ago

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

traversaro commented 5 months ago

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?