I decided to document problems that I encountered when trying to compile relatively recent QtCreator under Mac OS X 10.5.8, the last OS X available for PowerPC. I assume that XCode 3.1.4 (the last one available for the OS) is installed on the machine (as of now, you can still download it at Apple ADC site - search for "3.1.4" on Developer Tools page).
Since the team behind Qt does not support PowerPC OS X anymore, everything (including Qt SDK) needs to be build from sources. If you have installed (like I did, having been mislead by "universal binaries" notion, which seem to mean x86/x64 "universality" only) pre-built SDK, you'll need to get rid of it with
/Developer/Tools/uninstall-qt.py script (needs root) first.
I recommend picking most resent snapshot of Qt, or you may not be able to build the latest versions of QtCreator - I picked Qt 4.7.3 source tarball and was not able to compile QtCreator 2.3, let alone master branch, which both require minimum 4.7.4. Given that patch releases of the library are supposed to be forward compatible both on source and binary level, this looks like an arbitrary requirement.
Building Qt is straightforward
./configure && make, then install and update PATH. It takes 498 minutes (about 8 hours) to build on dual G5 @ 2Ghz. By default, Qt libraries will be compiled 32 bit PowerPC-only unless you explicitly pass other
-universal flags to
configure. You don't have to do that, if you don't plan to run your Qt applications on x86 Macs, although project files found in the wild may be (and certainly will be, given prevalence of x86) set up to create binaries for other architectures (and will thus fail to link).
QtCreator is actually set up like that, so if you are seeing error messages about missing symbols (e.g.
qt_assert()) or files being "not of required architecture", just remove the offending architecture(s) from
CONFIG variable in qtcreator.pri file (or rebuild the libraries to be universal).
Here comes a major disappointment: toolchain shipped with XCode 3.1.4 is buggy and cannot build recent versions of QtCreator, at least 2.2.1. This applies both to Apple's 4.0.1 GCC as well as 'experimental' Apple's 4.2 GCC. Particularly,
ld crashes with 'Bus error' when linking
libDebugger, an essential (and very fat!) plugin for QtCreator.
This seems to be an old error which occasionally happens even with toolchain shipped with XCode 4. This probably means that building newer version of Apple's toolchain from source is not going to remedy this. One can perhaps debug 3.1.4 toolchain, but this was too much for me and I gave up, picking QtCreator 2.0.1, which can be successfully built by it.
Another 'gotcha': when creating a build directory for out-of-source-tree build as suggested in
README, make sure that it is sibling to source directory (e.g. if sources are in ~/projects/qtcreator, then choose ~/projects/qtcreator-build). Because of a known, nasty and almost impossible to fix bug of qmake, you will get errors about missing headers otherwise.
Don't forget to remove 'x86' platform from project file as described above and you are all set. After 52 minutes (on dual G5 @ 2Hz), QtCreator is built and fully functional. From build directory, you may:
cp bin/Qt\ Creator.app /Applications/QtCreator.app
(I prefer not to have spaces in file names) and then run it from Finder or, as any other .app file, launch from commandline using: