This is an update to my previous “Building Qt-4.8.6 x64 on OS X 10.10 with Xcode 6.x so that it works on OS X 10.6+” with the small difference that I don’t try to support 10.6 anymore (it might still work?). Also note that openssl has been deprecated for a while on Mac OS X and the OS X 10.11 SDK does not ship with the openssl headers anymore. Therefor, openssl support will be disabled by default when you compile with Xcode 7. I have a workaraound for that to restore openssl support.
I set up 3 folders:
- qt-4.8.7-src (the Qt 4.8.7 source code)
- qt-4.8.7-build (empty folder where we’re going to build)
- qt-patches (clone of https://github.com/sandym/qt-patches)
Steps:
> cd qt-4.8.7-src > patch -p1 < ../qt-patches/qt-4.8.7-mac.patch > cd ../qt-4.8.7-build > export PATH=/usr/bin:/bin:/usr/sbin:/sbin > ../qt-4.8.7-src/configure -debug-and-release -nomake examples -no-qt3support -prefix /usr/local/Qt-4.8.7 -arch x86_64 -I "$PWD/../qt-patches/mac_openssl_include"
Notes:
- the extra include path just point to the openssl headers, now missing from the system.
- not all examples build, so I disable them.
Build and install:
> make -j3 > sudo make install
Done!