Opened 18 months ago

Last modified 6 months ago

#58760 assigned defect

py37-pyqt5: Failed to determine the detail of your Qt installation

Reported by: mfacorcoran Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: carlofdtam (Carlo Tambuatco), mfacorcoran, randawg, tehcog (tehcog), NicosPavlov, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), marcbn, michaelld (Michael Dickens)
Port: py-pyqt5

Description

doing an upgrade of py37-pyqt5 fails - the last part of the screen output is:

arning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Error: Failed to configure py37-pyqt5: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_github.com_macports_macports-ports_python_py-pyqt5/py37-pyqt5/main.log for details.

Attachments (1)

main.log (64.1 KB) - added by mfacorcoran 18 months ago.
log file from build of py37-pyqt5

Download all attachments as: .zip

Change History (34)

Changed 18 months ago by mfacorcoran

Attachment: main.log added

log file from build of py37-pyqt5

comment:1 Changed 18 months ago by reneeotten (Renee Otten)

from the log it appears that you don't have Xcode installed - any reason for that?

:warn:clean Xcode does not appear to be installed; most ports will likely fail to build.

If possible, please follow the guide and try again.

comment:2 Changed 18 months ago by reneeotten (Renee Otten)

Owner: set to mamoll
Port: py-pyqt5 added
Status: newassigned

comment:3 Changed 18 months ago by mfacorcoran

I have the command line tools installed but deleted the Xcode app since it takes up a lot of disk space (10 GB or so). Despite the warning about Xcode not being installed I've never had a problem with installing ports this way.

comment:4 Changed 8 months ago by mf2k (Frank Schima)

Owner: mamoll deleted

comment:5 Changed 8 months ago by mf2k (Frank Schima)

Error appears to be:

:debug:configure system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_python_py-pyqt5/py37-pyqt5/work/PyQt5_gpl-5.12.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 configure.py -q /opt/local/libexec/qt5/bin/qmake --verbose --confirm-license --sip=/opt/local/bin/sip-3.7 --dbus=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/dbus-1.0 --designer-plugindir=/opt/local/libexec/qt5/plugins/designer/Py37Qt5 --qml-plugindir=/opt/local/libexec/qt5/plugins/Py37Qt5 --no-qsci-api --disable=QtWebKit --disable=QtWebKitWidgets --no-dist-info --spec=macx-clang
:info:configure Error: Failed to determine the detail of your Qt installation. Try again using
:info:configure the --verbose flag to see more detail about the problem.
:info:configure Querying qmake about your Qt installation...
:info:configure Determining the details of your Qt installation...
:info:configure /opt/local/libexec/qt5/bin/qmake -o cfgtest_QtCore.mk cfgtest_QtCore.pro
:info:configure Project ERROR: Could not resolve SDK Path for 'macosx10.14' using --show-sdk-path
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_python_py-pyqt5/py37-pyqt5/work/PyQt5_gpl-5.12.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 configure.py -q /opt/local/libexec/qt5/bin/qmake --verbose --confirm-license --sip=/opt/local/bin/sip-3.7 --dbus=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/dbus-1.0 --designer-plugindir=/opt/local/libexec/qt5/plugins/designer/Py37Qt5 --qml-plugindir=/opt/local/libexec/qt5/plugins/Py37Qt5 --no-qsci-api --disable=QtWebKit --disable=QtWebKitWidgets --no-dist-info --spec=macx-clang

comment:6 Changed 8 months ago by mf2k (Frank Schima)

Summary: py37-pyqt5 fails to buildpy37-pyqt5: Failed to determine the detail of your Qt installation

comment:7 Changed 8 months ago by mf2k (Frank Schima)

Cc: carlofdtam mfacorcoran added

Cc maintainers of duplicates: #59509 and #59119.

comment:8 Changed 8 months ago by randawg

Cc: randawg added

comment:9 Changed 8 months ago by tehcog (tehcog)

Cc: tehcog added

comment:10 Changed 8 months ago by NicosPavlov

Cc: NicosPavlov added

comment:11 Changed 7 months ago by NicosPavlov

I am running into the same error, and I do have the command line tools installed, so I have been suspecting that another issue might be the cause.

As a quick test, I copied after failure the pyqt5 folder locally (to ensure having the same qmake cache), and ran the configuration command that fails

/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 configure.py [...] 

