New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #27193 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

pyqt4 hang at configure

Reported by: matteobachetti@… Owned by: michaelld@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: and.damore@…, macsforever2000@…, gius.dima@…
Port: py26-pyqt4

Description (last modified by and.damore@…) (diff)

Good morning, I have a problem with pyqt4. I'm running an upgrade (upgrade outdated) and when it reaches pyqt4 (both the py25 and the py26 versions) it hangs during configure. I've run it with the debug mode but it gives no errors, it justs stays in the configure script forever (at least 10 hours...) Here's the line of the debug output where it hangs:

DEBUG: Assembled 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.7.7" &&
/opt/local/bin/python2.6 configure.py  -q /opt/local/bin/qmake 
--confirm-license LFLAGS="-F/opt/local/Library/Frameworks -L/opt/local/lib"'

Any ideas? Thanks in advance, Matteo

Attachments

pyqt4 configure.py verbose output.txt (16.2 KB) - added by and.damore@… 3 years ago.
macports_output.txt (13.5 KB) - added by matteobachetti@… 3 years ago.
configure_verbose_output_mb.txt (13.5 KB) - added by matteobachetti@… 3 years ago.

Change History

comment:1 Changed 3 years ago by macsforever2000@…

  • Owner changed from macports-tickets@… to michaelld@…
  • Description modified (diff)

comment:2 follow-ups: ↓ 3 ↓ 5 Changed 3 years ago by michaelld@…

It also gets stuck for me at the same place, which is strange because I know I just installed it correctly maybe a week ago. Running the 'configure.py' script by hand seems to work, so I'm guessing this issue is due to a change in 'port' itself.

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 6 Changed 3 years ago by matteobachetti@…

Replying to michaelld@…:

It also gets stuck for me at the same place, which is strange because I know I just installed it correctly maybe a week ago. Running the 'configure.py' script by hand seems to work, so I'm guessing this issue is due to a change in 'port' itself.

I tried to run it by hand, copying the command from the command line, and it gets stuck after saying "Determining the layout of your Qt installation...". If I press Ctrl+C to stop it, the following message comes out:

Traceback (most recent call last):
  File "configure.py", line 2138, in <module>
    main()
  File "configure.py", line 2073, in main
    macros = get_build_macros(args)
  File "configure.py", line 1743, in get_build_macros
    return sipconfig.parse_build_macros(fname, names, overrides, properties)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sipconfig.py", line 2495, in parse_build_macros
    estart = rhs.find("$$(")

Is it the same for you?

comment:4 Changed 3 years ago by and.damore@…

  • Cc and.damore@… added

Cc Me!

comment:5 in reply to: ↑ 2 Changed 3 years ago by and.damore@…

Replying to michaelld@…:

It also gets stuck for me at the same place, which is strange because I know I just installed it correctly maybe a week ago. Running the 'configure.py' script by hand seems to work, so I'm guessing this issue is due to a change in 'port' itself.

I'm assuming you are on trunk but a regular user is likely gonna use a stable release. Has stable been updated lately?

comment:6 in reply to: ↑ 3 ; follow-up: ↓ 7 Changed 3 years ago by and.damore@…

Replying to matteobachetti@…:

I tried to run it by hand, copying the command from the command line, and it gets stuck after saying "Determining the layout of your Qt installation...".

Did you run a port selfupdate?

Can you try to run configure.py with -v python option?

I'm attaching the output of my output, I'm quickly asked to accept the GPL license terms.

Changed 3 years ago by and.damore@…

comment:7 in reply to: ↑ 6 Changed 3 years ago by matteobachetti@…

Replying to and.damore@…:

Replying to matteobachetti@…:

I tried to run it by hand, copying the command from the command line, and it gets stuck after saying "Determining the layout of your Qt installation...".

Did you run a port selfupdate?

Can you try to run configure.py with -v python option?

I'm attaching the output of my output, I'm quickly asked to accept the GPL license terms.

I'm attaching mine. Yes, I ran selfupdate and now the version of Macports is 1.9.2

Changed 3 years ago by matteobachetti@…

Changed 3 years ago by matteobachetti@…

comment:8 follow-up: ↓ 9 Changed 3 years ago by matteobachetti@…

Sorry, the first file name was misleading so I resubmitted it with a better name. You can delete the first, if possible.

