Package Base Details: pyqt4

Git Clone URL: https://aur.archlinux.org/pyqt4.git (read-only, click to copy)
Submitter: arojas
Maintainer: LaughingMan
Last Packager: LaughingMan
Votes: 20
Popularity: 0.000000
First Submitted: 2018-08-24 08:49 (UTC)
Last Updated: 2023-05-11 01:50 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 Next › Last »

JohnRobson commented on 2019-03-08 05:48 (UTC)

g++ -c -pipe -fno-exceptions -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I/usr/include/python3.7m -I../qpy/QtCore -I. -o sipQtCoreQObject.o sipQtCoreQObject.cpp
/tmp/yay/pyqt4/src/PyQt4_gpl_x11-4.12.3/QtCore/sipQtCoreQObject.cpp:2345:1: error: cannot convert ‘std::nullptr_t’ to ‘int’ in initialization
     SIP_NULLPTR,
 ^
distcc[1235] ERROR: compile sipQtCoreQObject.cpp on localhost failed
make[1]: *** [Makefile:749: sipQtCoreQObject.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/yay/pyqt4/src/PyQt4_gpl_x11-4.12.3/QtCore'
make: *** [Makefile:60: sub-QtCore-make_default-ordered] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
Error making: pyqt4 (pyqt4-common python2-pyqt4)

alexei commented on 2019-03-08 00:29 (UTC) (edited on 2019-03-08 00:31 (UTC) by alexei)

@mark: on line 14, change python-sip python2-sip dependencies to python-sip-pyqt4 python2-sip-pyqt4. EDIT: and remove the former packages if you have them installed.

The error you cite just tells you to install pyqt4-common from AUR, which is a dependency of this package. If you use yaourt (or similar) it fetches dependencies automatically, otherwise you have to install deps manually.

mark commented on 2019-03-07 19:38 (UTC)

I'm still having trouble installing this.

=>> Select packages to install
  1> pyqt4-common
  2> python-pyqt4
  3> python2-pyqt4

Install [1]: 3
[sudo] password for username: 
loading packages...
resolving dependencies...
warning: cannot resolve "pyqt4-common", a dependency of "python2-pyqt4"
:: The following package cannot be upgraded due to unresolvable dependencies:
      python2-pyqt4

I've added the temporary workaround after configure commands, but I didn't quite get where the rest of the changes should be made. Even though it should build but not work with just this hotfix?

alexei commented on 2019-02-18 19:33 (UTC) (edited on 2019-02-18 20:14 (UTC) by alexei)

As a temporary workaround, add this after both configure commands in the PKGBUILD:

find . -type f -name '*.cpp' -exec sed -i 's/{SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}/{SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, 0}/g' {} \;

Btw, you also must change python-sip/python2-sip dependencies to python-sip-pyqt4/python2-sip-pyqt4, otherwise PyQt will build but the module won't work: import will fail with 'sip' not find, and if you import the default sip, you'll get errors like QtGui.QWidget no attrivute QWidget in QtGui.

Also, you must update python-sip-pyqt4/python2-sip-pyqt4 to 4.19.14 by bumping the version and URL in the PKGBUILD to https://www.riverbankcomputing.com/static/Downloads/sip/sip-4.19.14.tar.gz . Otherwise, 'from PyQt4 import QtGui' will fail with need API v12.6 but sip provides only v12.5.

UPDATE: Also, be careful with versions of sip and python-sip-pyqt packages, it's easy to end up with different versions if you're not careful, and that's probably not good. I ended up simply adding the python-sip-pyqt4 packages to the sip source package PKGBUILD, which already has the python-sip-pyqt5; and uninstalled all sip packages from the system before building and installing the package set from the modified sip PKGBUILD. That way, all sip packages are of the same version. This does not address the underlying issue, though that PyQt4 does not build with latest sip 4.19.14.

UPDATE2: reported to PyQt4: http://python.6.x6.nabble.com/PyQt4-compilation-error-with-sip-4-19-14-convert-std-nullptr-t-to-int-in-initialization-td5248504.html

tchakatak commented on 2019-02-17 10:35 (UTC)

@kingkingmax > Can you detail more your solution? I am having the same issue.

kingkingmax commented on 2019-02-16 03:35 (UTC)

@ColonelThirtyTwo @sfaunl I found the issue is at sip.h Even compilier is new version, it doesn't work very well for following:

if __cplusplus >= 201103L || defined(_MSVC_LANG)

========================= / C++11 and later. /

define SIP_NULLPTR nullptr
define SIP_OVERRIDE override
else

/ Earlier versions of C++. /

define SIP_NULLPTR 0
define SIP_OVERRIDE
endif

============= I changed C++11 part as earlier version of C++. It works.

sfaunl commented on 2019-02-15 23:54 (UTC)

@ColonelThirtyTwo I'm getting same error. Downgrading gcc did not solve the problem.

ColonelThirtyTwo commented on 2019-02-14 03:33 (UTC) (edited on 2019-02-14 03:33 (UTC) by ColonelThirtyTwo)

Getting an error when I try to build this using G++ 8.2.1 (latest arch version):

g++ -c -pipe -fno-exceptions -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I/usr/include/python3.7m -I../qpy/QtCore -I. -o sipQtCoreQAbstractTransition.o sipQtCoreQAbstractTransition.cpp
/home/col/.cache/pikaur/build/pyqt4/src/PyQt4_gpl_x11-4.12.3/QtCore/sipQtCoreQAbstractTransition.cpp:812:1: error: cannot convert ‘std::nullptr_t’ to ‘int’ in initialization

 ^
make[1]: *** [Makefile:698: sipQtCoreQAbstractTransition.o] Error 1
make[1]: Leaving directory '/home/col/.cache/pikaur/build/pyqt4/src/PyQt4_gpl_x11-4.12.3/QtCore'
make: *** [Makefile:60: sub-QtCore-make_default-ordered] Error 2