[Interest] [OS X] qmake - "Could not resolve SDK path for 'macosx10.8'"

Till Oliver Knoll till.oliver.knoll at gmail.com
Thu Oct 2 20:11:38 CEST 2014


Hi,

This might be silly, but "qmake / Qt 5.3.2 stopped working for me" on OS
X 10.9.5 with latest Xcode 6.0.1 (the later was updated a couple of days
ago, IIRC).

Whenever I try to run qmake on a clean project - let's take the
"application example" - I now get the following error:

"Could not resolve SDK path for 'macosx10.8'"

And indeed, in my current Xcode installation there is no such SDK (anymore):

$> pwd
/Applications/Xcode.app

$> find . -name "*.sdk"
./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk
./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk
./Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk


Within Xcode itself I did not find any option to install/download an
older SDK (however I remember faintly that in earlier Xcodes there was
an option to download older platform SDKs, somewhere under "Preferences
/ Downloads". Now there is not even the option to download the "Command
Line Tools", which I am pretty sure those were there - ok, current Qt
installations properly find all necessary tools under
/Applications/Xcode, so that is no deal-breaker anymore, but still...).

In fact, Apple recommends (in some Help file) to always build against
the latest SDK (the "Deployment Target" however can be set to something
lower -> keywords: weak linking etc.), and it seems that with the latest
Xcode Apple seems to enforce that practise by not shipping any older
SDKs anymore (?).


I guess the above error message comes from qmake itself while trying to
generate the .qmake.stash file. I saw that when the later file was
present (in existing projects of mine from previous qmake runs) qmake
would run through and generate Makefiles, but then during build I would
again first a warning that "SDK 10.8 could not be found" and then
follow-up #include errors, such as "NSUrl.h not found" etc.



Google did not really reveal anything useful at a quick glance, except
that it is possible to set the path to the SDK manually in the *.pro
file etc. (1) - is that really what people are doing? Or is everyone
compiling their Qt installation from source (mine is a stock binary
download)? Or is everyone else still on OS X 10.8.5 with some older
Xcode release?


Or shall I just wait until Qt 5.4 is available (which might or might not
have been "build against the latest 10.9 SDK)?


Cheers, Oliver



(1) For instance here:

http://stackoverflow.com/questions/13269758/qmake-projects-and-mac-os-x-sdks





More information about the Interest mailing list