[CMake] Problems building VTK on an Intel Mac with Python 2.5
Jens Thomas
j.m.h.thomas at dl.ac.uk
Thu May 10 11:21:20 EDT 2007
Hi,
I'm trying to build a universal binary version of VTK on an Intel Mac
including the Python and Tcl/Tk wrappers (as I require it for an
application that uses Tkinter).
I'm using a fresh checkout from CVS for VTK,
cmake-2.4.6-Darwin-universal and a version of python 2.5 that I built
myself (configuring the code with: --enable-universalsdk).
The build goes fine, building universal objects as requested until it
tries to build the file libvtkCommonPythonD.5.1.0.dylib
It then falls over with the error:
ld: common symbols not allowed with MH_DYLIB output format with the
-multi_module option
According to what I found at:
http://gcc.gnu.org/ml/gcc/2005-06/msg00186.html
I was able to fix this by cutting and pasting the line that was used to
make the object and appending "-single_module" to the flags passed to
the linker. I then re-ran make, but I now keep hitting the error:
[ 6%] Built target vtkCommonPythonD
make -f Common/CMakeFiles/vtkCommonPython.dir/build.make
Common/CMakeFiles/vtkCommonPython.dir/depend
make[2]: Nothing to be done for
`Common/CMakeFiles/vtkCommonPython.dir/depend'.
make -f Common/CMakeFiles/vtkCommonPython.dir/build.make
Common/CMakeFiles/vtkCommonPython.dir/build
make[2]: *** No rule to make target `bin/libvtkCommonPythonD.dylib',
needed by `bin/libvtkCommonPython.so'. Stop.
make[1]: *** [Common/CMakeFiles/vtkCommonPython.dir/all] Error 2
make: *** [all] Error 2
The same build (i.e. same VTK source code and CMake binary) works fine
when building against the Framework Python (2.3) supplied with the Mac.
I'm usually o.k at debugging Makefiles, but CMake is a bit beyond me and
I can't work out how to satisfy the dependency. The Makefile where the
error occurs, appears to differ (substantially) only in that the failing
one has the additional dependancy:
bin/libvtkCommonPython.so:
/Users/jmht/ccp1gui_app/python2.5/lib/python2.5/config/libpython2.5.a
but I'm not sure how to follow this up.
I'd be most grateful if anyone has any suggestions as to how I can go
about fixing this.
Best wishes,
Jens
csemac02:~/ccp1gui_app/vtk jmht$ diff
{vtk,vtk_py2.5}/Common/CMakeFiles/vtkCommonPython.dir/build.make
40c40
< CMAKE_BINARY_DIR = /Users/jmht/ccp1gui_app/vtk/vtk
---
> CMAKE_BINARY_DIR = /Users/jmht/ccp1gui_app/vtk/vtk_py2.5
54c54
< $(CMAKE_COMMAND) -E cmake_progress_report
/Users/jmht/ccp1gui_app/vtk/vtk/CMakeFiles $(CMAKE_PROGRESS_1)
---
> $(CMAKE_COMMAND) -E cmake_progress_report
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/CMakeFiles $(CMAKE_PROGRESS_1)
56c56
< /usr/bin/c++ $(CXX_FLAGS) -o
Common/CMakeFiles/vtkCommonPython.dir/vtkCommonPythonInit.o -c
/Users/jmht/ccp1gui_app/vtk/vtk/Common/vtkCommonPythonInit.cxx
---
> /usr/bin/c++ $(CXX_FLAGS) -o
Common/CMakeFiles/vtkCommonPython.dir/vtkCommonPythonInit.o -c
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common/vtkCommonPythonInit.cxx
60c60
< /usr/bin/c++ $(CXX_FLAGS) -E
/Users/jmht/ccp1gui_app/vtk/vtk/Common/vtkCommonPythonInit.cxx >
Common/CMakeFiles/vtkCommonPython.dir/vtkCommonPythonInit.i
---
> /usr/bin/c++ $(CXX_FLAGS) -E
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common/vtkCommonPythonInit.cxx >
Common/CMakeFiles/vtkCommonPython.dir/vtkCommonPythonInit.i
64c64
< /usr/bin/c++ $(CXX_FLAGS) -S
/Users/jmht/ccp1gui_app/vtk/vtk/Common/vtkCommonPythonInit.cxx -o
Common/CMakeFiles/vtkCommonPython.dir/vtkCommonPythonInit.s
---
> /usr/bin/c++ $(CXX_FLAGS) -S
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common/vtkCommonPythonInit.cxx -o
Common/CMakeFiles/vtkCommonPython.dir/vtkCommonPythonInit.s
75c75
< $(CMAKE_COMMAND) -E cmake_progress_report
/Users/jmht/ccp1gui_app/vtk/vtk/CMakeFiles $(CMAKE_PROGRESS_2)
---
> $(CMAKE_COMMAND) -E cmake_progress_report
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/CMakeFiles $(CMAKE_PROGRESS_2)
77c77
< cd /Users/jmht/ccp1gui_app/vtk/vtk/Common &&
../bin/vtkWrapPythonInit
/Users/jmht/ccp1gui_app/vtk/vtk/Common/vtkCommonPythonInit.data
/Users/jmht/ccp1gui_app/vtk/vtk/Common/vtkCommonPythonInit.cxx
---
> cd /Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common &&
../bin/vtkWrapPythonInit
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common/vtkCommonPythonInit.data
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common/vtkCommonPythonInit.cxx
83c83
< cd /Users/jmht/ccp1gui_app/vtk/vtk && $(CMAKE_COMMAND) -E
cmake_depends "Unix Makefiles" /Users/jmht/ccp1gui_app/vtk/VTK_cvs
/Users/jmht/ccp1gui_app/vtk/VTK_cvs/Common
/Users/jmht/ccp1gui_app/vtk/vtk /Users/jmht/ccp1gui_app/vtk/vtk/Common
/Users/jmht/ccp1gui_app/vtk/vtk/Common/CMakeFiles/vtkCommonPython.dir/DependInfo.cmake
---
> cd /Users/jmht/ccp1gui_app/vtk/vtk_py2.5 && $(CMAKE_COMMAND) -E
cmake_depends "Unix Makefiles" /Users/jmht/ccp1gui_app/vtk/VTK_cvs
/Users/jmht/ccp1gui_app/vtk/VTK_cvs/Common
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common/CMakeFiles/vtkCommonPython.dir/DependInfo.cmake
93a94
> bin/libvtkCommonPython.so:
/Users/jmht/ccp1gui_app/python2.5/lib/python2.5/config/libpython2.5.a
97,98c98,99
< cd /Users/jmht/ccp1gui_app/vtk/vtk/Common && $(CMAKE_COMMAND) -P
CMakeFiles/vtkCommonPython.dir/cmake_clean_target.cmake
< cd /Users/jmht/ccp1gui_app/vtk/vtk/Common && $(CMAKE_COMMAND) -E
cmake_link_script CMakeFiles/vtkCommonPython.dir/link.txt
--verbose=$(VERBOSE)
---
> cd /Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common &&
$(CMAKE_COMMAND) -P CMakeFiles/vtkCommonPython.dir/cmake_clean_target.cmake
> cd /Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common &&
$(CMAKE_COMMAND) -E cmake_link_script
CMakeFiles/vtkCommonPython.dir/link.txt --verbose=$(VERBOSE)
106c107
< cd /Users/jmht/ccp1gui_app/vtk/vtk/Common && $(CMAKE_COMMAND) -P
CMakeFiles/vtkCommonPython.dir/cmake_clean.cmake---
> cd /Users/jmht/ccp1gui_app/vtk/vtk_py2.5/Common &&
$(CMAKE_COMMAND) -P CMakeFiles/vtkCommonPython.dir/cmake_clean.cmake
More information about the CMake
mailing list