<div dir="ltr">Hi David,<div><br></div><div>I'm still struggling to get this build to work. I pointed the CMakeCache.txt at the correct header and library directories (for tk 8.5), but it persisted in setting:</div><div><br></div><div>TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.6</div><div><br></div><div>i.e. for version 8.6. In the end I manually set TK_INTERNAL_PATH so that it pointed at tk 8.5.</div><div><br></div><div>The settings in my CMakeCache.txt are therefore:</div><div><br></div><div>







<p class="">//Path to a file.</p>
<p class="">TCL_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers</p>
<p class="">//Path to a library.</p>
<p class="">TCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework</p>
<p class="">//Path to a program.</p>
<p class="">TCL_TCLSH:FILEPATH=/usr/bin/tclsh</p>
<p class="">//Path to a file.</p>
<p class="">TK_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers</p>
<p class="">//The path to the Tk internal headers (tkMacOSXDefault.h).</p>
<p class="">TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5</p>
<p class="">//Path to a library.</p>
<p class="">TK_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework</p><p class=""><br></p><p class="">and just for reference, a long-listing of the tk.framework/Versions directory shows:</p><p class="">







</p><p class="">Current -> 8.5</p><p class=""><br></p><p class="">i.e. I'm pretty certain I should be using 8.5.</p><p class=""><br></p><p class="">If I now run the make, it dies as follows:</p><p class=""><br></p><p class="">[ 59%] Building CXX object Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o</p><p class="">cd /opt/VTK-6.1.0/build/Rendering/Tk && /usr/bin/c++   -DVTK_IN_VTK -DvtkRenderingPythonTkWidgets_EXPORTS -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fPIC -I/opt/VTK-6.1.0/build/Interaction/Image -I/opt/VTK-6.1.0/Interaction/Image -I/opt/VTK-6.1.0/build/Imaging/Color -I/opt/VTK-6.1.0/Imaging/Color -I/opt/VTK-6.1.0/build/Imaging/Core -I/opt/VTK-6.1.0/Imaging/Core -I/opt/VTK-6.1.0/build/Common/ExecutionModel -I/opt/VTK-6.1.0/Common/ExecutionModel -I/opt/VTK-6.1.0/build/Common/DataModel -I/opt/VTK-6.1.0/Common/DataModel -I/opt/VTK-6.1.0/build/Common/Math -I/opt/VTK-6.1.0/Common/Math -I/opt/VTK-6.1.0/build/Common/Core -I/opt/VTK-6.1.0/Common/Core -I/opt/VTK-6.1.0/build/Utilities/KWSys -I/opt/VTK-6.1.0/Utilities/KWSys -I/opt/VTK-6.1.0/build/Common/Misc -I/opt/VTK-6.1.0/Common/Misc -I/opt/VTK-6.1.0/build/Common/System -I/opt/VTK-6.1.0/Common/System -I/opt/VTK-6.1.0/build/Common/Transforms -I/opt/VTK-6.1.0/Common/Transforms -I/opt/VTK-6.1.0/build/Interaction/Style -I/opt/VTK-6.1.0/Interaction/Style -I/opt/VTK-6.1.0/build/Filters/Extraction -I/opt/VTK-6.1.0/Filters/Extraction -I/opt/VTK-6.1.0/build/Filters/Core -I/opt/VTK-6.1.0/Filters/Core -I/opt/VTK-6.1.0/build/Filters/General -I/opt/VTK-6.1.0/Filters/General -I/opt/VTK-6.1.0/build/Common/ComputationalGeometry -I/opt/VTK-6.1.0/Common/ComputationalGeometry -I/opt/VTK-6.1.0/build/Filters/Statistics -I/opt/VTK-6.1.0/Filters/Statistics -I/opt/VTK-6.1.0/build/Imaging/Fourier -I/opt/VTK-6.1.0/Imaging/Fourier -I/opt/VTK-6.1.0/build/ThirdParty/alglib -I/opt/VTK-6.1.0/ThirdParty/alglib -I/opt/VTK-6.1.0/build/Filters/Sources -I/opt/VTK-6.1.0/Filters/Sources -I/opt/VTK-6.1.0/build/Rendering/Core -I/opt/VTK-6.1.0/Rendering/Core -I/opt/VTK-6.1.0/build/Filters/Geometry -I/opt/VTK-6.1.0/Filters/Geometry -I/opt/VTK-6.1.0/build/Interaction/Widgets -I/opt/VTK-6.1.0/Interaction/Widgets -I/opt/VTK-6.1.0/build/Filters/Hybrid -I/opt/VTK-6.1.0/Filters/Hybrid -I/opt/VTK-6.1.0/build/Imaging/Sources -I/opt/VTK-6.1.0/Imaging/Sources -I/opt/VTK-6.1.0/build/Filters/Modeling -I/opt/VTK-6.1.0/Filters/Modeling -I/opt/VTK-6.1.0/build/Imaging/General -I/opt/VTK-6.1.0/Imaging/General -I/opt/VTK-6.1.0/build/Imaging/Hybrid -I/opt/VTK-6.1.0/Imaging/Hybrid -I/opt/VTK-6.1.0/build/IO/Image -I/opt/VTK-6.1.0/IO/Image -I/opt/VTK-6.1.0/build/Utilities/DICOMParser -I/opt/VTK-6.1.0/Utilities/DICOMParser -I/opt/VTK-6.1.0/build/IO/Core -I/opt/VTK-6.1.0/IO/Core -I/opt/VTK-6.1.0/build/ThirdParty/zlib -I/opt/VTK-6.1.0/ThirdParty/zlib -I/opt/VTK-6.1.0/build/Utilities/MetaIO/vtkmetaio -I/opt/VTK-6.1.0/build/Utilities/MetaIO -I/opt/VTK-6.1.0/Utilities/MetaIO -I/opt/VTK-6.1.0/build/ThirdParty/jpeg -I/opt/VTK-6.1.0/ThirdParty/jpeg -I/opt/VTK-6.1.0/build/ThirdParty/png -I/opt/VTK-6.1.0/ThirdParty/png -I/opt/VTK-6.1.0/build/ThirdParty/tiff -I/opt/VTK-6.1.0/ThirdParty/tiff -I/opt/VTK-6.1.0/build/Rendering/Annotation -I/opt/VTK-6.1.0/Rendering/Annotation -I/opt/VTK-6.1.0/build/Rendering/FreeType -I/opt/VTK-6.1.0/Rendering/FreeType -I/opt/VTK-6.1.0/build/ThirdParty/freetype -I/opt/VTK-6.1.0/ThirdParty/freetype -I/opt/VTK-6.1.0/ThirdParty/ftgl/src -I/opt/VTK-6.1.0/build/ThirdParty/ftgl -I/opt/VTK-6.1.0/ThirdParty/ftgl -I/opt/VTK-6.1.0/build/Rendering/Volume -I/opt/VTK-6.1.0/Rendering/Volume -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks -I/opt/VTK-6.1.0/build/Rendering/OpenGL -I/opt/VTK-6.1.0/Rendering/OpenGL -I/opt/VTK-6.1.0/build/Utilities/ParseOGLExt -I/opt/VTK-6.1.0/Utilities/ParseOGLExt -I/opt/VTK-6.1.0/build/Utilities/EncodeString -I/opt/VTK-6.1.0/Utilities/EncodeString -I/opt/VTK-6.1.0/build/ThirdParty/TclTk -I/opt/VTK-6.1.0/ThirdParty/TclTk -I/opt/VTK-6.1.0/build/Rendering/Tk -I/opt/VTK-6.1.0/Rendering/Tk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers -I/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers -I/opt/VTK-6.1.0/Wrapping/Tcl -I/opt/VTK-6.1.0/build/Wrapping/Tcl    -o CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o -c /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm</p><p class="">/opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm:57:28: error: no member named 'view' in 'TkWindowPrivate'</p><p class="">  NSView *result = macWin->view;</p><p class="">                   ~~~~~~  ^</p><p class="">1 error generated.</p><p class="">make[2]: *** [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o] Error 1</p><p class="">make[1]: *** [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/all] Error 2</p><p class="">















