Xcode 9 update breaks Qt Mkspec for mac
-
After updating to Xcode 9 i get the following error when trying to compile my previously "flawless" code:
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk' [-Wmissing-sysroot]
followed by errors such as:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:86: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found #include_next <stdlib.h>
I think this is a general error for ALL mac users that update to xcode 9, so I thought it would be a good idea to start an issue so we can have the most general solution here.
Ugly Workaround: find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk and rename it
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdkI'm sure this is not how this should be handled generally, I assume the mkspec for macosx should be updated with the correct sdk version?
In the meantime since there will be many people looking for this issue after they have pressed "update" on Xcode, what is the best workaround until the next version of Qt (with new mkspecs) comes out?
-
Hi, thanks for the replies. The two workarounds we have here (the one i described and the one described by Bofei) seem to work, but are not a 'real' solution to the problem which is described better here :
https://bugreports.qt.io/browse/QTBUG-63323So the solution that works best for me (also referred to in the last comment on https://forum.qt.io/topic/83447/made-the-mistake-of-updating-xcode)
is to manually clean the .qmake.stash from the build directory. -
Have you tried what was suggested yesterday?
https://forum.qt.io/topic/83447/made-the-mistake-of-updating-xcode
-
Hi, thanks for the replies. The two workarounds we have here (the one i described and the one described by Bofei) seem to work, but are not a 'real' solution to the problem which is described better here :
https://bugreports.qt.io/browse/QTBUG-63323So the solution that works best for me (also referred to in the last comment on https://forum.qt.io/topic/83447/made-the-mistake-of-updating-xcode)
is to manually clean the .qmake.stash from the build directory.