Build failure: sip/QtCore/qprocess.sip: line 99: column 5: 'Q_PID' is undefined

Nick Guenther nick.guenther at polymtl.ca
Mon Sep 25 22:01:51 BST 2023


September 25, 2023 3:14 AM, "Philipp Schneider" <philipp-schneider at gmx.net> wrote:

> Hey everyone,
> 
> I can confirm that the reason it did not work anymore (macOS, arm64), was due to Xcode 15. I
> downloaded Xcode 14.3.1 from here
> (https://download.developer.apple.com/Developer_Tools/Xcode_14.3.1/Xcode_14.3.1.xip), unzipped it,
> renamed `Xcode.app` to `Xcode_14.3.1.app` (to be able to have both versions in parallel), copied it
> to `/Applications` and started it. After that I set the command line tools to 14.3.1 (Settings ->
> Locations; there are also other ways like `xcode-select -s` and also ways with command line tools
> only) and just installed PyQt5 using this command: `pip install pyqt5 --config-settings
> --confirm-license= --verbose`. I can confirm that building PyQt5 from source works again (this
> still needs `qmake` from `brew` or from qt.io), so there is an incompatibility with some of the
> contents of Xcode 15. I'll try to find out, which one this is exactly so we might be able to
> transfer this to linux aarch64.
> 
> @Nick, are you aware what compiler/libraries PyQt5 uses, so I know where to start digging?
> 

I'm first trying to build on Linux **x86_64** before anything else, which I assume would be the easiest platform since it's the world's most common. I can't even accomplish that at the moment.

Are you sure you used `pip install` like that? If I try that I get:


(build-env) nick at server:~/src/PyQt5-5.15.9$ pip install pyqt5 --config-settings --confirm-license= --verbose

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --config-settings
(build-env) nick at server:~/src/PyQt5-5.15.9$ pip --version
pip 22.0.2 from /home/GRAMES.POLYMTL.CA/p115628/src/PyQt5-5.15.9/build-env/lib/python3.10/site-packages/pip (python 3.10)


And if I try

(build-env) nick at server:~/src/PyQt5-5.15.9$ sip-build --confirm-license= --verbose
usage: sip-build [-h] [-V] [--quiet] [--verbose] [--build-dir DIR] [--scripts-dir DIR] [--target-dir DIR] [--api-dir DIR] [--no-compile]
                 [--no-version-info] [--disable NAME] [--enable NAME] [--android-abi ABI] [--link-full-dll] [--qml-debug] [--confirm-license]
                 [--license-dir DIR] [--qt-shared] [--no-designer-plugin] [--no-qml-plugin] [--dbus DIR] [--no-dbus-python] [--no-tools] [--jobs N]
                 [--no-make] [--qmake FILE] [--qmake-setting 'NAME += VALUE'] [--spec SPEC] [--concatenate N] [--debug] [--disabled-feature TAG]
                 [--no-docstrings] [--pep484-pyi] [--protected-is-public] [--no-protected-is-public] [--tracing]
sip-build: error: argument --confirm-license: ignored explicit argument ''


But this form will start the build, but of course fail:

(build-env) nick at server:~/src/PyQt5-5.15.9$ sip-build --confirm-license --verbose
Querying qmake about your Qt installation...
/usr/bin/qmake -query
This is the GPL version of PyQt 5.15.9 (licensed under the GNU General Public License) for Python 3.10.12 on linux.
Found the license file 'pyqt-gpl.sip'.
Checking to see if the QtCore bindings can be built...
/usr/bin/qmake QtCore.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtCore.pro
Checking to see if the QtNetwork bindings can be built...
/usr/bin/qmake QtNetwork.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtNetwork.pro
Checking to see if the QtGui bindings can be built...
/usr/bin/qmake QtGui.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtGui.pro
Checking to see if the QtWidgets bindings can be built...
/usr/bin/qmake QtWidgets.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtWidgets.pro
Checking to see if the QtQml bindings can be built...
/usr/bin/qmake QtQml.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtQml.pro
Checking to see if the QAxContainer bindings can be built...
/usr/bin/qmake QAxContainer.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QAxContainer.pro
Checking to see if the QtAndroidExtras bindings can be built...
/usr/bin/qmake QtAndroidExtras.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtAndroidExtras.pro
Checking to see if the QtBluetooth bindings can be built...
/usr/bin/qmake QtBluetooth.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtBluetooth.pro
Checking to see if the QtDBus bindings can be built...
/usr/bin/qmake QtDBus.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtDBus.pro
The QtDesigner bindings are disabled with a static Qt installation...
Checking to see if the Enginio bindings can be built...
/usr/bin/qmake Enginio.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: Enginio.pro
Checking to see if the QtHelp bindings can be built...
/usr/bin/qmake QtHelp.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtHelp.pro
Checking to see if the QtMacExtras bindings can be built...
/usr/bin/qmake QtMacExtras.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtMacExtras.pro
Checking to see if the QtMultimedia bindings can be built...
/usr/bin/qmake QtMultimedia.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtMultimedia.pro
Checking to see if the QtMultimediaWidgets bindings can be built...
/usr/bin/qmake QtMultimediaWidgets.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtMultimediaWidgets.pro
Checking to see if the QtNfc bindings can be built...
/usr/bin/qmake QtNfc.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtNfc.pro
Checking to see if the QtOpenGL bindings can be built...
/usr/bin/qmake QtOpenGL.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtOpenGL.pro
Checking to see if the QtPositioning bindings can be built...
/usr/bin/qmake QtPositioning.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtPositioning.pro
Checking to see if the QtLocation bindings can be built...
/usr/bin/qmake QtLocation.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtLocation.pro
Checking to see if the QtPrintSupport bindings can be built...
/usr/bin/qmake QtPrintSupport.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtPrintSupport.pro
Checking to see if the QtQuick bindings can be built...
/usr/bin/qmake QtQuick.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtQuick.pro
Checking to see if the QtQuick3D bindings can be built...
/usr/bin/qmake QtQuick3D.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtQuick3D.pro
Checking to see if the QtQuickWidgets bindings can be built...
/usr/bin/qmake QtQuickWidgets.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtQuickWidgets.pro
Checking to see if the QtRemoteObjects bindings can be built...
/usr/bin/qmake QtRemoteObjects.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtRemoteObjects.pro
Checking to see if the QtSensors bindings can be built...
/usr/bin/qmake QtSensors.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtSensors.pro
Checking to see if the QtSerialPort bindings can be built...
/usr/bin/qmake QtSerialPort.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtSerialPort.pro
Checking to see if the QtSql bindings can be built...
/usr/bin/qmake QtSql.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtSql.pro
Checking to see if the QtSvg bindings can be built...
/usr/bin/qmake QtSvg.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtSvg.pro
Checking to see if the QtTest bindings can be built...
/usr/bin/qmake QtTest.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtTest.pro
Checking to see if the QtTextToSpeech bindings can be built...
/usr/bin/qmake QtTextToSpeech.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtTextToSpeech.pro
Checking to see if the QtWebChannel bindings can be built...
/usr/bin/qmake QtWebChannel.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtWebChannel.pro
Checking to see if the QtWebKit bindings can be built...
/usr/bin/qmake QtWebKit.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtWebKit.pro
Checking to see if the QtWebKitWidgets bindings can be built...
/usr/bin/qmake QtWebKitWidgets.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtWebKitWidgets.pro
Checking to see if the QtWebSockets bindings can be built...
/usr/bin/qmake QtWebSockets.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtWebSockets.pro
Checking to see if the QtWinExtras bindings can be built...
/usr/bin/qmake QtWinExtras.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtWinExtras.pro
Checking to see if the QtX11Extras bindings can be built...
/usr/bin/qmake QtX11Extras.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtX11Extras.pro
Checking to see if the QtXml bindings can be built...
/usr/bin/qmake QtXml.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtXml.pro
Checking to see if the QtXmlPatterns bindings can be built...
/usr/bin/qmake QtXmlPatterns.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: QtXmlPatterns.pro
Checking to see if the dbus-python support should be built...
The dbus-python package does not seem to be installed.
These bindings will be built: Qt, pylupdate, pyrcc.
Generating the Qt bindings...
Generating the pylupdate bindings...
sip-build: /home/GRAMES.POLYMTL.CA/p115628/src/PyQt5-5.15.9/sip/QtCore/qprocess.sip: line 99: column 5: 'Q_PID' is undefined




Out of desperation, I manually patched:

--- /home/nick/src/PyQt5-5.15.9/sip/QtCore/qprocess.sip    2023-09-25 16:02:30.854724593 -0400
+++ /home/nick/src/PyQt5-5.15.9/sip/QtCore/qprocess.sip.2  2023-09-25 16:02:25.746780433 -0400
@@ -96,7 +96,7 @@
     void setWorkingDirectory(const QString &dir);
     QProcess::ProcessError error() const;
     QProcess::ProcessState state() const;
-    Q_PID pid() const;
+    qint64 pid() const;
     bool waitForStarted(int msecs = 30000) /ReleaseGIL/;
     virtual bool waitForReadyRead(int msecs = 30000) /ReleaseGIL/;
     virtual bool waitForBytesWritten(int msecs = 30000) /ReleaseGIL/;


and with this the build got further, but then failed at:

(build-env) user at server:~/src/PyQt5-5.15.9$ sip-build --confirm-license --verbose --debug --no-make
Querying qmake about your Qt installation...
/usr/bin/qmake -query
[...]
The dbus-python package does not seem to be installed.
These bindings will be built: Qt, pylupdate, pyrcc.
Generating the Qt bindings...
Generating the pylupdate bindings...
Generating the pyrcc bindings...
Generating the pylupdate5 script...
Generating the pyrcc5 script...
Generating the pyuic5 script...
Generating the .pro file for the Qt module...
Generating the .pro file for the pylupdate module...
Generating the .pro file for the pyrcc module...
Generating the top-level .pro file...
Generating the Makefiles...
/usr/bin/qmake -recursive PyQt5.pro
Could not find qmake spec 'linux-g++'.
Error processing project file: PyQt5.pro
sip-build: '/usr/bin/qmake -recursive PyQt5.pro' failed returning 3


So I don't know what's going on. It seems like I'm missing some build tooling and header files, but I don't know what tools I am supposed to have though. https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html#building-and-installing-from-source doesn't mention what Qt libraries to install. There is this though:


--qt-shared

    Normally Qt is checked to see if it has been built as shared libraries. Some Linux distributions configure their Qt builds to make this check unreliable. This option ignores the result of the check and assumes that Qt has been built as shared libraries.

which implies that, yes, it is linking against the system libraries. Which means I'm probably missing Ubuntu's qt-something-dev package. If I figure it out I'll update you all.


More information about the PyQt mailing list