Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#53197 closed defect (fixed)

py27-pyqt5 @5.6_4 Configure error - build failure

Reported by: akhenakh (Fabrice Aneche) Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: mkae (Marko Käning), RJVB (René Bertin), michaelld (Michael Dickens), jjstickel (Jonathan Stickel)
Port: py-pyqt5

Description

This is a fresh macports install, I suspect something change recently. Sierra 10.12.2. Default variants.

:info:configure /opt/local/bin/sip-2.7 -w -f -x VendorID -t WS_MACX -t Qt_5_6_2 -x Py_v3 -B Qt_6_0_0 -o -P -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6/QtCore -I sip -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6/sip /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6/sip/QtCore/QtCoremod.sip
:info:configure sip: Deprecation warning: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6/sip/QtCore/QtCoremod.sip:23: %Module version numbers are deprecated and ignored
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 configure.py -q /opt/local/libexec/qt5/bin/qmake --verbose --confirm-license --sip=/opt/local/bin/sip-2.7 --dbus=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/dbus-1.0 --designer-plugindir=/opt/local/libexec/qt5/plugins/designer/Py27Qt5 --qml-plugindir=/opt/local/libexec/qt5/plugins/Py27Qt5 --disable=QtWebKit --disable=QtWebKitWidgets --disable=QtWebEngineCore --disable=QtWebEngineWidgets QMAKE_MACOSX_DEPLOYMENT_TARGET=10.12 QMAKE_CXXFLAGS-=-stdlib=libc++ QMAKE_LFLAGS-=-stdlib=libc++ QMAKE_CXXFLAGS+=-stdlib=libc++ QMAKE_LFLAGS+=-stdlib=libc++ --spec=macx-clang
:info:configure Exit code: 1
:error:configure org.macports.configure for port py27-pyqt5 returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed

See attached full log.

Attachments (8)

main.log (178.1 KB) - added by akhenakh (Fabrice Aneche) 7 years ago.
py-pyqt5.diff (782 bytes) - added by RJVB (René Bertin) 7 years ago.
main2.log (186.2 KB) - added by akhenakh (Fabrice Aneche) 7 years ago.
main3.log (184.8 KB) - added by akhenakh (Fabrice Aneche) 7 years ago.
py-pyqt5.2.diff (2.3 KB) - added by RJVB (René Bertin) 7 years ago.
main4.log (272.7 KB) - added by akhenakh (Fabrice Aneche) 7 years ago.
0001-py-sip-update-to-4.19-which-provides-SIP-API-12.0-th.patch (5.8 KB) - added by RJVB (René Bertin) 7 years ago.
py-pyqt5-5.7.1.diff (3.0 KB) - added by RJVB (René Bertin) 7 years ago.
patch against the current port:py-sip to upgrade it to 5.7.1

Download all attachments as: .zip

Change History (43)

Changed 7 years ago by akhenakh (Fabrice Aneche)

Attachment: main.log added

comment:1 Changed 7 years ago by mkae (Marko Käning)

Cc: mkae RJVB added
Port: py27-pyqt5 added
Version: 2.3.5

Changed 7 years ago by RJVB (René Bertin)

Attachment: py-pyqt5.diff added

comment:2 Changed 7 years ago by akhenakh (Fabrice Aneche)

Tried your patch, with no luck, installed dependencies but still failing.

see attached log main2.log

Changed 7 years ago by akhenakh (Fabrice Aneche)

Attachment: main2.log added

comment:3 Changed 7 years ago by RJVB (René Bertin)

Am I correct that you had to install a lot of py-pyqt5 dependencies?

There are a few things I'd like you to do:

  • apply the attached patch: (cd `port dir py-pyqt5` ; patch -Np3 -i /path/to/py-pyqt5.diff).
  • run sudo port -no configure py27-pyqt5 build.jobs=1
  • If this still fails, attach the new main.log without removing the old attachment.
  • Still in case of failure: do port edit py27-pyqt5 and add the line --disable=QtWebChannel \ above the line that says --disable=QtWebKit \ (note backslash as the last character on the line!). Then, do sudo port -n configure py27-pyqt5 build.jobs=1 and attach the resulting main.log file too if you still get an error.

I cannot reproduce your error but I'm not running 10.12 and the error you get is a bit weird. I also cannot recall having seen errors from the 10.12 build bots.

Evidently, if that first configure attempt above succeeds you can proceed with port -no install py-pyqt5 and report success here.

comment:4 Changed 7 years ago by RJVB (René Bertin)

You were a bit too fast but the 2nd log also showed an error I overlooked before, and the fact I had an outdated py-sip .

It seems that py-pyqt5 5.6 doesn't like SIP 4.19 ...

comment:5 Changed 7 years ago by akhenakh (Fabrice Aneche)

Yes you are correct a lot of dependencies have been fetched.

The result with your patch is in main2.log. It is still failing.

Build with --disable=QtWebChannel \ is also failing, log is in main3.log. grepping ERROR shows:

