MacOS: Project ERROR: failed to parse default search paths from compiler output
-
My MacOS decided to upgrade SDK from 13.3 to 14.0 without asking and broke my build.
qmake gives error :
"Project ERROR: failed to parse default search paths from compiler output
11:10:45: The process "/Users/xxxxxxx/Qt/6.5.2/macos/bin/qmake" exited with code 3.
Error while building/deploying project kponsoolss (kit: Qt 6.5.2 for macOS)
When executing step "qmake""qmake debug shows:
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: calling built-in isEmpty(QMAKE_DEFAULT_LIBDIRS)
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: test function returned true
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: OR
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: skipped test function "isEmpty"
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: AND
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: NOT
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: condition "integrity" is false
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: AND
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: evaluating test function "error"
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: calling built-in error("failed to parse default search paths from compiler output")
Project ERROR: failed to parse default search paths from compiler output
DEBUG 1: /Users/xxxxxxxxxxxx/Qt/6.5.2/macos/mkspecs/features/toolchain.prf:291: aborting block, function status: errorI'm running Ventura 13.5.2 on ARM Macbook.
Qt Creator 11.0.2
Based on Qt 6.4.3 (Clang 13.0 (Apple), arm64)
Built on Aug 12 2023 01:27:44I have tried:
- install Qt toolchain
- re-install whole Qt
- tested xcode (it builds fine)
I have no clue where to start fixing this issue.
-
Some xcode-test commands:
xcode-select -print-path
/Applications/Xcode.app/Contents/Developerxcrun -sdk macosx -find clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clangxcrun -sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -
Seems like it is a reported bug, fixed in Qt 6.5.3 or Qt 6.6
https://bugreports.qt.io/browse/QTBUG-117225So this issue can be solved by downloading toolchain.prf from the commit and replacing your current mkspecs/features/toolchain.prf. This works on my computer.
-
@jadamec Thank you for the response. I tried this but I'm still seeing the same error. which is strange because according to the git diff, the updated .prf file no longer contains the same text for the error. Perhaps something has been cached on my end. Do I need to do anything beyond replacing the qtbase/mkspecs/feature/toolchain.prf file with the updated/fixed version from the commit?