Fix PX4 toolchain build on macOS (Intel & Apple Silicon / Rosetta) by updating formula flags#100
Open
pawelpetruch wants to merge 2 commits intoPX4:masterfrom
Open
Fix PX4 toolchain build on macOS (Intel & Apple Silicon / Rosetta) by updating formula flags#100pawelpetruch wants to merge 2 commits intoPX4:masterfrom
pawelpetruch wants to merge 2 commits intoPX4:masterfrom
Conversation
Author
|
Related to: #98 |
Contributor
|
Is this not working for you without Rosetta? Or are you just trying to add one more option? |
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.
This PR updates several PX4 Homebrew formulas (asio@1.10.8, fastcdr, foonathan-memory, fastdds) to improve compatibility with modern macOS toolchains, especially on Apple Silicon running under Rosetta 2.
Key changes
Consistent C++ standard
Enforces -DCMAKE_CXX_STANDARD=14 (or higher) and disables compiler extensions for all formulas.
macOS-specific safety flags
On macOS, explicitly sets:
stdlib=libc++isysroot $(xcrun --sdk macosx --show-sdk-path)I$(SDK)/usr/include/c++/v1DCMAKE_OSX_ARCHITECTURES=x86_64 (ensures Rosetta builds work correctly)Boost / Asio fix
Pre-seeds ac_cv_header_boost_noncopyable_hpp=yes in asio@1.10.8 to bypass fragile header detection on macOS.
CMake policies
Adds
-DCMAKE_POLICY_VERSION_MINIMUM=3.5consistently to silence compatibility warnings.Disabled unnecessary components
For fastdds, disables tests, examples, and tools to speed up builds and reduce dependencies.
Why this is needed
Without these changes:
Tested on
Verified working toolchain install via:
HOMEBREW_NO_AUTO_UPDATE=1 brew install px4/px4/px4-dev