:info:configure Project ERROR: Unknown module(s) in QT: axcontainer
:info:configure Project ERROR: Unknown module(s) in QT: x11extras
:info:configure Project ERROR: Unknown module(s) in QT: winextras

Changed 7 years ago by akhenakh (Fabrice Aneche)

Attachment: main3.log added

comment:6 Changed 7 years ago by RJVB (René Bertin)

Yes, that's what I meant with my latest message. The errors you see are expected, and apparently there is no error with QtWebChannel.

The real error occurs *after* these Qt component tests have been completed, and is due to the SIP upgrade to 4.19.

Sadly we're blocked on Py-PyQt5 5.6 as long as Qt 5.7 is not yet in MacPorts. I think I may have a patch, though. Testing it once more.

comment:7 Changed 7 years ago by akhenakh (Fabrice Aneche)

I believe the same errors is also happening with pyqt4.

comment:8 Changed 7 years ago by RJVB (René Bertin)

Ok. Please unapply the previous Portfile patch and then try again with the new one I'll upload in a second.

That introduces a port patchfile which makes the configure step succeed again for me. I haven't tried building, but I have good hope that'll work too.

comment:9 in reply to:  7 Changed 7 years ago by RJVB (René Bertin)

Replying to akhenakh:

I believe the same errors is also happening with pyqt4.

Very likely...

Changed 7 years ago by RJVB (René Bertin)

Attachment: py-pyqt5.2.diff added

comment:10 Changed 7 years ago by akhenakh (Fabrice Aneche)

Are you sure you want it to be based on version 5.7.1 ? Cause the other patches no more apply and it fails to build

comment:11 Changed 7 years ago by akhenakh (Fabrice Aneche)

using your patch modified with version 5.6 passed the configure step, but failed later:

:info:build 2 errors generated.
:info:build make[1]: *** [qpycore_chimera.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6/QtCore'
:info:build make: *** [sub-QtCore-all-ordered] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyqt5/py27-pyqt5/work/PyQt5_gpl-5.6" && make -j8 -w all
:info:build Exit code: 2
:error:build org.macports.build for port py27-pyqt5 returned: command execution failed
:debug:build Error code: CHILDSTATUS 68045 2
:debug:build Backtrace: command execution failed

see main4.log

Changed 7 years ago by akhenakh (Fabrice Aneche)

Attachment: main4.log added

comment:12 in reply to:  10 Changed 7 years ago by RJVB (René Bertin)

Replying to akhenakh:

Are you sure you want it to be based on version 5.7.1 ? Cause the other patches no more apply and it fails to build

Oops, no, that was not intentional!!

comment:13 Changed 7 years ago by RJVB (René Bertin)

Can you still re-activate py27-sip 4.18.1 and try with that? The build failure is about some internal typedef which indeed appears to lack a definition, and I have no idea what to do about that. And googling a bit I expect there to be other issues too.

comment:14 Changed 7 years ago by akhenakh (Fabrice Aneche)

Sure.

Do you know any proper way to sync an older version of py27-sip cause this is a fresh install.

Thank you.

comment:15 Changed 7 years ago by RJVB (René Bertin)

Reverse apply the patch I'll be attaching.

Changed 7 years ago by RJVB (René Bertin)

comment:16 Changed 7 years ago by akhenakh (Fabrice Aneche)

awesome thank you

comment:17 Changed 7 years ago by RJVB (René Bertin)

pyqt5ClassTypeDef is defined in sip.h, a file provided by the py-sip ports. It's possible that Michael's temporary patch is to blame here, or SIP 4.19 isn't ready (as suggested by a comment you can see in the 0001* patch) ... in which case I wonder why an upgrade was pushed which breaks the initial/major raison d'être of SIP ...

comment:18 Changed 7 years ago by akhenakh (Fabrice Aneche)

reverting to sip 4.18-1 solved the issue for qt5, but py27-pyqt4 requires SIP v4.19.0 or later :)

comment:19 Changed 7 years ago by RJVB (René Bertin)

Really? That's an issue for the SIP maintainer (I've alerted him). I might check soon if PyQt5 5.7.1 builds OK with SIP 4.19 . It really should, so if it doesn't Michael introduced a regression in his update.

The nice thing with MacPorts is that you can now re-activate py*-sip 4.19 . You should be fine as long as you just use PyQt without using libraries from other ports that you'll have built with SIP 4.19, and maybe even that will just work . SIP 4.19 apparently introduced a new API, but I have no idea if that leads to a new ABI in the libraries you build with it.

comment:20 Changed 7 years ago by michaelld (Michael Dickens)

I was going to wonder whether updating to the latest PyQt5 would help, since it's at 5.7.1 (which is designed to work with SIP 4.19, BTW), and the port is currently at 5.6(.0). I know that updating Qsci required updating SIP, so maybe that's the case with py*-pyqt5? Seems likely.

comment:21 Changed 7 years ago by michaelld (Michael Dickens)

