Opened 11 years ago

Closed 11 years ago

#40527 closed defect (fixed)

py27-pyqt4 uses the compiler provided by qt4-mac, not the MacPorts-select compiler

Reported by: srirajpaul@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc:
Port: py-pyqt4

Description

I was trying to install py27-pyqt4 on my mac. But it is failing. It looks like is having some problem with Qt. Attaching the log file.

Attachments (1)

pyqt.log (38.8 KB) - added by srirajpaul@… 11 years ago.

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by srirajpaul@…

Attachment: pyqt.log added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to michaelld@…
Port: py-pyqt4 added

The log says:

:debug:configure Using compiler 'Mac OS X Clang'

(because you must have installed Xcode 4.2)

But then:

:info:configure /usr/bin/g++-4.2 -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.6 -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -o qtdirs.o qtdirs.cpp
:info:configure make: /usr/bin/g++-4.2: No such file or directory

The port does not seem to be UsingTheRightCompiler.

gcc-4.2 is the default compiler for Snow Leopard on Xcode 3.2.6, which is what our buildbots use; presumably you got a binary of one of py-pyqt4's dependencies, and that dependency recorded what compiler it used, and is now trying to enforce that compiler choice on its dependents. I'd guess qt4-mac is the culprit, though both it and python27 record the compiler that was used.

comment:2 Changed 11 years ago by michaelld (Michael Dickens)

I'd guess it's qt4-mac too. Try the following:

sudo port -f uninstall qt4-mac
sudo port install qt4-mac [+variants]
sudo port clean py27-pyqt4
sudo port install py27-pyqt4 [+variants]

where the "[+variants]" means to add the variants you want to the install, not to literally put that string in the install command. Hopefully you just have qt4-mac installed from a prior version of Xcode, and updating it will resolve the issue for you.

I will look into allowing qt4-mac to use the right compiler; I think we've talked about this in the past, but I don't remember ever actually implementing anything. Luckily, issues such as yours do not come up very often.

comment:3 in reply to:  2 Changed 11 years ago by srirajpaul@…

I tried the 4 commands. It didnt work. Still it failed. For the [+variants] part I left it blank.

comment:4 Changed 11 years ago by michaelld (Michael Dickens)

Interesting. When you did "sudo port install qt4-mac" did it load from binary again, or compile from source? If the former, can you do:

sudo port -f uninstall qt4-mac
sudo port -s install qt4-mac
sudo port clean py27-pyqt4
sudo port install py27-pyqt4

and hopefully that will do the trip. The "install qt4-mac" command will take quite a long time; sorry.

comment:5 in reply to:  4 Changed 11 years ago by srirajpaul@…

Thank you. It worked after giving the -s option.

comment:6 Changed 11 years ago by michaelld (Michael Dickens)

Summary: py27-pyqt4 installation failing on snowleopardpy27-pyqt4 uses the compiler provided by qt4-mac, not the MacPorts-select compiler

Thanks for reporting back; I'm glad that works. PyQt4 is still not using the right compiler, so I'm leaving this ticket open as a reminder to myself to fix it.

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

Resolution: fixed
Status: newclosed

Fixed in r111812.

Note: See TracTickets for help on using tickets.