comment:9 in reply to: ↑ 8 Changed 3 years ago by and.damore@…

  • Description modified (diff)

Replying to matteobachetti@…:

Sorry, the first file name was misleading so I resubmitted it with a better name. You can delete the first, if possible.

Another user found a neverending loop in site-packages/sipconfig.py, maybe this error is due to py26-sip port.

What py26-sip version do you have?

comment:10 follow-up: ↓ 11 Changed 3 years ago by matteobachetti@…

port info says:

py26-sip @4.11.1, Revision 1 (python, devel)
Variants:             universal

comment:11 in reply to: ↑ 10 ; follow-up: ↓ 13 Changed 3 years ago by macsforever2000@…

Replying to matteobachetti@…:

port info says:

port info tells us nothing about your setup. Instead tell us the output of the following:

port installed py26-sip

I've been meaning to update the py26-sip and py26-pyqt4 ports to the latest version. The latest versions are needed for full support of qt 4.7. That might solve this problem. I'll try to get to it today unless someone else does it.

comment:12 Changed 3 years ago by macsforever2000@…

  • Cc macsforever2000@… added

Cc Me!

comment:13 in reply to: ↑ 11 Changed 3 years ago by matteobachetti@…

Replying to macsforever2000@…:

Replying to matteobachetti@…:

port info says:

port info tells us nothing about your setup. Instead tell us the output of the following:

port installed py26-sip

Ah, ok. Sorry, this is the output of port installed:

 py26-sip @4.11.1_1 (active)

I've been meaning to update the py26-sip and py26-pyqt4 ports to the latest version. The latest versions are needed for full support of qt 4.7. That might solve this problem. I'll try to get to it today unless someone else does it.

Thanks for everything!

comment:14 Changed 3 years ago by gius.dima@…

I have the same problem with py26-pyqt4 and py27-pyqt4 on Leopard 10.6.4 and MacPorts 1.9.2 Thanks

comment:15 Changed 3 years ago by and.damore@…

  • Cc gius.dima@… added

comment:16 Changed 3 years ago by michaelld@…

If I start 'top' running in 1 xterm, and then do "sudo port install py26-pyqt4" then after a few seconds I see 'Python' running at around 90%, just running and running. So, yes, it looks like there is a "neverending loop" issue going on. Maybe upgrading to 2.8.1 will do the trick?

comment:17 Changed 3 years ago by michaelld@…

Ug; looks like I introduced this issue when I added in support for CCACHE. SIP goes into an infinite loop in sip config.py in the loop between lines 2452:2506, adding in $(CCACHE) to some list time and again. Let me see what I can figure out for correcting SIP's behavior.

comment:18 Changed 3 years ago by michaelld@…

"added CCACHE" -> added CCACHE to Qt4's mkspecs files.

comment:19 Changed 3 years ago by michaelld@…

So the issue is that the SIP python code is creating a table of "X = Y" variables found in the QMake spec files being used (in this case, mac-g++). The SIP code does handle "X += Z" (appending), but it does not handle "X = Z $$X" (prepending) -- the latter just overwrites any previous "X =" value. So, I'm creating a patch to handle the prepending case, with some sense of robustness hopefully. I'll check it in tomorrow.

The infinite loop is caused because the original "QMAKE_CXX = /usr/bin/g++-4.2" is overwritten by "QMAKE_CXX = $(CCACHE) $$QMAKE_CXX" and then SIP does variable substitution on the $$QMAKE_CXX -> "$(CCACHE) $$QMAKE_CXX", and keeps doing this until it eventually runs out of memory.

comment:20 Changed 3 years ago by macsforever2000@…

FYI, I tried pyqt4 version 4.8.1 and I still see the problem where it hangs on configure. But it sounds like michaelld has found the problem.

comment:21 Changed 3 years ago by michaelld@…

  • Status changed from new to closed
  • Resolution set to fixed

I just checked in r73341, which modifies the pyXX-sip code to handle what I discuss above. Please give it a try & see if it works for you. I'm also updating pyXX-pyqt4 to 2.8.1, since it seems to work without further changes to the Portfile beyond the checksum. I'm closing this ticket as fixed, but please do reopen if these changes do not work for you.

comment:22 Changed 3 years ago by matteobachetti@…

It's building right now, the configure step went fine. Thank you!

Note: See TracTickets for help on using tickets.