You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use counter.proto to create some files ,when I compile ,error happened :Linking CXX shared library lib/libcounter.so
/usr/bin/ld: /home/zdy/rdsninstall/lib/libprotobuf.a(arena.cc.o): relocation R_X86_64_32 against `_ZN6google8protobuf5Arena23lifecycle_id_generator_E' can not be used when making a shared object; recompile with -fPIC
/home/zdy/rdsninstall/lib/libprotobuf.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libcounter.so] Error 1
make[1]: *** [CMakeFiles/counter.dir/all] Error 2
make: *** [all] Error 2
ERROR: build failed
Is that protobuf not ok?
The text was updated successfully, but these errors were encountered:
By default, protobuf is compiled as a static library without the compiler argument "-fPIC" (position-independent code). Please open the file "ext/protobuf/CMakeLists.txt", add "-DCMAKE_POSITION_INDEPENDENT_CODE=ON;" after line 13 (quotation mark is needed) and have a try.
I use counter.proto to create some files ,when I compile ,error happened :Linking CXX shared library lib/libcounter.so
/usr/bin/ld: /home/zdy/rdsninstall/lib/libprotobuf.a(arena.cc.o): relocation R_X86_64_32 against `_ZN6google8protobuf5Arena23lifecycle_id_generator_E' can not be used when making a shared object; recompile with -fPIC
/home/zdy/rdsninstall/lib/libprotobuf.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libcounter.so] Error 1
make[1]: *** [CMakeFiles/counter.dir/all] Error 2
make: *** [all] Error 2
ERROR: build failed
Is that protobuf not ok?
The text was updated successfully, but these errors were encountered: