lxqt / qtermwidget

The terminal widget for QTerminal
https://lxqt.github.io
GNU General Public License v2.0
502 stars 256 forks source link

Could not find qmake spec 'macx-clang' #492

Open FahadSec opened 2 years ago

FahadSec commented 2 years ago
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
yan12125 commented 2 years ago

Qt Version: 6.3.2

QTermWidget does not support Qt 6 yet. Most likely you need to tell sip-wheel to use Qt 5.

FahadSec commented 2 years ago

How do I tell sip-wheel to use Qt 5?

yan12125 commented 2 years ago

Specifying the path to qmake from Qt 5 should work. For example,

sip-wheel --verbose --qmake /usr/bin/qmake-qt5
FahadSec commented 2 years ago

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
yan12125 commented 1 year ago

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.