</p><p class="">make: *** [all] Error 2</p><p class="">If I get clang to print out the tk.h and tcl.h header files, it shows the following:</p><p class=""><br></p><p class="">







</p><p class="">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers/tcl.h</p><p class="">







</p><p class="">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers/tk.h</p><p class=""><br></p><p class="">Do you have any suggestions as to what might be going wrong here?</p><p class=""><br></p><p class="">Best wishes,</p><p class=""><br></p><p class="">Jens</p></div>







</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 September 2014 13:27, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jens,<br>
<br>
I looked through FindTCL.cmake, and it looks like it tries to match<br>
the header to the library.  Since it tries but fails, this could be<br>
considered a bug.<br>
<span class="HOEnZb"><font color="#888888"><br>
 - David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, Sep 15, 2014 at 3:21 AM, Jens <<a href="mailto:linucks42@gmail.com">linucks42@gmail.com</a>> wrote:<br>
> Hi David,<br>
><br>
> Many thanks for the quick and very helpful reply. As you suspected there was<br>
> a mismatch between the tcl/tk headers. The headers were coming from:<br>
><br>
> /usr/local/include<br>
><br>
> and the libraries from:<br>
><br>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework<br>
><br>
> I've pointed both at the /Applications/... directories and the build has now<br>
> got beyond that point, so thanks again for your help.<br>
><br>
> Would that be considered a bug in cmake, or just bad luck on my part?<br>
><br>
> I hadn't knowingly installed anything tk/tcl related on my machine (it's a<br>
> new macbook air and I've not loaded much software at all onto it), so I've<br>
> no idea where the stuff in /usr/local came from.<br>
><br>
> However, if cmake had found the include files in /usr/local, shouldn't it<br>
> also have used the related libraries in /usr/local?<br>
><br>
> Best wishes,<br>
><br>
> Jens<br>
><br>
><br>
><br>
> On 14 September 2014 22:34, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> Hi Jens,<br>
>><br>
>> If the VTK build is looking for a function called Tcl_GetErrorLine(),<br>
>> that means that it is using a "tcl.h" for Tcl 8.6.  This function doesn't<br>
>> exist in Tcl 8.5 or earlier versions of Tcl.<br>
>><br>
>> My guess is that you have installed Tcl 8.6 on your system, and<br>
>> CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5<br>
>> libraries in the System folder.<br>
>><br>
>> Make sure that your CMakeCache.txt use the same framework for<br>
>> all the Tcl variables:<br>
>><br>
>> TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers<br>
>> TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework<br>
>> TCL_TCLSH:FILEPATH=/usr/bin/tclsh<br>
>> TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers<br>
>><br>
>> TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders<br>
>> TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework<br>
>><br>
>> If you still have problems after setting your cache as shown above, then<br>
>> you might have to find and remove the tcl.h file that is causing the<br>
>> error.<br>
>><br>
>>  - David<br>
>><br>
>><br>
>> On Sun, Sep 14, 2014 at 2:57 PM, Jens <<a href="mailto:linucks42@gmail.com">linucks42@gmail.com</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX<br>
>> > 10.9.4,<br>
>> > with cmake 3.0.2 and At 5.3.1.<br>
>> ><br>
>> > The build is failing with:<br>
>> ><br>
>> > /usr/bin/c++    -g -isysroot<br>
>> ><br>
>> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk<br>
>> > -dynamiclib -Wl,-headerpad_max_install_names    -compatibility_version<br>
>> > 1.0.0<br>
>> > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib<br>
>> > -install_name /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib<br>
>> ><br>
>> > ...snip...<br>
>> ><br>
>> > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o<br>
>> > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o<br>
>> > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o<br>
>> > ../../lib/libvtkCommonCore-6.1.1.dylib ../../lib/libvtksys-6.1.1.dylib<br>
>> > -framework tcl -lm<br>
>> ><br>
>> > Undefined symbols for architecture x86_64:<br>
>> ><br>
>> >   "_Tcl_GetErrorLine", referenced from:<br>
>> ><br>
>> >       vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o<br>
>> ><br>
>> >       vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in<br>
>> > vtkTclUtil.cxx.o<br>
>> ><br>
>> > ld: symbol(s) not found for architecture x86_64<br>
>> ><br>
>> > clang: error: linker command failed with exit code 1 (use -v to see<br>
>> > invocation)<br>
>> ><br>
>> > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1<br>
>> ><br>
>> > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error 2<br>
>> ><br>
>> ><br>
>> > Can anyone suggest a workaround?<br>
>> ><br>
>> ><br>
>> > Best wishes,<br>
>> ><br>
>> ><br>
>> > Jens<br>
><br>
><br>
</div></div></blockquote></div><br></div>