Fix Apple Silicon builds: header ordering, SIMD guard, and qd toolchain#36
Open
Mohit-Lakra wants to merge 1 commit into
Open
Fix Apple Silicon builds: header ordering, SIMD guard, and qd toolchain#36Mohit-Lakra wants to merge 1 commit into
Mohit-Lakra wants to merge 1 commit into
Conversation
Author
|
Hi @vissarion Thank you. |
Build bundled qd with the C++ toolchain Small format fix Forward RANLIB to qd make
|
hey @Mohit-Lakra Great fix for the arm64 build issue Just wondering are there any remaining AVX-specific code paths that might need guarding beyond the header include? |
Author
|
Hey @arnavsharma990 thanks! |
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.
Fixes #35
This PR fixes the Apple Silicon / ARM build breakages reported in #35.
lp_solve header ordering: we now make sure the bundled lp_solve headers are picked up before any system include dirs (via src/external/lpSolve/src/Makefile and the calling src/Makevars). This avoids cases where Homebrew’s lp_types.h is found first and LPSREAL ends up missing.
PackedCSparse intrinsics: src/external/PackedCSparse/FloatArray.h only pulls in <immintrin.h> when building for AVX2 on x86, so ARM builds stay on the existing scalar path and don’t trip over x86-only headers.
qd build/toolchain consistency: the vendored qd build now compiles .cc sources with $(CXX) and the C++ flags forwarded from src/Makevars (and runs ranlib on libqd.a where needed). This avoids ABI/arch mismatches when R uses different CC/CXX settings.
After these changes, R CMD INSTALL . completes successfully on Apple Silicon (tested with Homebrew R 4.5), and there’s no behavior change expected on x86.