<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello David,<div><br></div><div>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!</div><div><br></div><div>What is the recommended way to build with TCL support, now?</div><div><br></div><div>Carbon vs Cocoa?</div><div><br></div><div>32vs64?</div><div><br></div><div>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:</div><div><br></div><div>arch -i386 /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Wish.app/Contents/MacOS/Wish&nbsp;</div><div><br></div><div><br></div><div>Thanks!</div><div>Brad</div><div><br><div><div>On Mar 3, 2010, at 10:43 AM, David Gobbi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Brad,<br><br>The VTK 5.4/OS X 10.6 combination is known to have many problems, most<br>if not all of which have been fixed in cvs. &nbsp;These include a boatload<br>of fixes specifically for Tk, as well as link fixes to the<br>CMakeLists.txt. &nbsp;Can you try VTK cvs on your system and report whether<br>you are still seeing the problems that you describe below? &nbsp;There will<br>be a VTK 5.6 release in (hopefully) the next few weeks that will<br>include all the OS X 10.6 fixes.<br><br> &nbsp;&nbsp;David<br><br><br>On Wed, Mar 3, 2010 at 8:00 AM, Bradley Lowekamp &lt;<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>&gt; wrote:<br><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite">I was getting the following error:<br></blockquote><blockquote type="cite"><blockquote type="cite">$ wish<br></blockquote></blockquote><blockquote type="cite">% package require vtk<br></blockquote><blockquote type="cite">dlopen(~/local/lib/vtk-5.4/libvtkRenderingTCL.dylib, 10): Library not<br></blockquote><blockquote type="cite">loaded: libvtkRendering.5.4.dylib<br></blockquote><blockquote type="cite">&nbsp;&nbsp;Referenced from: ~/local/lib/vtk-5.4/libvtkRenderingTCL.dylib<br></blockquote><blockquote type="cite">&nbsp;&nbsp;Reason: no suitable image found. &nbsp;Did find:<br></blockquote><blockquote type="cite">libvtkRendering.5.4.dylib: GC capability mismatch<br></blockquote><blockquote type="cite">attempt to provide package vtkRenderingTCL 5.4 failed: no version of package<br></blockquote><blockquote type="cite">vtkRenderingTCL provided<br></blockquote><blockquote type="cite">attempt to provide package vtkrendering 5.4 failed: no version of package<br></blockquote><blockquote type="cite">vtkrendering provided<br></blockquote><blockquote type="cite">attempt to provide package vtk 5.4 failed: no version of package vtk<br></blockquote><blockquote type="cite">provided<br></blockquote><blockquote type="cite">The solution was to define the following CMake variable:<br></blockquote><blockquote type="cite">-D VTK_REQUIRED_OBJECTCXX_FLAGS:STRING=-fobjc-gc<br></blockquote><blockquote type="cite">I tried many different combinations of deployment targets, architecture, and<br></blockquote><blockquote type="cite">cocoa vs carbon. In the end I have gotten it working for "i386;x86_64", the<br></blockquote><blockquote type="cite">default 10.6 deployment target, cocoa, and tcl enabled.<br></blockquote><blockquote type="cite">I am not a OBJC expert but it appears that with the Apple Snow Leopard<br></blockquote><blockquote type="cite">(10.6) this flag may be needed for objc libraries for Garbage Collection<br></blockquote><blockquote type="cite">compatibility. ( I wish google was smart enough to do a better job with two<br></blockquote><blockquote type="cite">character searches "GC" ) I discovered the compatibility issue with the<br></blockquote><blockquote type="cite">Tcl/Tk library, the question remains what other libraries will this also be<br></blockquote><blockquote type="cite">a problem with?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">=Solution? =<br></blockquote><blockquote type="cite">The&nbsp;-fobjc-gc should be added to the default OBJC arguments for the<br></blockquote><blockquote type="cite">appropriate OS versions..<br></blockquote><blockquote type="cite">From:&nbsp;<a href="http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-Xcode/">http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-Xcode/</a><br></blockquote><blockquote type="cite">The&nbsp;Objective-C Garbage Collection&nbsp;setting enables compiling and linking<br></blockquote><blockquote type="cite">Objective-C code for automatic garbage collection. It has three states:<br></blockquote><blockquote type="cite">Unsupported disables garbage collection; Required (-fobjc-gc-only) will<br></blockquote><blockquote type="cite">create an executable that runs only on Mac OS X 10.5 and later and will<br></blockquote><blockquote type="cite">always run garbage collected; and Supported (-fobjc-gc) will create an<br></blockquote><blockquote type="cite">executable that can run either garbage collected or not, depending on how<br></blockquote><blockquote type="cite">the user chooses to launch it or, in the case of libraries and frameworks,<br></blockquote><blockquote type="cite">whether the invoking application is using garbage collection.<br></blockquote><blockquote type="cite">I am running cmake 2.6. But cmake appears not to even support the flags<br></blockquote><blockquote type="cite">correctly:<br></blockquote><blockquote type="cite"><a href="http://public.kitware.com/Bug/view.php?id=4756">http://public.kitware.com/Bug/view.php?id=4756</a><br></blockquote><blockquote type="cite">So likely the easies solution would be just to handle this inside VTK<br></blockquote><blockquote type="cite">CMakeLists.txt<br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Brad<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">========================================================<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Bradley Lowekamp<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Lockheed Martin&nbsp;Contractor for<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Office of High Performance Computing and Communications<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">National Library of Medicine<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Powered by <a href="http://www.kitware.com">www.kitware.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visit other Kitware open-source projects at<br></blockquote><blockquote type="cite"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please keep messages on-topic and check the VTK FAQ at:<br></blockquote><blockquote type="cite"><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote><blockquote type="cite"><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">========================================================</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Bradley Lowekamp<span class="Apple-converted-space">&nbsp;</span><span class="Apple-converted-space">&nbsp;</span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-family: Arial; "><span class="Apple-style-span" style="font-family: Arial; ">Lockheed Martin&nbsp;</span></span></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Contractor for</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Office of High Performance Computing and Communications</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">National Library of Medicine<span class="Apple-converted-space">&nbsp;</span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span>
</div>
<br></div></body></html>