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

Cna not build Leveldb1.23 #1161

Open
maths644311798 opened this issue Dec 22, 2023 · 1 comment
Open

Cna not build Leveldb1.23 #1161

maths644311798 opened this issue Dec 22, 2023 · 1 comment

Comments

@maths644311798
Copy link

I follow README.md. System: Ubuntu 22.04.3 LTS.
After cmake --build ., it shows

[ 41%] Linking CXX executable c_test
/usr/bin/ld: CMakeFiles/c_test.dir/db/c_test.c.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/c_test.dir/build.make:117: c_test] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:290: CMakeFiles/c_test.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
@maths644311798
Copy link
Author

It seems that adding SET(CMAKE_EXE_LINKER_FLAGS " -no-pie") in the CMakeLists.txt works.

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