uricamic / clandmark

Open Source Landmarking Library
http://cmp.felk.cvut.cz/~uricamic/clandmark
GNU General Public License v3.0
199 stars 111 forks source link

Building python_binding #80

Closed er3do closed 6 years ago

er3do commented 7 years ago

Hello Michal,

I built clandmark with BUILD_SHARED_LIBS = ON, BUILD_PYTHON_BINDINGS = OFF and install it (using checkinstall).

After that I ran ccmake again and set BUILD_PYTHON_BINDINGS = ON. After that running make ends with the following error:

[ 27%] Built target clandmark [ 54%] Built target flandmark [ 60%] Built target static_input [ 66%] Built target video_input [ 66%] Built target ReplicatePythonSourceTree [ 69%] Linking CXX shared module py_featurePool.so /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libpython2.7.a(abstract.o): relocation R_X86_64_32 against '.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libpython2.7.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status python_interface/src/CMakeFiles/py_featurePool.dir/build.make:108: recipe for target 'python_interface/src/py_featurePool.so' failed make[2]: *** [python_interface/src/py_featurePool.so] Error 1 CMakeFiles/Makefile2:357: recipe for target 'python_interface/src/CMakeFiles/py_featurePool.dir/all' failed make[1]: *** [python_interface/src/CMakeFiles/py_featurePool.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

Can you give me an idea how to fix it?

My env: Ubuntu 16, python 2.7

uricamic commented 7 years ago

Hi @er3do,

sorry for a late answer.

It seems that I have broken something when I tried to make the build system working on Windows. I just tried to compile python interface on Linux and, indeed, I got the same error as you did. Please, try to change the PYTHON_LIBRARY variable in ccmake to the dynamic version (e.g. libpython2.7.so). Then, it should work.

uricamic commented 6 years ago

Closing, feel free to reopen if the problem persists.