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

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

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Nov 15, 2022

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 gazebosim/gz-sim#626).

Fix in conda-forge/icub-models-feedstock#18 .
Tested in conda-forge/icub-models-feedstock#25 .

@traversaro traversaro changed the title Make the C++ relocatable when compiled as shared library via reloc-cpp Make the C++ library relocatable when compiled as shared library via reloc-cpp Nov 15, 2022
@traversaro
Copy link
Member Author

The patch is working fine (see conda-forge/icub-models-feedstock#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 robotology/robotology-superbuild#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
Copy link
Member Author

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

@GiulioRomualdi GiulioRomualdi self-requested a review December 6, 2022 13:48
@traversaro
Copy link
Member Author

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

@traversaro
Copy link
Member Author

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 traversaro merged commit 5633130 into master Jun 25, 2024
@traversaro traversaro deleted the reloc branch June 25, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants