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

Strip RPATH from installed Ogre binaries. #688

Merged
merged 1 commit into from
May 13, 2021

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented May 12, 2021

Ogre installs RPATHs by default. Since rviz_ogre_vendor builds and installs Ogre within the build tree first, we wind up with binaries in the install tree that refer to the build tree e.g.:

$ readelf -d /opt/ros/rolling/opt/rviz_ogre_vendor/lib/OGRE/Plugin_OctreeZone.so

Dynamic section at offset 0xdd70 contains 31 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [Plugin_PCZSceneManager.so.1.12.1]
 0x0000000000000001 (NEEDED)             Shared library: [libOgreMain.so.1.12.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [Plugin_OctreeZone.so.1.12.1]
 0x000000000000001d (RUNPATH)            Library runpath: [/tmp/binarydeb/ros-rolling-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre_install/lib:/tmp/binarydeb/ros-rolling-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre_install/lib/OGRE]
...

This patch fixes this by stripping RPATHs entirely.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented May 12, 2021

CI up to rviz_ogre_vendor, rviz_rendering, rviz_rendering_tests, rviz_default_plugins, rviz_common:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@hidmic hidmic merged commit f810163 into ros2 May 13, 2021
@delete-merged-branch delete-merged-branch bot deleted the hidmic/strip-rviz_ogre_vendor-rpath branch May 13, 2021 19:47
@clalancette
Copy link
Contributor

I think this PR broke builds on the buildfarm: https://build.ros2.org/view/Rbin_uF64/job/Rbin_uF64__rviz_ogre_vendor__ubuntu_focal_amd64__binary/34/console has been failing since 8.6.0 was released into Rolling.

@hidmic
Copy link
Contributor Author

hidmic commented May 19, 2021

It seems dh_shlibdeps is now complaining about missing dependencies. This was the only package that had RPATHs, so I don't yet understand what's special about it.

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.

None yet

3 participants