New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20184 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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@…, ram@…, tim.stoop@…
Port: py26-pyqt4, py25-pyqt4, py-pyqt4

Description (last modified by ram@…) (diff)

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

patch-configure.py Download (0.7 KB) - added by dh@… 3 years ago.
Portfile.diff Download (1.7 KB) - added by dh@… 3 years ago.

Change History

  Changed 3 years ago by ram@…

  • keywords py26-qt4 removed
  • owner changed from macports-tickets@… to saispo@…
  • port changed from py26-qt4 to py26-pyqt4
  • description modified (diff)

  Changed 3 years ago by sridhar.ratna@…

  • cc sridhar.ratna@… added

Cc Me!

follow-up: ↓ 4   Changed 3 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

in reply to: ↑ 3 ; follow-up: ↓ 6   Changed 3 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.

  Changed 3 years ago by celemourn@…

  • cc celemourn@… added

Cc Me!

in reply to: ↑ 4   Changed 3 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.)

  Changed 3 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

  Changed 3 years ago by dh@…

  • cc dh@… added

Cc Me!

  Changed 3 years ago by ram@…

  • cc ram@… added

Cc Me!

  Changed 3 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?

follow-up: ↓ 12   Changed 3 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?

in reply to: ↑ 11   Changed 3 years ago by ryandesign@…

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?

  Changed 3 years ago by ryandesign@…

  • port changed from py26-pyqt4 to py26-pyqt4, py25-pyqt4, py-pyqt4

  Changed 3 years ago by ryandesign@…

  • cc tim.stoop@… added

Changed 3 years ago by dh@…

Changed 3 years ago by dh@…

  Changed 3 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-*

  Changed 3 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

  Changed 3 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

  Changed 3 years ago by ram@…

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

  Changed 3 years ago by macsforever2000@…

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.