Open pozix604 opened 5 years ago
Does the xcrun --sdk macosx --show-sdk-path
work before Mojave as well ?
If yes, how far back ?
Would it make sense to simply try it when SDKROOT is missing ?
Some more information. Your error stack contains
expected version number but got ""
while executing
"package vcompare $ver 10.4"
indicated that the variable ver
contains the empty string.
The code I am looking at however (https://github.com/andreas-kupries/critcl/blob/master/lib/critcl/Config#L97) checks for the empty string and prevent the vcompare
from being run in that case.
Ah! That was issue #84, and the change is not in a release yet. What happens on your system when you put that change in ?
Right now I suspect that while the stack trace goes away SDKROOT still has to be set manually to make it work. Not sure, I do not have a Mojave system to test with.
I did not have this issue with Mac OS 14.6 but I have been tinkering with the Config in order to use Apple Silicon (arm64) compilation.
Does the xcrun --sdk macosx --show-sdk-path work before Mojave as well ? If yes, how far back ?
This Technical Note (TN2339) from Apple says that xcrun
has been available since 10.9:
https://developer.apple.com/library/archive/technotes/tn2339/_index.html
The 10.9 release was codenamed Mavericks and released in 2013.
Would it make sense to simply try it when SDKROOT is missing ?
Yes it looks that way.
The build of Critcl using the standard instructions fails on macOS 10.14. It turns out the reason is that the detection of the SDK path does not work on new versions of macOS and Xcode. Defining the SDKROOT environment variable fixes the problem but the code should be fixed to automatically detect the SDK path.
Here is the failure:
Here is the new way to identify the SDK path:
And here it is working after defining the SDKROOT variable. Ideally, the build script would automatically run the above command, get the right path and build correctly.