gaowayne commented on issue #1934:
URL:
https://github.com/apache/incubator-brpc/issues/1934#issuecomment-1256879781
linker error, can anyone shared some light?
```
root@wcp116:/home/intel/wayne/debugfio/fio-brpc/fio/engines# g++ -O0 -g
-ggdb -shared -rdynamic -fPIC -o cpp_null null.c
-I/root/wayne/braft/debug/incubator-brpc/output/include -include
../config-host.h -DBRPC_WITH_GLOG=0 -L/usr/lib/x86_64-linux-gnu
-L/root/wayne/braft/debug/incubator-brpc/output/lib -Xlinker "-(" echo.pb.o
-Wl,-Bstatic -lgflags -lprotobuf -lleveldb -lsnappy -lbrpc -Wl,-Bdynamic
-Xlinker "-)" -lpthread -lssl -lcrypto -ldl -lz -lrt -DFIO_EXTERNAL_ENGINE
In file included from ../os/../file.h:7,
from ../os/os-linux.h:32,
from ../os/os.h:39,
from ../thread_options.h:5,
from ../fio.h:18,
from null.c:30:
../os/../flist.h:7: warning: "container_of" redefined
7 | #define container_of(ptr, type, member) ({ \
|
In file included from
/root/wayne/braft/debug/incubator-brpc/output/include/butil/logging.h:31,
from null.c:25:
/root/wayne/braft/debug/incubator-brpc/output/include/butil/macros.h:346:
note: this is the location of the previous definition
346 | # define container_of(ptr, type, member) ({
\
|
null.c:133: warning: "__cplusplus" redefined
133 | #define __cplusplus 1
|
<built-in>: note: this is the location of the previous definition
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libprotobuf.a(arena.o): relocation
R_X86_64_TPOFF32 against symbol
`_ZN6google8protobuf8internal9ArenaImpl13thread_cache_E' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgflags.a(gflags.cc.o): relocation
R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' 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
````
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]