Opened 21 months ago
Last modified 2 days ago
#67104 assigned defect
qt5-qtwebengine @5.15.12: Project ERROR: Could not resolve SDK Path for 'macosx10.15' using --show-sdk-path
Reported by: | Gandoon (Erik Hedlund) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | catalina | Cc: | mike142wood, Schamschula (Marius Schamschula), cooljeanius (Eric Gallager) |
Port: | qt5-qtwebengine |
Description
Good afternoon,
This is mainly for information, as I have found a solution to the problem, and I am not aware if there is anything that can be done from MacPorts side to remedy this issue.
I am for various backwards compatibility reasons stuck at MacOS 10.15.7 on one machine. And I need to keep an as up-to-date version as possible of MacPorts on it. And once again the ever problematic qt5-qtwebengine gave me a headache.
If you for whatever reason use the newer Xcode 12 (latest version for my system is 12.4), you will probably have the 11.1 SDK installed as well as the 10.14 and 10.15 ones. This means that there are potential issues due to the command xcrun
that is used to dig out paths during the qt5-qtwebengine build not pointing to a valid copy of the SDK you need. During the process the command xcrun --sdk macosx --show-sdk-path
is invoked and it will result in a path that probably will look like /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
. However, if you like me have the "latest and greatest" Xcode installed, it is very likely that this path unfortunately will not contain that SDK but probably look something like:
drwxr-xr-x - youruser 30 Nov 2020 DriverKit20.2.sdk drwxr-xr-x - youruser 30 Nov 2020 MacOSX.sdk lrwxr-xr-x 10 youruser 28 Apr 2021 MacOSX11.1.sdk -> MacOSX.sdk
This will cause the qt5-qtwebengine build to fail with an error: :info:configure Project ERROR: Could not resolve SDK Path for 'macosx10.15' using --show-sdk-path
early on. And unfortunately, it is not enough to just make a softlink, MacOSX10.15.sdk -> MacOSX.sdk
, as this will also fail. But there is a fairly simple solution that I used to solve it in the end, that might work for you as well. There is a repository of SDKs at /Library/Developer/CommandLineTools/SDKs
, including the one needed (10.15). So the (possibly slightly dirty) solution I used to solve this issue is to instead make a softlink to that repository thus:
$ ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk $ ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs drwxr-xr-x - youruser 30 Nov 2020 DriverKit20.2.sdk drwxr-xr-x - youruser 30 Nov 2020 MacOSX.sdk lrwxr-xr-x 56 youruser 15 Mar 12:51 MacOSX10.15.sdk -> /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk lrwxr-xr-x 10 youruser 28 Apr 2021 MacOSX11.1.sdk -> MacOSX.sdk
This allows the build scripts use of xcrun
to find what it needs. If you have similar problems on earlier systems, adjust paths accordingly. First test the xcrun --sdk macosx --show-sdk-path
to see what it says, and check that path if is valid, and if not, you can try to follow this recipe. YMMV!
As this by now is a quite old OS release, I do not expect everything to be working flawlessly in perpetuity, but if I can help someone with some patchwork here and there to keep things going for as long as possible, I am happy.
Attachments (1)
Change History (6)
Changed 21 months ago by Gandoon (Erik Hedlund)
Attachment: | qt5-webengine-error_log.txt added |
---|
comment:1 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to MarcusCalhoun-Lopez |
---|---|
Status: | new → assigned |
Summary: | If qt5-qtwebengine fails to build on MacOS 10.15 (and possibly older) with a "too new" Xcode installed, try this → qt5-qtwebengine @5.15.12: Project ERROR: Could not resolve SDK Path for 'macosx10.15' using --show-sdk-path |
comment:2 Changed 19 months ago by mike142wood
Cc: | mike142wood added |
---|
comment:3 Changed 10 months ago by Schamschula (Marius Schamschula)
Cc: | Schamschula added |
---|
comment:4 Changed 10 months ago by Schamschula (Marius Schamschula)
I ran into the same issue with
macOS 13.6.4 22G513 arm64 Xcode 15.2 15C500b
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.16-lts" && /opt/local/libexec/qt5/bin/qmake PREFIX=/opt/local QMAKE_LINK=/usr/bin/clang++ -spec macx-clang -- -webengine-kerberos -webengine-proprietary-codecs -system-webengine-icu -system-webengine-ffmpeg -feature-webengine-system-gn Project ERROR: Could not resolve SDK Path for 'macosx13.3' using --show-sdk-path Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.16-lts" && /opt/local/libexec/qt5/bin/qmake PREFIX=/opt/local QMAKE_LINK=/usr/bin/clang++ -spec macx-clang -- -webengine-kerberos -webengine-proprietary-codecs -system-webengine-icu -system-webengine-ffmpeg -feature-webengine-system-gn Exit code: 3
An updated version of the link got me past the error:
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
comment:5 Changed 2 days ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
The log with the error from before the described manual steps solved the issue.