Static TA library on Mac OS and objc-gc

Hello,

I have problem with compiling my Qt application with static TurboActivate on Mac OS X, because of "GC capability did not match"

It seems, that static TA library is compiled with flag, that requires GC. Unfortunately, Qt framework is not GC compatible (see an answer from Carlos Duclos in https://bugreports.qt-project.org/browse/QTBUG-12661 ).

Is it possible somehow to solve this problem? Or am I doing something wrong?

Thank you for your help.

Hey Martin,

TurboActivate requires that flag. Your choices are the following:

1. Use the static version of TurboActivate and the dynamic version of Qt

2. Use the dynamic version of TA and the static version of Qt

3. Use the static versions of both and find/report/fix the bugs in Qt.

4. Use the dynamic version of both.

Hello Sam,

I am using the first option, dynamic Qt (frameworks) and static TA. Linking an app is working, but the application crashes after opening with following error:

Application Specific Information:objc[37723]: '/<project>/bin/<name>.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore' was not compiled with -fobjc-gc or -fobjc-gc-only, but the application requires GCobjc[37723]: '/<project>/bin/<name>.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui' was not compiled with -fobjc-gc or -fobjc-gc-only, but the application requires GCobjc[37723]: *** GC capability of application and some libraries did not match

Does it mean, that we cannot use static TA with Qt?

Thanks for your help

Oh, OK, I was under the impression that you could use non-GC dylibs with GC enabled app. Apparently not. That limits your options to this:

  1. Use the dynamic version of TA and the static version of Qt
  2. Use the static versions of both and find/report/fix the bugs in Qt.
  3. Use the dynamic version of both.

Hello again,

I built and tested static version of the latest Turbo Activate (3.4.4) on Mac with the dynamic version of the latest Qt ( http://download.qt-project.org/snapshots/qt/4.8/ : snapshot 4.8.6 - 6.2.2014)

On the Mac 10.8 it is working now well!Thank you for the changes (if it was your work), or maybe something changed in the Qt.

We haven't done anything special. I guess Qt fixed their bug.

I'm running into this same issue with Qt 5.3.0 on OS X 10.8. I found several posts from Qt making it very clear that garbage collection was not going to be supported in their platform. There are a lot of things they are doing behind the scenes that interfere with standard GC, so that even if we did patch the qmake routines to have GC enabled for the objective-C compiling, it would likely cause runtime issues.

Is it possible to compile TA with the -fobjc-gc flag so that GC is not necessarily required? Any other ideas about how to work with this issue? We aren't going to use dynamic libraries for this project, so even though that would work, we are hoping for other options.

Thanks

TurboActivate is already compiled with -fobjc-gc (garbage collection supported, but not required). Can you tell me the exact error you're getting?