Mac SDK completely wrong?
-
I'm running Big Sur. I put this in my .pro file:
CONFIG+=sdk_no_version_check QMAKE_MAC_SDK = macosx11.1
yet it spits out a MakeFile with this:
CFLAGS = -pipe -g $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -fobjc-arc -Wall -Wextra -fPIC $(DEFINES) CXXFLAGS = -pipe -stdlib=libc++ -g -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -fobjc-arc -Wall -Wextra -Wall -Wno-unused-parameter -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-source-encoding -Wno-null-dereference -Wno-nullability-completeness -Wno-missing-field-initializers -Wno-switch -Wno-for-loop-analysis -Wno-unused-variable -Wno-inconsistent-missing-override -Wno-overloaded-virtual -fPIC $(DEFINES) INCPATH = -I../../kJams -I. -I../../../../External/boost_1_69_0 -I../../../../External/Lame/lamesrc/include -I/Volumes/Developer/depot/CF/CFNetwork/include/CFNetwork -I/Volumes/Developer/depot/CFTest/source -I/Volumes/Developer/depot/CFTest/source/shared -I/Volumes/Developer/depot/CFTest/source/main -I../../../_source/Audio/Spooler -I../../../_source/Audio/Microphone -I../../../_source/Music -I../../../_source/Qt/main -I../../../_source/Qt/dialogs -I../../../_source/Qt/utils -I../../../_source/Qt/forms -I../../../_source/Resources -I../../../_source/Resources/menus -I../../../_source/Scripting -I../../../_source/Shared -I../../../_source/Sources -I../../../_source/sqlite -I../../../_source/Utils -I../../../_source/Utils/KDN_Crypt -I../../../_source/Utils/KDN_Crypt/ext -I../../../_source/Utils/KDN_Crypt/ext/ed25519 -I../../../_source/Windows -I../../../_source/Zip/Headers -I../../../_source/Zip/minizip -I../../../_source/Zip/Source -I../../../xplat/Resources/vers -I../../../xplat/Sources/kJams -I../../../xplat/Sources/Utils -I../../../../External/Python/win/Python27_x64/include -I../../../../Burner/source -I../../../../Producer/source -I../../../../PaddleServer/source -I../../../../External/hqx-1.0/src -I../../../../External/musicbrainz -I../../../../External/MP3_Tags/id3lib-3.8.3 -I../../../../External/MP3_Tags/id3lib-3.8.3/src -I../../../../External/MP3_Tags/id3lib-3.8.3/include -I../../../../External/MP3_Tags/id3lib-3.8.3/include/id3 -I../../../_source/SoundTouch/include -I../../../../External/Paddle/Mac/framework -I../../../_source/Mac -I/Users/davec/Qt/5.15.2/clang_64/lib/QtMultimediaWidgets.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtWidgets.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtMultimedia.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtGui.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtSql.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AGL.framework/Headers/ -I. -I/Users/davec/Qt/5.15.2/clang_64/mkspecs/macx-clang -F/Users/davec/Qt/5.15.2/clang_64/lib LFLAGS = -stdlib=libc++ -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -headerpad_max_install_names $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -Wl,-sdk_version -Wl,10.13 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/davec/Qt/5.15.2/clang_64/lib @echo compiling $< && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -g -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -fobjc-arc -Wall -Wextra -Wall -Wno-unused-parameter -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-source-encoding -Wno-null-dereference -Wno-nullability-completeness -Wno-missing-field-initializers -Wno-switch -Wno-for-loop-analysis -Wno-unused-variable -Wno-inconsistent-missing-override -Wno-overloaded-virtual -dM -E -o moc_predefs.h /Users/davec/Qt/5.15.2/clang_64/mkspecs/features/data/dummy.cpp
notice everywhere it says 10.13. where is that even coming from? i've searched my entire hard drive for the text "10.13" and i can't find it.
-
Perhaps you need to bump deployment target as well:
QMAKE_MACOSX_DEPLOYMENT_TARGET = 11.1
But in general I'm not sure is
QMAKE_MAC_SDK
is working at all, see the docs:QMAKE_MAC_SDK
This variable is used on macOS when building universal binaries.I think if you want to use a different SDK, you should select it through Xcode or
xcrun
https://doc.qt.io/qt-5/macos.html -
I'm running Big Sur. I put this in my .pro file:
CONFIG+=sdk_no_version_check QMAKE_MAC_SDK = macosx11.1
yet it spits out a MakeFile with this:
CFLAGS = -pipe -g $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -fobjc-arc -Wall -Wextra -fPIC $(DEFINES) CXXFLAGS = -pipe -stdlib=libc++ -g -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -fobjc-arc -Wall -Wextra -Wall -Wno-unused-parameter -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-source-encoding -Wno-null-dereference -Wno-nullability-completeness -Wno-missing-field-initializers -Wno-switch -Wno-for-loop-analysis -Wno-unused-variable -Wno-inconsistent-missing-override -Wno-overloaded-virtual -fPIC $(DEFINES) INCPATH = -I../../kJams -I. -I../../../../External/boost_1_69_0 -I../../../../External/Lame/lamesrc/include -I/Volumes/Developer/depot/CF/CFNetwork/include/CFNetwork -I/Volumes/Developer/depot/CFTest/source -I/Volumes/Developer/depot/CFTest/source/shared -I/Volumes/Developer/depot/CFTest/source/main -I../../../_source/Audio/Spooler -I../../../_source/Audio/Microphone -I../../../_source/Music -I../../../_source/Qt/main -I../../../_source/Qt/dialogs -I../../../_source/Qt/utils -I../../../_source/Qt/forms -I../../../_source/Resources -I../../../_source/Resources/menus -I../../../_source/Scripting -I../../../_source/Shared -I../../../_source/Sources -I../../../_source/sqlite -I../../../_source/Utils -I../../../_source/Utils/KDN_Crypt -I../../../_source/Utils/KDN_Crypt/ext -I../../../_source/Utils/KDN_Crypt/ext/ed25519 -I../../../_source/Windows -I../../../_source/Zip/Headers -I../../../_source/Zip/minizip -I../../../_source/Zip/Source -I../../../xplat/Resources/vers -I../../../xplat/Sources/kJams -I../../../xplat/Sources/Utils -I../../../../External/Python/win/Python27_x64/include -I../../../../Burner/source -I../../../../Producer/source -I../../../../PaddleServer/source -I../../../../External/hqx-1.0/src -I../../../../External/musicbrainz -I../../../../External/MP3_Tags/id3lib-3.8.3 -I../../../../External/MP3_Tags/id3lib-3.8.3/src -I../../../../External/MP3_Tags/id3lib-3.8.3/include -I../../../../External/MP3_Tags/id3lib-3.8.3/include/id3 -I../../../_source/SoundTouch/include -I../../../../External/Paddle/Mac/framework -I../../../_source/Mac -I/Users/davec/Qt/5.15.2/clang_64/lib/QtMultimediaWidgets.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtWidgets.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtMultimedia.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtGui.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtSql.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers -I/Users/davec/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AGL.framework/Headers/ -I. -I/Users/davec/Qt/5.15.2/clang_64/mkspecs/macx-clang -F/Users/davec/Qt/5.15.2/clang_64/lib LFLAGS = -stdlib=libc++ -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -headerpad_max_install_names $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -Wl,-sdk_version -Wl,10.13 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/davec/Qt/5.15.2/clang_64/lib @echo compiling $< && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -g -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -F/Volumes/Developer/depot/kJams/External/Paddle/Mac/framework/ -fobjc-arc -Wall -Wextra -Wall -Wno-unused-parameter -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-source-encoding -Wno-null-dereference -Wno-nullability-completeness -Wno-missing-field-initializers -Wno-switch -Wno-for-loop-analysis -Wno-unused-variable -Wno-inconsistent-missing-override -Wno-overloaded-virtual -dM -E -o moc_predefs.h /Users/davec/Qt/5.15.2/clang_64/mkspecs/features/data/dummy.cpp
notice everywhere it says 10.13. where is that even coming from? i've searched my entire hard drive for the text "10.13" and i can't find it.
@davecotter Don't you have an ancient version of Xcode somewhere? As this is how would I read it. Current version of Xcode to go along with BigSur is Version 12.5 (12E262)... What do you need QMAKE_MAC_SDK for anyway?
-
@sierdzio "deployment target" and "mac sdk" are unrelated. I need the app to be capable of launching on earlier versions so users of older computers, and older OSs, can still use the app. There is only one SDK installed in the xcode that comes with Big Sur, and that is 11.1, so there is no need to "select" it. The problem is that even explicitly telling qmake the SDK i want to use, it ignores that and decides on a seemingly random SDK to emit into the MakeFile.
@artwaw there is no other version of XCode on the computer, the only one currently available is 12.4. I attempted to force the SDK choice because without that it ALSO generates the MakeFile with 10.13 SDK which doesn't exist. So strange!
so, after the MakeFile is created, if i go in and edit it to be
MacOSX11.1.sdk
, then the app builds and runs just fine. Maybe I should install the slightly older Xcode, so i can get back to 10.15 ? But i don't want a workaround, i'm looking for WHY this is happening, and a permanent solution.any ideas?
-
saw this, and this. tried all suggestions, none helped.
the only thing that works around it is: run qmake, then before building edit the MakeFile, and replace "10.13" with "10.15" everywhere. (and have the 10.15 sdk installed).
then it builds just fine.
but WHY is it qmake emitting 10.13 to the MakeFile, when that SDK and number simply doesn't exist anywhere on my computer?
-dave
-
saw this, and this. tried all suggestions, none helped.
the only thing that works around it is: run qmake, then before building edit the MakeFile, and replace "10.13" with "10.15" everywhere. (and have the 10.15 sdk installed).
then it builds just fine.
but WHY is it qmake emitting 10.13 to the MakeFile, when that SDK and number simply doesn't exist anywhere on my computer?
-dave
@davecotter Have you tried removing build directories and removing (while QtCreator is closed) the .pro.user file from the project folder? I am not sure if this will help but maybe?
Also in your kit configurations - is everything alright with paths in there? Again - I am not sure but worth checking... -
I have tried deleting the build dir and the obj dir (like a "clean", but cleaner). I looked in the ".user" file and there is nothing in that text file indicating SDK or 10.xx anything, so i am skeptical that will help. I have a LOT of config for my project (6 build configs) so i don't really want to reconfigure all that? I DID attempt this on a fresh computer with a fresh config, so.. effectively yes i did try that. no dice.