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

Installation error - /usr/bin/ld: final link failed: Bad value #1225

Closed
RuslanSel opened this issue Jul 14, 2023 · 2 comments
Closed

Installation error - /usr/bin/ld: final link failed: Bad value #1225

RuslanSel opened this issue Jul 14, 2023 · 2 comments

Comments

@RuslanSel
Copy link

Ubuntu 18.04, python 3.8.3, venv

python3 setup.py install
[100%] Linking CUDA shared module ../../../lib/_k2.cpython-38-x86_64-linux-gnu.so
/usr/bin/ld: /usr/local/lib/libpython3.8.a(_warnings.o): relocation R_X86_64_PC32 against symbol `_PyRuntime' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
k2/python/csrc/CMakeFiles/_k2.dir/build.make:556: recipe for target 'lib/_k2.cpython-38-x86_64-linux-gnu.so' failed
make[2]: *** [lib/_k2.cpython-38-x86_64-linux-gnu.so] Error 1
CMakeFiles/Makefile2:444: recipe for target 'k2/python/csrc/CMakeFiles/_k2.dir/all' failed
make[1]: *** [k2/python/csrc/CMakeFiles/_k2.dir/all] Error 2
Makefile:135: recipe for target 'all' failed

Thanks in advance.

@csukuangfj
Copy link
Collaborator

Please reinstall your python.

Remember to pass the option

--enable-shared

to ./configure

You have to build a shared library version of Python.

@RuslanSel
Copy link
Author

Yes. It helped.
Thank you!

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