MacOS: fix linker flags for SHLIB feature test#6283
Merged
MichaelChirico merged 2 commits intoRdatatable:masterfrom Jul 17, 2024
jeroen:master
Merged
MacOS: fix linker flags for SHLIB feature test#6283MichaelChirico merged 2 commits intoRdatatable:masterfrom jeroen:master
MichaelChirico merged 2 commits intoRdatatable:masterfrom
jeroen:master
Conversation
Member
|
Thanks for the explanation & fix. Looks OK to me, but I'll let @kevinushey chime in as the original author. |
MichaelChirico
approved these changes
Jul 17, 2024
Member
|
Thanks both! |
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.
Amends #6034 by @kevinushey.
The problem is that
R CMD SHLIBactually ignores$LDFLAGS; you can easily test this with--dry-run:Above is the
test-omp.cfrom the configure script, and then run it with:LDFLAGS="-lomp" R CMD SHLIB --dry-run test-omp.cYou can see there is no
-lompin the output at all. The reason why the feature test succeeds anyway on most systems is that R defaults to-undefined dynamic_lookupso it ignores missing libraries.However, on r-universe we cross compile without
-undefined dynamic_lookupand therefore the feature test fails. If we set-lompin$PKG_LIBSinstead the feature test works.PKG_LIBS="-lomp" R CMD SHLIB --dry-run test-omp.cI confirmed this fixes the cross compile as well.