<div class="gmail_quote">Hi,<div><br></div><div>I just upgraded to Max OS X 10.8.2 (mountain lion) and I'm trying to compile VTK with python wrapping, using the Enthought Python distribution (EPD). I have done this in the past many times with no issues. But now the linker (on the command line) is requesting a symbol that is defined in system python but not EPD, making the compilation fail.  </div>

<div><br></div><div>This symbol "-u _PyMac_Error" wasn't ever needed by VTK before, and removing it from the linker line here:</div><div>VTK-build/Wrapping/Python/CMakeFiles/vtkpython.dir/link.txt</div><div>

fixes the problem as far as I can see (compilation works fine and I can import vtk into python and make objects).</div><div><br></div><div>Is there some reason that this "-u _PyMac_Error" is needed now? Can this be changed in a better way in CMake files somewhere? </div>

<div><br></div><div>Any suggestions are appreciated. Build errors and the results of nm are below. I'm using a VTK checkout from this afternoon using git clone git://<a href="http://vtk.org/VTK.git">vtk.org/VTK.git</a>. The machine is OS X 10.8.2. I have the latest Xcode.</div>
<div><br></div><div>Thanks!</div>
<div>--Lauren</div>
<div><br></div><div>ERROR</div><div>-------------</div><div><div>Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)</div><div>Target: x86_64-apple-darwin12.2.0</div><div>Thread model: posix</div>


<div>
 "/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0 -u _PyMac_Error -o ../../bin/vtkpython -search_paths_first -headerpad_max_install_names CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o /Library/Frameworks/EPD64.framework/Versions/Current/lib/libpython2.7.dylib ../../lib/libvtksys-6.0.1.dylib ../../lib/libvtkCommonCore-6.0.1.dylib /usr/lib/libutil.dylib ../../lib/libvtksys-6.0.1.dylib -lstdc++ -lSystem /usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.osx.a</div>



<div>[  8%] Scanning dependencies of target vtkCommonSystemCxxTests</div><div>Scanning dependencies of target vtkhdf5</div><div>Built target vtkWrappingPython</div><div>Scanning dependencies of target vtkCommonMisc</div>


<div>
Linking C shared library ../../../lib/libvtktiff-6.0.dylib</div><div>Scanning dependencies of target vtkCommonTransforms</div><div>Undefined symbols for architecture x86_64:</div><div>  "_PyMac_Error", referenced from:</div>



<div>     -u command line option</div><div>ld: symbol(s) not found for architecture x86_64</div><div>clang: error: linker command failed with exit code 1 (use -v to see invocation)</div><div>make[2]: *** [bin/vtkpython] Error 1</div>



<div>make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2</div><div>make[1]: *** Waiting for unfinished jobs....</div></div><div><br></div><div>_PyMac_Error symbol</div><div>-----------------------------------</div>



<div>If I check the libraries, the system python defines it but the EPD python does not define this symbol (and neither did previous EPD versions that pre OS X 10.8 and clang worked fine with VTK)</div><div><br></div><div>
<div>brage:~ odonnell$ nm /Library/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib | grep PyMac_Error</div>


<div>0011a1f0 T _PyMac_Error</div><div>00102890 T _PyMac_Error</div></div><div><div>brage:~ odonnell$ nm /Library/Frameworks/EPD64.framework/Versions/Current/lib/libpython2.7.dylib  | grep PyMac_Error</div><div>brage:~ odonnell$ </div>



</div><div><br></div><div><br></div>
</div><br>