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

ogre2: retain CMAKE_INSTALL_RPATH values #909

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

scpeters
Copy link
Member

🦟 Bug fix

Related to osrf/homebrew-simulation#2273

Summary

I have been adding some RPATH configuration to our homebrew formulae to fix issues with binaries installed to subfolders of lib and libexec on ARM processors, for which homebrew is installed to /opt/homebrew instead of /usr/local. In osrf/homebrew-simulation#2404 for example, an additional entry is added to CMAKE_INSTALL_RPATH to fix a gz-plugin standalone executable. The CMAKE_INSTALL_RPATH value provides a default value for the INSTALL_RPATH property of all targets. While testing these rpath fixes, but I ran into a problem with just the ogre2 library in gz-rendering not using the paths specified in CMAKE_INSTALL_RPATH. After looking at the gz-rendering source code, I see that the INSTALL_RPATH of the ogre2 target is set to a single path, which overrides the default values from CMAKE_INSTALL_RPATH.

This pull request sets the ogre2 target INSTALL_RPATH property to a copy of CMAKE_INSTALL_RPATH with OGRE_LIBRARY_DIRS appended, instead of just the latter path. This helps with packaging on macOS.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Sets the ogre2 target INSTALL_RPATH to a copy of
CMAKE_INSTALL_RPATH with OGRE_LIBRARY_DIRS
appended, instead of just the latter path. This
helps with packaging on macOS.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters requested a review from iche033 as a code owner September 15, 2023 07:25
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Sep 15, 2023
@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #909 (677a3ee) into gz-rendering8 (c108afb) will not change coverage.
The diff coverage is n/a.

❗ Current head 677a3ee differs from pull request most recent head 65ffacb. Consider uploading reports for the commit 65ffacb to get more accurate results

@@              Coverage Diff               @@
##           gz-rendering8     #909   +/-   ##
==============================================
  Coverage          75.18%   75.18%           
==============================================
  Files                177      177           
  Lines              16846    16846           
==============================================
  Hits               12665    12665           
  Misses              4181     4181           

@mjcarroll mjcarroll merged commit 8c1fd27 into gz-rendering8 Sep 15, 2023
7 checks passed
@mjcarroll mjcarroll deleted the scpeters/ogre2_append_rpath branch September 15, 2023 14:59
@scpeters
Copy link
Member Author

macOS CI failed and I was looking into it

@mjcarroll
Copy link
Contributor

Ah, sorry!

mjcarroll added a commit that referenced this pull request Sep 15, 2023
@scpeters
Copy link
Member Author

no worries; I think it may have been preexisting; I'm reviewing previous build failures

@scpeters
Copy link
Member Author

looks like it came from #897

scpeters added a commit that referenced this pull request Sep 15, 2023
Sets the ogre2 target INSTALL_RPATH to a copy of
CMAKE_INSTALL_RPATH with OGRE_LIBRARY_DIRS
appended, instead of just the latter path. This
helps with packaging on macOS.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters mentioned this pull request Sep 15, 2023
8 tasks
scpeters added a commit that referenced this pull request Sep 18, 2023
Sets the ogre2 target INSTALL_RPATH to a copy of
CMAKE_INSTALL_RPATH with OGRE_LIBRARY_DIRS
appended, instead of just the latter path. This
helps with packaging on macOS.

Signed-off-by: Steve Peters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants