Could not find qmake spec 'macx-clang'
FahadSec opened this issue · 5 comments
Expected Behavior
sip-wheel complete successfully without errors
Current Behavior
Querying qmake about your Qt installation...
/usr/local/bin/qmake -query
These bindings will be built: QTermWidget.
Generating the QTermWidget bindings...
sip-wheel: qtermwidget/pyqt/sip/qtermwidget.sip: line 49: column 23: 'QTextCodec' is undefined
Context
I'm trying to build PyQt bindings and I'm following the example in https://github.com/lxqt/qtermwidget/blob/master/.ci/build.sh. I have already built and installed all the needed dependencies.
System Information
- Distribution & Version: Mac OS 12.6.1
- Kernel: Mac OS
- Qt Version: 6.3.2 (but I also have qt5 installed)
- lxqt-build-tools Version: 0.11.0
- Package version: I'm not sure what is this asking for exactly
Qt Version: 6.3.2
QTermWidget does not support Qt 6 yet. Most likely you need to tell sip-wheel to use Qt 5.
How do I tell sip-wheel to use Qt 5?
Specifying the path to qmake from Qt 5 should work. For example,
sip-wheel --verbose --qmake /usr/bin/qmake-qt5
I did
CXXFLAGS="-I$PWD/../lib -I$PWD/../build/lib" LDFLAGS="-L$PWD/../build" sip-wheel --verbose --qmake /usr/local/lib/python3.10/site-packages/qt5_applications/Qt/bin/qmake
and got
Querying qmake about your Qt installation...
/usr/local/lib/python3.10/site-packages/qt5_applications/Qt/bin/qmake -query
These bindings will be built: QTermWidget.
Generating the QTermWidget bindings...
Generating the .pro file for the QTermWidget module...
Generating the top-level .pro file...
Generating the Makefiles...
/usr/local/lib/python3.10/site-packages/qt5_applications/Qt/bin/qmake -recursive QTermWidget.pro
Could not find qmake spec 'macx-clang'.
Error processing project file: QTermWidget.pro
sip-wheel: '/usr/local/lib/python3.10/site-packages/qt5_applications/Qt/bin/qmake -recursive QTermWidget.pro' failed returning 3
On my machine (Arch Linux), the qmake spec 'macx-clang' is in /usr/lib/qt/mkspecs/macx-clang
. Not sure if something goes wrong for Qt on macOS - I no longer have macOS for testing, anyway.
By the way, the path /usr/local/lib/python3.10/site-packages/qt5_applications/Qt/bin/qmake
does not seem a standard Qt installation. qmake is part of C/C++ Qt and is generally unrelated to Python.