Cc: michaelld added

comment:22 Changed 7 years ago by RJVB (René Bertin)

The problem is that I couldn't get PyQt5 5.7.1 to build against Qt 5.6.2 and the versioning does suggest that that isn't supported.

comment:23 Changed 7 years ago by michaelld (Michael Dickens)

Ah; well I don't know if the latest PyQt5 is compatible with Qt older than the current release. Can you update Qt to 5.7.1? Or, add 5.7.1 & hope that a future SIP fixes its interface to 5.6.2?

comment:24 Changed 7 years ago by RJVB (René Bertin)

I already have updated my own Qt to 5.7.1, and so yes I was planning to see if PyQt 5.7.1 builds using your patched SIP 4.19 . But I don't want to get too much ahead of the pack for ports I'm not officially involved in outside of the KF5 ports so if nothing else comes up you could maybe provide a SIP 4.18 subport, temporarily? That would allow others to follow the suggestion I gave in comment:19. It seems not very likely that applications built with PyQt5 will be using 3rd party libraries that are also built using SIP and run into ABI issues. And even if there are a few that still leaves a probably larger set of apps that only use a bit of PyQt5

Someone should chime in "mmol", btw. Maybe he has a brilliant idea how to reintroduce the missing typedef.

comment:25 Changed 7 years ago by michaelld (Michael Dickens)

I'll ping the main programmer of SIP to see what he says. I'm also fine creating a py*-sip-legacy or the like to handle keeping the older code working until SIP and/or the other codes are updated to play nice.

comment:26 Changed 7 years ago by RJVB (René Bertin)

He claims that PyQt5 5.7.1 should build against Qt 5.6.2 and if it doesn't we should report a bug. I haven't yet had the time to look into building PyQt5, BUT I now have Qt 5.7.1 installed and it would be pretty disruptive to go back (a few of my core ports use private APIs).

comment:27 Changed 7 years ago by jjstickel (Jonathan Stickel)

Cc: jjstickel added

comment:28 Changed 7 years ago by RJVB (René Bertin)

So... I could finally complete the PyQt5 5.7.1 build using SIP 4.19 and Qt 5.7.1 . As noted above, it shouldn't be necessary to have Qt 5.7 installed, but it's become a bit complicated for me to reactivate Qt 5.6.2 and the corresponding versions of all the ports depending on private Qt APIs.

Either way:

  • using PyQt5 5.6 built with SIP 4.18 but with SIP 4.19 active gives me a crash. So much for reactivating the new py-sip after using the old py-sip to build PyQt5. You'd need to keep that legacy version active, and any other port that depends on py-sip will need to be built from source if it causes errors. Hopefully not a big deal.
  • PyQt5 5.6 built with SIP 4.18 and 4.19 references a pyqt5ClassTypeDef type (defined only by 4.18); in place of that type, PyQt5 5.7.1 uses sipClassTypeDef when built with SIP 4.19 (I haven't tried using SIP 4.18 with that PyQt5 version). I haven't tested, but it *should* be possible to patch SIP 4.19's sip.h to add a line
typedef sipClassTypeDef pyqt5ClassTypeDef;

or the equivalent #define. Maybe Fabrice feels like trying that hack (on the installed file, don't bother patching the py-sip port just yet).

  • PyPyQt5 5.7.1 builds fine with SIP 4.19, and the one port I have using PyQt5 works (with a few minor nuisances related to Unicode). I'll be attaching a patch against the port:py-sip version currently in macports-ports. Please try it and report any errors.

Changed 7 years ago by RJVB (René Bertin)

Attachment: py-pyqt5-5.7.1.diff added

patch against the current port:py-sip to upgrade it to 5.7.1

comment:29 Changed 7 years ago by mf2k (Frank Schima)

Keywords: haspatch added
Owner: set to mamoll
Port: py-pyqt5 added; py27-pyqt5 removed
Status: newassigned

In the future, please Cc the port maintainers (port info --maintainers py27-pyqt5), if any.

comment:30 Changed 7 years ago by michaelld (Michael Dickens)

In 97fc762b/macports-ports:

py*-pyqt5: update to 5.7.1; add support for Python 3.6; addresses ticket #53197 .

comment:31 Changed 7 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed

Thanks RJVB for the patch. It works for me. Integrated.

comment:32 Changed 7 years ago by jjstickel (Jonathan Stickel)

I think #53199 and #53200 are duplicates?

comment:33 Changed 7 years ago by RJVB (René Bertin)

of this ticket, yes.

comment:34 in reply to:  31 Changed 7 years ago by RJVB (René Bertin)

Replying to michaelld:

Thanks RJVB for the patch. It works for me. Integrated.

Good to know. I presume then that my previous error to build PyQt 5.7.1 against Qt 5.6.2 was due to using SIP 4.18 .

comment:35 Changed 7 years ago by jjstickel (Jonathan Stickel)

I still have problems, as I report on #53200.

Note: See TracTickets for help on using tickets.