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

Link error with VP9 when building a shared library #164

Open
tokjun opened this issue Jan 10, 2018 · 2 comments
Open

Link error with VP9 when building a shared library #164

tokjun opened this issue Jan 10, 2018 · 2 comments

Comments

@tokjun
Copy link
Contributor

tokjun commented Jan 10, 2018

The make failed to link VP9 when the OpenIGTLink library is built as a shared library.

[ 34%] Linking CXX shared library ../bin/libOpenIGTLink.so
/usr/bin/ld: ../Deps/VP9/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
../Deps/VP9/libvpx.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Source/CMakeFiles/OpenIGTLink.dir/build.make:1993: recipe for target 'bin/libOpenIGTLink.so.3.1.0' failed
make[2]: *** [bin/libOpenIGTLink.so.3.1.0] Error 1
CMakeFiles/Makefile2:1036: recipe for target 'Source/CMakeFiles/OpenIGTLink.dir/all' failed
make[1]: *** [Source/CMakeFiles/OpenIGTLink.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
@tokjun
Copy link
Contributor Author

tokjun commented Jan 10, 2018

Adding --enable-pic to VP9's configure script solves the issue, at least on Linux.

@tokjun
Copy link
Contributor Author

tokjun commented Jan 10, 2018

This error does not exist in Mac OS X. The above change did not affect the building result.

leochan2009 added a commit that referenced this issue Jan 23, 2018
Add --enable-fpic to the configure script for VP9 to address issue #164.
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

1 participant