I am trying to build PyQt 4 because it is used by the program that I need to run.
While it is trivial to install PyQt 5 with a single command pip install PyQt5
, the same is not possible with the older PyQt 4 and people recommend building it from source.
I have installed SIP like suggested on the PyQt4 Download.
I have also downloaded PyQt 4 and untarr'ed it. Now when I am running the python configure.py --verbose
, I get
Stanislaw@home:PyQt4_gpl_mac-4.12.3 (master)*$ python configure.py --verbose
Determining the layout of your Qt installation...
/usr/local/bin/qmake -spec macx-g++ -o qtdirs.mk qtdirs.pro
make -f qtdirs.mk
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/local/etc/qt4/mkspecs/macx-g++ -I. -I/usr/local/Cellar/qt@4/4.8.7_6/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt@4/4.8.7_6/lib/QtCore.framework/Versions/4/Headers -I/usr/local/include -I. -F/usr/local/lib -o qtdirs.o qtdirs.cpp
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
...
/usr/local/lib/QtCore.framework/Headers/qglobal.h:68:10: fatal error: 'algorithm' file not found
#include <algorithm>
^~~~~~~~~~~
I don't have any experience with Qt/qmake but I would guess that this older version of PyQt doesn't configure itself to use the Clang-based C++ toolchain of macOS correctly.
I will continue digging but I would also like to know if a trivial solution existed for this problem.