Opened 18 months ago
Last modified 6 months ago
#67314 assigned defect
R: do we need sysroot to be detected on systems without xcrun?
Reported by: | barracuda156 | Owned by: | kjellpk (Kjell Konis) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | tiger, leopard, snowleopard | Cc: | i0ntempest |
Port: | R |
Description
When installing R packages that require compilation, I am getting this with R 4.3.0:
** libs using C compiler: ‘gcc-mp-12 (MacPorts gcc12 12.2.0_2) 12.2.0’ using C++ compiler: ‘g++-mp-12 (MacPorts gcc12 12.2.0_2) 12.2.0’ Warning in system2("xcrun", "--show-sdk-path", TRUE, TRUE) : running command ''xcrun' --show-sdk-path 2>&1' had status 64 using SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
And then sysroot is not passed. However, build succeeds and tests pass, so I am not sure if this is in need of fixing or not. Thoughts?
Change History (4)
comment:1 follow-up: 2 Changed 18 months ago by kencu (Ken)
comment:2 Changed 18 months ago by barracuda156
Replying to kencu:
that should be removed from the R ports.
We want all MacPorts software to build against the SDK we have selected in MacPorts, not against something randomly found by xcrun.
MacPorts base sets SDKROOT to the proper SDK to be used, and gcc and clang obey that unless they are overridden on the command line with an
-isysroot=/path/to/SDK
.Passing -isysroot is unnecessary, but if it is going to be passed, it should be to the SDK that MacPorts has requested be used. That might require patching.
Thank you.
I am not really sure where this creeps in from though. I did not set it in R
PR, that is sure.
comment:3 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)
Something in the build system is evidently running xcrun --show-sdk-path
. That doesn't work on old OS versions like Snow Leopard however:
$ xcrun --show-sdk-path xcrun: error: unrecognized option: --show-sdk-path usage: xcrun [-verbose] [-no-cache] [-kill-cache] [-sdk <sdkroot>] [-log] [-run] <utility> [utility argument(s) ...] xcrun [-verbose] [-no-cache] [-kill-cache] [-sdk <sdkroot>] -find <utility> <tool> [tool arguments ...] $ echo $? 64
And as Ken said we would like for the build system not to do that.
that should be removed from the R ports.
We want all MacPorts software to build against the SDK we have selected in MacPorts, not against something randomly found by xcrun.
MacPorts base sets SDKROOT to the proper SDK to be used, and gcc and clang obey that unless they are overridden on the command line with an
-isysroot=/path/to/SDK
.Passing -isysroot is unnecessary, but if it is going to be passed, it should be to the SDK that MacPorts has requested be used. That might require patching.