Opened 10 years ago

Closed 10 years ago

#20184 closed defect (fixed)

py26-pyqt4 v4.5.1_0 configure error

Reported by: jrminter@… Owned by: saispo@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: sridhar.ratna@…, celemourn@…, dh@…, skymoo (Adam Mercer), tim.stoop@…
Port: py26-pyqt4, py25-pyqt4, py-pyqt4

Description (last modified by skymoo (Adam Mercer))

I tried to upgrade several ports today. qt4-mac v. 4.5.2_0 built and upgraded just fine. The upgrade of py26-pyqt4 4.4.4_1 to 4.5.1_0 failed at the configure stage with this message:

Configuring py26-pyqt4
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-pyqt4/work/PyQt-mac-gpl-4.5.1" && /opt/local/bin/python2.6 configure.py  -g -q /opt/local/libexec/qt4-mac/bin/qmake  --confirm-license LFLAGS="-F/opt/local/Library/Frameworks -L/opt/local/lib" " returned error 1
Command output: Error: This version of PyQt and the Desktop edition of Qt have incompatible
licenses.
Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.5.1 (licensed under the GNU General Public
License) for Python 2.6.2 on darwin.
Error: Unable to upgrade port: 1
Executing: /opt/local/bin/port upgrade py26-pyqt4

I thought both of these were GPL versions...

Attachments (2)

patch-configure.py (700 bytes) - added by dh@… 10 years ago.
Portfile.diff (1.7 KB) - added by dh@… 10 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 10 years ago by skymoo (Adam Mercer)

Description: modified (diff)
Keywords: py26-qt4 removed
Owner: changed from macports-tickets@… to saispo@…
Port: py26-pyqt4 added; py26-qt4 removed

comment:2 Changed 10 years ago by sridhar.ratna@…

Cc: sridhar.ratna@… added

Cc Me!

comment:3 Changed 10 years ago by dh@…

I patched the configure.py to allow it to run (by ignoring the license check). But then compilation fails further on, failing to link to libpng ... but libpng exists in /usr/lib which should be part of the standard link path ...

/usr/bin/g++-4.0 -headerpad_max_install_names -arch i386 -bundle -o libpythonplugin.bundle pluginloader.o moc_pluginloader.o  -F/opt/local/libexec/qt4-mac/lib -L/opt/local/libexec/qt4-mac/lib -framework Python -L/opt/local/libexec/qt4-mac/lib -F/opt/local/libexec/qt4-mac/lib -framework QtDesigner -framework QtScript -framework QtXml -framework QtGui -framework Carbon -framework AppKit -lpng -framework QtCore -lz -lm -framework ApplicationServices 
ld: library not found for -lpng
collect2: ld returned 1 exit status
make[1]: *** [libpythonplugin.bundle] Error 1
make: *** [all] Error 2

Error: Unable to upgrade port: 1

comment:4 in reply to:  3 ; Changed 10 years ago by dh@…

Replying to dh@…:

I patched the configure.py to allow it to run (by ignoring the license check). But then compilation fails further on, failing to link to libpng ... but libpng exists in /usr/lib which should be part of the standard link path ...

Sorry, thats rubbish from me, libpng is in /opt/local/lib. This will compile if a -L${prefix}/lib is added to the g++ line. The Makefile is generated by qmake so somehow qmake needs to be told to that ${prefix}/lib should be a searched library path.

comment:5 Changed 10 years ago by celemourn@…

Cc: celemourn@… added

Cc Me!

comment:6 in reply to:  4 Changed 10 years ago by celemourn@…

Replying to dh@…:

Replying to dh@…:

I patched the configure.py to allow it to run (by ignoring the license check). But then compilation fails further on, failing to link to libpng ... but libpng exists in /usr/lib which should be part of the standard link path ...

Sorry, thats rubbish from me, libpng is in /opt/local/lib. This will compile if a -L${prefix}/lib is added to the g++ line. The Makefile is generated by qmake so somehow qmake needs to be told to that ${prefix}/lib should be a searched library path.