from the Terminal. In that case, it runs through without problem, which makes me suspect that there might be an issue with some environment variable of configuration flag when run in MacPorts. I could not pinpoint the exact problem, though.

Last edited 7 months ago by NicosPavlov (previous) (diff)

comment:12 Changed 7 months ago by NicosPavlov

Cc: MarcusCalhoun-Lopez added

(cc Marcus as this might involve the qmake5 PortGroup)

Searching a little bit more, it seems that the issues originates in the qmake5 PortGroup, where the line

    puts ${cache} "QMAKE_MAC_SDK=macosx${configure.sdk_version}"

is causing the problem. This would be consistent with me having issues installing various qt5-related ports.

I am far from really knowledgeable with qmake, but the documentation labels it as "This variable is used on macOS when building universal binaries." Should it be set in case of standard builds?

comment:13 Changed 7 months ago by ryandesign (Ryan Schmidt)

The SDK used to be used only when doing universal builds. Then macOS 10.14 came along and removed /usr/include which caused us to need to use the SDK even for non-universal builds. The documentation has not been updated to account for that.

comment:14 Changed 6 months ago by marcbn

Cc: marcbn added

comment:15 Changed 6 months ago by michaelld (Michael Dickens)

Cc: michaelld added

comment:16 Changed 6 months ago by michaelld (Michael Dickens)

I have py3(78)-pyqt5 installed on 10.14 ... builds and works for me ... I'm wondering if this has to do with the MP version ... I'm using the current GIT master HEAD, not the current release. I've tested the same on 10.11 and those all build and work too; same MP setup.

comment:17 Changed 6 months ago by marcbn

On macOS 10.14, I just updated to MacPorts 2.6.3 (which I assume was the master HEAD 4 days ago) and am still getting similar errors as above when trying to install py37-pyqt5 and py38-pyqt5.

comment:18 Changed 6 months ago by kencu (Ken)

can you look at your .qmake.cache file generated by macports and see if the entries in it are sensible, in particular this one:

puts ${cache} "QMAKE_MAC_SDK=macosx${configure.sdk_version}"

comment:19 Changed 6 months ago by marcbn

Content of /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pyqt5/py38-pyqt5/work/PyQt5-5.15.0/.qmake.cache is:

QMAKE_APPLE_DEVICE_ARCHS=x86_64
QMAKE_MACOSX_DEPLOYMENT_TARGET=10.14
QMAKE_MAC_SDK=macosx10.14
CONFIG+=optimize_size
QMAKE_CFLAGS_OPTIMIZE_SIZE=-Os

comment:20 Changed 6 months ago by kencu (Ken)

OK. Now you need to find out if you have an SDK that corresponds to "macosx10.14". I'm not at my 10.14 system just now, but this should get you started:

xcodebuild -showsdks

and you want to look in the /Library/Developer/CommandLineTools/SDKs directory to see if there is something in there that looks like MacOSX10.14.sdk. Once again I'm not on my 10.14 system but I think that path (from memory) is right, or very close to right.

comment:21 Changed 6 months ago by marcbn

Thanks for the help! It looks like I have the 10.15 SDK but there is a MacOSX10.14.sdk link.

Relevant output of xcodebuild -showsdks:

macOS SDKs:
        DriverKit 19.0                  -sdk driverkit.macosx19.0
        macOS 10.15                     -sdk macosx10.15

Contents of /Library/Developer/CommandLineTools/SDKs:

MacOSX.sdk -> MacOSX10.15.sdk/
'MacOSX.sdk 1'/
MacOSX10.14.sdk -> MacOSX.sdk/
MacOSX10.15.sdk/

comment:22 Changed 6 months ago by kencu (Ken)

that looks like your problem. There is a symlink from MacOSX10.14.sdk that is pointing to what resolves to the MacOSX10.15.sdk and that can't be good. If you remove that symlink, and while you're there clean up whatever the other messy one is (what is 'MacOSX.sdk 1'??)., then I suspect you should be OK.

You may have built some software that now thinks there is a MacOSX10.14.sdk present in that location. If so, you'll need to get that SDK from Xcode10 I believe, and copy it in there, or rebuild the software looking for it there.

Last edited 6 months ago by kencu (Ken) (previous) (diff)

comment:23 Changed 6 months ago by marcbn

