Building 32 Bit QT on OSX10.8
I'm trying to build a 32 bit version of QT4.8.4 on my OSX 10.8 machine. I need this version to work on OSX 10.7+, so I'm trying to set the MacOS SDK to the one for 10.7 . When linking, QtWebkit seems to not be respecting this sdk:
Undefined symbols for architecture i386:
"_kCFURLRequestAllowAllPOSTCaching", referenced from:
_WKCFURLRequestAllowAllPostCaching in libWebKitSystemInterfaceMountainLion.a(WebKitSystemInterface.o)
ld: symbol(s) not found for architecture i386
I believe it should be linking libWebKitSystemInterfaceLion.a when using the 10.7 SDK. To make the build do this on an OSX 10.8 machine , QMAKE_MAC_SDK would need to be set to the path to the 10.7 SDK. I don't believe this is being set.
How can I configure a QT build such that QMAKE_MAC_SDK is set to the correct path?
SDKs are backwards-compatible. When building, usually the newest one is used, only set to work in 10.7 mode.
The standard configure flag is -sdk. You can export QMAKE_MAC_SDK by hand in terminal, if you wish. Do you need WebKit in your app, by the way? Maybe the solution would be just to pass -no-webkit.
Sadly I do need webkit in my app.
As for the backward compatible bit, I built using the 10.8 SDK ( a default build with the exception of targeting 32-bit). When run on a 10.7 or 10.6 machine, QtWebkit is having a lot of trouble finding frameworks. A few system frameworks have been moved around in OSX10.8, and these moved frameworks are not found in 10.7.
Is there another switch I can use to solve my dynamic linking issues? I tried using install_name_tool to change things around, but it was futile due to the number of issues.
Sorry, I don't know. I had a ton of problems with 10.8, but not in WebKit. Some linking problems were solved when I forced the environment to use g++ as a linker instead od ld (I know it sounds crazy, but works. g++ translates some of the linking flags that ld does not understand). This error looks different, though.
You can try passing 10.7 SDK path as -sysroot and -isysroot flags to both the compiler and linker.
Use a patch from https://bugreports.qt-project.org/browse/QTBUG-29829