Opened 3 years ago

Last modified 3 years ago

#63061 assigned defect

qt5: dependent ports fail to build on 10.11 buildbot: could not resolve SDK Path for 'macosx10.11'

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

Description (last modified by mascguy (Christopher Nielsen))

Among other ports, LibreCAD and LibreCAD-devel both fail to build on our macOS 10.11 buildbot, with the following qt5-related error:

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

One example:

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

This is similar to what we've seen (and fixed) before, but it's not clear why it's happening again:

issue:54044 - Could not resolve SDK Path for 'macosx10.11'

Change History (9)

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

Description: modified (diff)

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

Description: modified (diff)

comment:3 Changed 3 years ago by kencu (Ken)

The Xcode installation on 10.11 no longer includes an SDK called MacOSX10.11.sdk:

$ ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
MacOSX.sdk	MacOSX10.12.sdk

So you have to use the MacOSX10.12.sdk on El Capitan:

$ xcodebuild -version -sdk macosx10.11 Path
xcodebuild: error: SDK "macosx10.11" cannot be located.

$ xcodebuild -version -sdk macosx10.12 Path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk

or just the raw, unversioned one is likely best:

$ xcodebuild -version -sdk macosx Path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk

Previously, the incorrect SDK path had been baked into qttools, but this was fixed years ago:

$ cat /opt/local/libexec/qt5/mkspecs/qdevice.pri
QMAKE_MAC_SDK = macosx
GCC_MACHINE_DUMP = 

so I am not sure at this second what is calling for -sdk macosx10.11 exactly. Something in the Portfile or something in LibreCAD itself would be my guess.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 3 years ago by kencu (Ken)

I think not in the Portfile and not in LibreCAD itself.

In this file:

/opt/local/libexec/qt5/mkspecs/features/mac/sdk.prf

things don't seem to parse out as they should. You can get more information by adding "-d" to the qmake command and running it manually.

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

Good info, thanks Ken!

Interestingly enough, I just fired up my macOS 10.11 VM, and tried installing LibreCAD: Was expecting it to immediately fail with this error, but of course, it succeeded. (Usually I have the opposite problem, where things build successfully on our buildbots, but fail locally. Lol)

Of note, my 10.11 VM has Xcode 7.3.1 installed (for both the IDE, and CLT). Whereas our 10.11 buildbot has Xcode 8.2.1.

Per the Xcode Releases page (https://xcodereleases.com), it looks like 8.2.1 includes the 10.12 SDK? I thought we normally prefer to use an Xcode version bundled with an SDK matching the OS...?

Version 0, edited 3 years ago by mascguy (Christopher Nielsen) (next)

comment:6 Changed 3 years ago by kencu (Ken)

Yeah, if you have MacOSX10.11.sdk, then -macosx10.11 will find it and not fail.

MacPorts does in general like to have the SDK that matches the OS. Some Xcode versions supply the next one in line.

But to be noted that everyone updates their systems to the latest Xcode available, as that is what the Apple Store reminds you to do over and over and over. Expecting people to hang back is not too realistic.

As the buildbot is failing, I presume Ryan has done what everyone else has done and upgrade the Xcode on the 10.11 buildbot to the one that has the 10.12 SDK.

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

Marcus, I'm guessing this is also causing other qt5-dependent ports to fail on 10.11.

Any thoughts on a potential fix?

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

Description: modified (diff)
Summary: qt5: librecad build fails: could not resolve SDK Path for 'macosx10.11'qt5: dependent ports fail to build on 10.11 buildbot: could not resolve SDK Path for 'macosx10.11'

comment:9 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Presumably related to or caused by #61736.

Note: See TracTickets for help on using tickets.