C preprocessor “/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cpp” fails sanity check

两盒软妹~` 提交于 2019-12-24 04:49:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!