Would a setting a symbolic link in the normal search path work? Also, where did you find the configure.py file, and exactly what modification did you make to it? (sorry, I R noob, I don't know this stuff.)

comment:7 Changed 10 years ago by dh@…

Patch files attached to work around problem. Note that py26-qt4 will then fail to compile until ticket http://trac.macports.org/ticket/20241 is resolved

comment:8 Changed 10 years ago by dh@…

Cc: dh@… added

Cc Me!

comment:9 Changed 10 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:10 Changed 10 years ago by ru.w31rd0@…

The very same problem with py25-pyqt4 v4.5.1_0:

--->  Configuring py25-pyqt4
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-pyqt4/work/PyQt-mac-gpl-4.5.1" && /opt/local/bin/python2.5 configure.py  -g -q /opt/local/libexec/qt4-mac/bin/qmake  --confirm-license LFLAGS="-F/opt/local/Library/Frameworks -L/opt/local/lib" " returned error 1
Command output: Error: This version of PyQt and the Desktop edition of Qt have incompatible
licenses.
Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.5.1 (licensed under the GNU General Public
License) for Python 2.5.4 on darwin.

Error: Unable to upgrade port: 1

Should I open an individual ticket?

comment:11 Changed 10 years ago by lukas.polivka@…

This error is apparently caused by Qt 4.5.2 licensing change and it most probably breaks all pyqt4(-4.5.1) ports.

It is fixed upstream in the upcoming PyQt4 4.5.2:

2009/06/26 17:40:39 phil Fixed the license checks for Qt v4.5.2.

http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/ChangeLog-4.5.2-snapshot-20090712

Maybe py??-pyqt4-devel ports with this snapshot should be created until 4.5.2 is released?

comment:12 in reply to:  11 Changed 10 years ago by ryandesign (Ryan Schmidt)

Replying to lukas.polivka@…:

http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/ChangeLog-4.5.2-snapshot-20090712

404 not found.

Maybe py??-pyqt4-devel ports with this snapshot should be created until 4.5.2 is released?

Instead, could the specific change that was made to fix this be identified and applied to the existing ports?

comment:13 Changed 10 years ago by ryandesign (Ryan Schmidt)

Port: py25-pyqt4 py-pyqt4 added

comment:14 Changed 10 years ago by ryandesign (Ryan Schmidt)

Cc: tim.stoop@… added

Changed 10 years ago by dh@…

Attachment: patch-configure.py added

Changed 10 years ago by dh@…

Attachment: Portfile.diff added

comment:15 Changed 10 years ago by dh@…

Attached is a solution to the problem (portfile.diff, patch-configure.py). It upgrades the version to 4.5.2 and patches configure.py to correctly link the qtdesigner plugin. It does not require any resolution of ticket 20241 (which should probably be closed as invalid/irrelevant).

Similar patches will need to be applied to py25-* and py-*

comment:16 Changed 10 years ago by jrminter@…

dh - I have been trying to use your patches and have run into a problem. I followed the examples in the documentation and set up a local portfile repository and successfully applied the Portfile patch and placed the patch-configure.py in the same directory. When I run port "install py26-pyqt4" I get the following error:

<p> ---> Attempting to fetch patch-configure.py from http://distfiles.macports.org/py26-pyqt4

<p>It is obviously failing to find the local patch file. I can't seem to find how to fix this in the documentation. I would greatly appreciate a brief howto.

<p> Thanks,

<p>John Minter

comment:17 Changed 10 years ago by jrminter@…

dh and others - please ignore my last. I figured out that patch-configure.py had to be in a "files" subdirectory in my local py26-pyqt4 portfile directory. Everything built and installed. Thanks for your help.

John Minter

comment:18 Changed 10 years ago by skymoo (Adam Mercer)

Following r54054 this builds for me now against Qt-4.5.2, thanks

comment:19 Changed 10 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.