Opened 7 years ago

Closed 6 years ago

Last modified 3 years ago

#54044 closed defect (fixed)

Could not resolve SDK Path for 'macosx10.11'

Reported by: mouse07410 (Mouse) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mascguy (Christopher Nielsen)
Port: qt5-qtbase

Description

Trying to create a new (simple, quick) project using Qt5 5.7.1_1, keep getting this error: Could not resolve SDK Path for 'macosx10.11'

Digging revealed that file /opt/local/libexec/qt5/mkspecs/qdevice.pri contained the offending line that referred to macosx10.11:

!host_build:QMAKE_MAC_SDK = macosx10.11
GCC_MACHINE_DUMP = x86_64-apple-darwin15.6.0

Deleting that line (and manually adding QMAKE_MAC_SDK = macosx10.12 to /opt/local/libexec/qt5/mkspecs/common/macx.conf and /opt/local/libexec/qt5/mkspecs/macx-clang/qmake.conf - perhaps it was an overkill?) remedied the situation.

Change History (7)

comment:1 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… removed
Owner: set to MarcusCalhoun-Lopez
Status: newaccepted

comment:2 Changed 7 years ago by gorticus (Jason Mitchell)

I see the same thing when using qt5-qtcreator@4.2.1_0 and same qt5-qtbase on macosx10.11.6. Not quite sure how to address.

comment:3 Changed 7 years ago by mouse07410 (Mouse)

The best solution IMHO would be to not lock on a specific SDK version, but query Xcode itself to find out what's available on a given machine. For example, you can use something like (or figure how to do that in shell script or whatever):

sdkparam=`xcodebuild -showsdks | awk '/^$/{p=0};p; /macOS SDKs:/{p=1}' | tail -1 | cut -f3`
sdkpath=`xcodebuild -version $sdkparam Path`

To just get the SDK path, xcrun --show-sdk-path works fine.

Last edited 7 years ago by mouse07410 (Mouse) (previous) (diff)

comment:4 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

This is a symptom of the same problem as #55195.
Qt was built using a version of Xcode that had the 10.11 SDK, which was then recorded in ${prefix}/libexec/qt5/mkspecs/qdevice.pri.
Later, Xcode was upgraded to a version that no longer possessed the SDK, but qmake continues to look for it.

comment:5 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: acceptedclosed

In adf50839857db7865896f10a46e9f24d5b95f699/macports-ports:

qt5*: do not record SDK version in config file

Upgrading Xcode sometimes removes SDKs.
If the SDK used to build Qt disappears, Qt still looks for
the old, nonexistent, SDK.

Fixes #54044
Fixes #55195

comment:6 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)

This is occurring again, this time for LibreCAD. Should I create a new ticket, or re-open this one?

DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_cad_LibreCAD/LibreCAD/work/LibreCAD-2.1.3" && /opt/local/libexec/qt5/bin/qmake PREFIX=/opt/local CONFIG+="build_muparser" -spec macx-clang 
Project ERROR: Could not resolve SDK Path for 'macosx10.11' using --show-sdk-path
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_cad_LibreCAD/LibreCAD/work/LibreCAD-2.1.3" && /opt/local/libexec/qt5/bin/qmake PREFIX=/opt/local CONFIG+="build_muparser" -spec macx-clang 
Exit code: 3

https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/143618/steps/install-port/logs/stdio

Note: See TracTickets for help on using tickets.