Open GoogleCodeExporter opened 9 years ago
it seems that you are not using the same architecture than the one used by your
python.
You can use
file /usr/bin/python
to know which architecture is used on your system, and force it in cmake by
using the option -m32 or -m64 in CMAKE_C_FLAGS and CMAKE_CXX_FLAGS.
Original comment by gaetan.l...@gmail.com
on 6 Jun 2011 at 7:55
I ran into a similar problem with a different file. I'm using CentOS 64 bit
version, and I used file /usr/bin/python to check its build (64bit). I added
-fPIC and -m64 to both CMAKE_CXX_FLAGS and CMAKE_C_FLAGS, but did not solve the
problem.
..................................
[ 24%] Building CXX object
Code/Numerics/FEM/CMakeFiles/ITKFEM.dir/itkFEMUtility.o
[ 24%] Building CXX object
Code/Numerics/FEM/CMakeFiles/ITKFEM.dir/itkFEMInitialization.o
[ 24%] Building C object Code/Numerics/FEM/CMakeFiles/ITKFEM.dir/dsrc2c.o
Linking CXX shared library ../../../bin/libITKFEM.so
[ 24%] Built target ITKFEM
[ 24%] Built target install_wrapitk_compatibility
[ 24%] Generating swigrun.xml
[ 24%] Generating swigrunPython.cxx
Scanning dependencies of target SwigRuntimePython
[ 24%] Building CXX object
Wrapping/WrapITK/SwigRuntime/CMakeFiles/SwigRuntimePython.dir/swigrunPython.o
Linking CXX shared library ../../../bin/libSwigRuntimePython.so
/usr/bin/ld: /home/lwei/software/lib/libpython2.7.a(abstract.o): relocation
R_X86_64_32 against `a local symbol' can not be used when making a shared
object; recompile with -fPIC
/home/lwei/software/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [bin/libSwigRuntimePython.so] Error 1
make[1]: ***
[Wrapping/WrapITK/SwigRuntime/CMakeFiles/SwigRuntimePython.dir/all] Error 2
make: *** [all] Error 2
Original comment by smartn...@gmail.com
on 19 Jul 2011 at 7:01
Original issue reported on code.google.com by
lsiy...@gmail.com
on 2 Jun 2011 at 5:23