Install old version PyQt4 on a mac by compiling the source

Phil Thompson phil at riverbankcomputing.com
Fri Jul 9 09:09:00 BST 2021


On 08/07/2021 19:37, Felix Voigt wrote:
> Hello everyone,
> 
> today I tried the same with PyQt5 with the following results.
> 
> The configure process succeeded:
> cd ~/documents/tmp/PyQt5-5.15.4
> ~/.pyenv/versions/2.7.18/bin/python2.7 configure.py --qmake
> /usr/local/Cellar/qt at 5/5.15.2/bin/qmake
> --sip=/Users/felixvoigt/.pyenv/versions/2.7.18/bin/sip --verbose
> 
> The make process failed:
> make
> -> In file included from
> /Users/felixvoigt/documents/tmp/PyQt5-5.15.4/sip/QtCore/qsocketnotifier.sip:26:
> 
> /usr/local/Cellar/qt at 5/5.15.2/lib/QtCore.framework/Headers/qsocketnotifier.h:117:35:
> error: constexpr function never produces a constant
>       expression [-Winvalid-constexpr]
>     Q_DECL_CONSTEXPR_NOT_WIN bool isValid() const noexcept { return
> *this != QSocketDescriptor(); }
>                                   ^
> 
> /usr/local/Cellar/qt at 5/5.15.2/lib/QtCore.framework/Headers/qsocketnotifier.h:117:75:
> note: undefined function 'operator!=' cannot be used
>       in a constant expression
>     Q_DECL_CONSTEXPR_NOT_WIN bool isValid() const noexcept { return
> *this != QSocketDescriptor(); }
>                                                                         
>   ^
> 
> /usr/local/Cellar/qt at 5/5.15.2/lib/QtCore.framework/Headers/qsocketnotifier.h:124:42:
> note: declared here
>     friend Q_DECL_CONSTEXPR_NOT_WIN bool operator!=(QSocketDescriptor 
> lhs,
> 1 error generated.
> 
> Any ideas how to fix it?
> Kind regards
> feli_x

As the error is referring to Qt source code and not SIP generated code 
then the problem may be your version of Xcode.

Phil


More information about the PyQt mailing list