BUCK compilation required glibc
I have build with CMake and is OK, but I must build with Buck.
BUCK is configured to use Clang. /usr/src/hbase/hbase-native-client/otherlibs/libzmq.a(ipc_listener.cpp.o): In function `zmq::ipc_listener_t::filter(int)': ipc_listener.cpp:(.text+0xdc0): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ipc_listener.cpp:(.text+0xda3): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking |
And what is your question?
|
How compile it?
|
These are just warnings, so they don't prevent you from compiling your program. Nonetheless, statically linking libc is very unusual in Unix/Linux. Why would you do that?
|
Sorry, I put no errors but warnings.
Erorr is /usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/src/hbase/hbase-native-client/otherlibs/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie clang: error: linker command failed with exit code 1 (use -v to see invocation) libc.a is system library, how compile it with -fPIE, where are sources? |
you need to recompile your sources with -fPIE and relink with -pie. You do not need to rebuild libc.a, just relink it. But I think you need to give more information about this situation (if this won't help)
|
Thanks! linker_flags=['-pie'] helps a lot.
Is only next error: /usr/bin/ld: /usr/src/hbase/hbase-native-client/otherlibs/libzmq.a(zmq.cpp.o): relocation R_X86_64_32 against `_ZSt7nothrow' can not be used when making a shared object; recompile with -fPIC /usr/src/hbase/hbase-native-client/otherlibs/libzmq.a: error adding symbols: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) I must not compile ZMQ with PIC because I want link ZMQ static? I have prebuilt_cxx_library( name="zmq", lib_dir='../otherlibs' ) where in otherlibs is 1.8 MB of libzmq.a. I changed to prebuilt_cxx_library( name="zmq", static_lib='otherlibs/libzmq.a' ) but still error: /usr/bin/ld: /usr/src/hbase/hbase-native-client/block-exe/otherlibs/libzmq.a(zmq.cpp.o): relocation R_X86_64_32 against `_ZSt7nothrow' can not be used when making a shared object; recompile with -fPIC /usr/src/hbase/hbase-native-client/block-exe/otherlibs/libzmq.a: error adding symbols: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) |
You seem to try and compile something that has a built-in libc... It does sound scary. (Also there is C++ in it which makes it scarier.)
Nonetheless, if it asks for relocatable code, then do use -fPIC flag |
Is because I compiled with -pie
|
All times are GMT -5. The time now is 04:14 AM. |