[vtkusers] OSX 10.6 TCL issue "libvtkRendering.5.4.dylib: GC capability mismatch" ( solution too )
Bradley Lowekamp
blowekamp at mail.nih.gov
Wed Mar 3 11:06:58 EST 2010
Hello David,
My initial post below just got my non-gui script working (which was all I needed yesterday). But as you know it didn't work with my GUI ones!
What is the recommended way to build with TCL support, now?
Carbon vs Cocoa?
32vs64?
Carbon is only 32bit (but its was what was needed for TkRenderWidget), but the wish executable was running as 64, producing library incompatibilities. I ended up have to do something like the following:
arch -i386 /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Wish.app/Contents/MacOS/Wish
Thanks!
Brad
On Mar 3, 2010, at 10:43 AM, David Gobbi wrote:
> Hi Brad,
>
> The VTK 5.4/OS X 10.6 combination is known to have many problems, most
> if not all of which have been fixed in cvs. These include a boatload
> of fixes specifically for Tk, as well as link fixes to the
> CMakeLists.txt. Can you try VTK cvs on your system and report whether
> you are still seeing the problems that you describe below? There will
> be a VTK 5.6 release in (hopefully) the next few weeks that will
> include all the OS X 10.6 fixes.
>
> David
>
>
> On Wed, Mar 3, 2010 at 8:00 AM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
>> Hello,
>> I was getting the following error:
>>> $ wish
>> % package require vtk
>> dlopen(~/local/lib/vtk-5.4/libvtkRenderingTCL.dylib, 10): Library not
>> loaded: libvtkRendering.5.4.dylib
>> Referenced from: ~/local/lib/vtk-5.4/libvtkRenderingTCL.dylib
>> Reason: no suitable image found. Did find:
>> libvtkRendering.5.4.dylib: GC capability mismatch
>> attempt to provide package vtkRenderingTCL 5.4 failed: no version of package
>> vtkRenderingTCL provided
>> attempt to provide package vtkrendering 5.4 failed: no version of package
>> vtkrendering provided
>> attempt to provide package vtk 5.4 failed: no version of package vtk
>> provided
>> The solution was to define the following CMake variable:
>> -D VTK_REQUIRED_OBJECTCXX_FLAGS:STRING=-fobjc-gc
>> I tried many different combinations of deployment targets, architecture, and
>> cocoa vs carbon. In the end I have gotten it working for "i386;x86_64", the
>> default 10.6 deployment target, cocoa, and tcl enabled.
>> I am not a OBJC expert but it appears that with the Apple Snow Leopard
>> (10.6) this flag may be needed for objc libraries for Garbage Collection
>> compatibility. ( I wish google was smart enough to do a better job with two
>> character searches "GC" ) I discovered the compatibility issue with the
>> Tcl/Tk library, the question remains what other libraries will this also be
>> a problem with?
>>
>> =Solution? =
>> The -fobjc-gc should be added to the default OBJC arguments for the
>> appropriate OS versions..
>> From: http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-Xcode/
>> The Objective-C Garbage Collection setting enables compiling and linking
>> Objective-C code for automatic garbage collection. It has three states:
>> Unsupported disables garbage collection; Required (-fobjc-gc-only) will
>> create an executable that runs only on Mac OS X 10.5 and later and will
>> always run garbage collected; and Supported (-fobjc-gc) will create an
>> executable that can run either garbage collected or not, depending on how
>> the user chooses to launch it or, in the case of libraries and frameworks,
>> whether the invoking application is using garbage collection.
>> I am running cmake 2.6. But cmake appears not to even support the flags
>> correctly:
>> http://public.kitware.com/Bug/view.php?id=4756
>> So likely the easies solution would be just to handle this inside VTK
>> CMakeLists.txt
>> Thanks,
>> Brad
>>
>> ========================================================
>>
>> Bradley Lowekamp
>>
>> Lockheed Martin Contractor for
>>
>> Office of High Performance Computing and Communications
>>
>> National Library of Medicine
>>
>> blowekamp at mail.nih.gov
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100303/22b90954/attachment.htm>
More information about the vtkusers
mailing list