问题
On macOS Mojave with Xcode 11.3, I have an Autotool based thirdparty lib builds just fine when running my build script in Terminal, but fails when run in Xcode Run Script
step as ./"$BuildScript"
Showing All Messages
/configure:1:1: C preprocessor "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cpp" fails sanity check
This seems to correspond to my CPP variable in the script
export CPP=$(xcrun --find --sdk "${SDK}" cpp)
But I can't figure out why running the script AS IS in Terminal does not have the issue.
Does it have anything to do with Xcode's environment variables? How should I fix this?
I've tried to switch to different compiler executables to no avail.
来源:https://stackoverflow.com/questions/59350668/c-preprocessor-applications-xcode-app-contents-developer-toolchains-xcodedefau