Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FahadSec opened this issue Nov 3, 2022 · 5 comments
Open

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

FahadSec opened this issue Nov 3, 2022 · 5 comments
Labels
platform:macOS macOS-specific issues

Comments

@FahadSec
Copy link

FahadSec commented Nov 3, 2022

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
@yan12125
Copy link
Member

yan12125 commented Nov 4, 2022

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
Copy link
Author

FahadSec commented Nov 4, 2022

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

@yan12125
Copy link
Member

yan12125 commented Nov 9, 2022

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

sip-wheel --verbose --qmake /usr/bin/qmake-qt5

@FahadSec
Copy link
Author

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
Copy link
Member

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.

@yan12125 yan12125 added the platform:macOS macOS-specific issues label Nov 20, 2022
@yan12125 yan12125 changed the title 'QTextCodec' is undefined when invoking sip-wheel Could not find qmake spec 'macx-clang' Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:macOS macOS-specific issues
Projects
None yet
Development

No branches or pull requests

2 participants