So I removed the MacOSX10.14.sdk symlink (and FYI: 'MacOSX.sdk 1' seems to be a copy of the 10.14 SDK which I will retain for now in case it is useful) and now py38-pyqt5 configures and builds. However, any use of the port install command now spits out the following warning:

Warning: The macOS 10.14 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

(and rerunning xcode-select --install tells me that the command line tools are already installed).

Besides just putting the symlink back, any idea if there is a way to fix this? Deleting and reinstalling the Xcode command line tools maybe? Thanks again.

comment:24 Changed 6 months ago by kencu (Ken)

If you put the symlink back, you're borked again.

I would probably remove /Library/Developer/CommandLineTools and reinstall the command line tools at this point.

comment:25 Changed 6 months ago by kencu (Ken)

Or if you're very very certain about that 'MacOSX.sdk 1' being MacOSX10.14.sdk, just rename it to that :>

comment:26 Changed 6 months ago by marcbn

Reinstalling the CLTs worked for the MacPorts warnings. However, it installed only the 10.14 SDK but xcodebuild -showsdks still outputs

macOS 10.15                     -sdk macosx10.15

Is this mismatch going to cause problems down the road? I moved the old command line tools instead of deleting them, should I just put the old 10.15 SDK I had back in the SDKs directory to be safe?

comment:27 Changed 6 months ago by kencu (Ken)

Try things out now, I think; see how it works at this point. Looks cleaner.

MacPorts is quite robust, but it is breakable and it's not always obvious exactly how that happens -- best not to hack around with SDKs and things too much until you have a deep understanding of how, for example, SDK paths might be baked into PERL and PYTHON build tools...for example.

comment:28 Changed 6 months ago by kencu (Ken)

I'm just wondering if your CommandLineTools match your Xcode -- you might check that they are the same version...

comment:29 Changed 6 months ago by marcbn

How does one check the version number of the CLTs? If it's with pkgutil --pkg-info=com.apple.pkg.CLTools_Executables, then they don't match: CLTools_Executables is 10.3.0.0.1.1562985497, Xcode is 11.3.1.

comment:30 Changed 6 months ago by kencu (Ken)

there's another issue to be fixed...you'll need the matching clt's, from Apple's website if no other way.

comment:31 Changed 6 months ago by marcbn

Thanks again for your help on this!

FYI: having reinstalled the CLTs with xcode-select --install with the old 10.3.* CLT package and having had only MacOSX10.14.sdk in the /Library/Developer/CommandLineTools/SDKs directory, I then installed the 11.3.1 command line tools package from the .dmg on Apple's developer website and my SDKs directory was put into the same state it was in previously:

MacOSX.sdk -> MacOSX10.15.sdk/
'MacOSX.sdk 1'/
MacOSX10.14.sdk -> MacOSX.sdk/
MacOSX10.15.sdk/

So maybe installing the CLTs from a .dmg might have gotten me into this mess in the first place.

However, by deleting /Library/Developer/CommandLineTools first and then rerunning the installer, I got the following (seemingly acceptable) SDKs directory (with which I have successfully reran the installation of py38-pyqt5 warning-free):

MacOSX.sdk -> MacOSX10.15.sdk/
MacOSX10.14.sdk/
MacOSX10.15.sdk/

So (in my case at least), it seemed necessary to delete the previous /Library/Developer/CommandLineTools directory before installing a new CLT package.

comment:32 Changed 6 months ago by kencu (Ken)

Wow -- isn't that strange -- but thanks for working through it all, and glad that in the end, you have this system good-to-go for the foreseeable future!

I have a feeling others with this problem are having a similar set of issues go on.

comment:33 in reply to:  16 Changed 6 months ago by NicosPavlov

Replying to michaelld:

I have py3(78)-pyqt5 installed on 10.14 ... builds and works for me ... I'm wondering if this has to do with the MP version ... I'm using the current GIT master HEAD, not the current release. I've tested the same on 10.11 and those all build and work too; same MP setup.

Just as an update in my case if that's useful. I was indeed using MacPorts version 2.6.2.

I recently updated to MacOS 10.15 (for reasons not related to that ticket), and after the update and the subsequent update of Xcode (from 10.3 to 11.6), the issues reported here are not occurring anymore. So I am not really sure if this was a problem specific to my system or something more general, but it was definitely related to 10.14 and its SDK.

Note: See TracTickets for help on using tickets.