[PyQt] Installing PyQT on a Mac 10.5.8 PPC

Hans-Peter Jansen hpj at urpla.net
Wed Aug 18 20:56:36 BST 2010

On Wednesday 18 August 2010, 20:51:45 bestenborstel wrote:
> Dear List,
> I apologise if this question has been already asked, however I could
> not google a solution.
> I would like to install Spyder on my Mac PPC 10.5.8.
Ah, fossil Mac computing ;-) Welcome to the club...

> I installed today first Qt Carbon 4.6.3 via the installer. Worked fine.
> I installed Sip 4.10.5 according to the manual. Worked fine.
> I tried to install PyQt 4.7.4 Mac version.
> Python configure.py does not work.
> Output:
> make -f qtdirs.mk
> g++ -c -pipe -g -gdwarf-2 -arch i386 -Wall -W -DQT_CORE_LIB -
> DQT_SHARED -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/
> Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -
> I/usr/include -I. -F/Library/Frameworks -o qtdirs.o qtdirs.cpp
> g++ -headerpad_max_install_names -arch i386 -o qtdirs.app/Contents/
> MacOS/qtdirs qtdirs.o   -F/Library/Frameworks -L/Library/Frameworks -
> framework QtCore
> ld: can't write output file: qtdirs.app/Contents/MacOS/qtdirs
> collect2: ld returned 1 exit status
> make: *** [qtdirs.app/Contents/MacOS/qtdirs] Error 1
> qtdirs.app/Contents/MacOS/qtdirs
> /bin/sh: qtdirs.app/Contents/MacOS/qtdirs: Bad CPU type in executable
> Error: qtdirs.app/Contents/MacOS/qtdirs failed to create qtdirs.out.
> Make sure
> your Qt v4 installation is correct.

You have a permission problem in your build tree (qtdirs is a small command 
line tool, that PyQt creates in order to query the paths of the Qt build).

You should extract the tar ball with the same user, you're building PyQt.
BTW, you missed to mention the arguments you gave to configure.py.

> I am on a PPC arch. Why does this g++ suggest i386 always for the make
> file qtdirs.mk?

You might have failed to provide the correct build parameter to sip and 

This is a pretty conservative build (depending on the mess of your build 
host, you might need other parameter as well (as noted by William)):


cd sip-xxx

python configure.py -n -s $SDK CFLAGS+="$CFLAGS" CXXFLAGS+="$CXXFLAGS" \ 
make -j4

cd ../PyQt-xxx

python configure.py CFLAGS+="$CFLAGS" CXXFLAGS+="$CXXFLAGS" \ 
make -j4

Good luck,

P.S.: You can hire me!

More information about the PyQt mailing list