rviz_ogre_vendor: fix macOS SDK detection in vendored OGRE - #1828
Open
AKooshan82 wants to merge 1 commit into
Open
rviz_ogre_vendor: fix macOS SDK detection in vendored OGRE#1828AKooshan82 wants to merge 1 commit into
AKooshan82 wants to merge 1 commit into
Conversation
Signed-off-by: Kooshan Fattah <kooshan@MacBook-Pro-3.local>
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building rviz_ogre_vendor on macOS fails on Apple Silicon. With Ninja I get:
and with Unix Makefiles I get a corrupted flags.make:
Both come from the same block in the pinned OGRE v1.12.10 CMakeLists.txt:
execute_process() doesn't run a shell, so
| head -n 1isn't a pipe. Thosefour tokens are passed to xcodebuild as arguments, and current Xcode rejects
-n:xcodebuild then prints its usage text, that lands in CMAKE_OSX_SYSROOT, and
the newlines end up embedded in flags.make. Older Xcode accepted
-nasdry-run and ignored the rest, which is presumably why this went unnoticed.
The else() branch is the Ninja path. Setting CMAKE_OSX_SYSROOT to the literal
string "macosx" only works with the Xcode generator; everything else gets
-isysroot macosx, no SDK, and no Availability.h.This patch replaces the block with a single xcrun call, which returns a clean
absolute path.
Upstream OGRE has already removed this block entirely (it's gone as of 14.6.0),
so this is only needed while rviz_ogre_vendor pins v1.12.10.
Tested on macOS 26.5.2 (arm64), Xcode 26.6.
rviz_ogre_vendor builds cleanly with this applied.