Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building python_binding #80

Closed
er3do opened this issue Mar 23, 2017 · 2 comments
Closed

Building python_binding #80

er3do opened this issue Mar 23, 2017 · 2 comments

Comments

@er3do
Copy link

er3do commented Mar 23, 2017

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
Copy link
Owner

uricamic commented Apr 9, 2017

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
Copy link
Owner

Closing, feel free to reopen if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants