[vtkusers] Qt+VTK on OSX: illegal hardware instruction

Sean McBride sean at rogue-research.com
Tue Mar 5 10:59:45 EST 2013


On Tue, 5 Mar 2013 15:10:22 +0100, Sensei said:

>'/Applications/Development/qt/Desktop/Qt/4.8.1/gcc/lib/
>QtWebKit.framework/Versions/4/QtWebKit' 
>was not compiled with -fobjc-gc or -fobjc-gc-only, but the application 
>requires GC
>objc[4039]: *** GC capability of application and some libraries did not 
>match
>zsh: illegal hardware instruction 
>./SimpleView.app/Contents/MacOS/SimpleView

On OS X, an application can be garbage collected or not, and this choice is per-process.  Any libraries linked into an executable must therefore be built with the correct garbage collection flag.  Library code, like VTK or indeed Cocoa.framework itself, needs to be prepared to work with both GC and non-GC apps; for this reason, by default, VTK is built with -fobjc-gc which indicates that it is 'GC ready, but not GC-required'.  (-fobjc-gc-only means 'GC required').

Somehow, somewhere, you have a mismatch of GC flags in one or more of the libraries your application links to.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list