TousakaRin edited a comment on issue #1498:
URL: https://github.com/apache/incubator-brpc/issues/1498#issuecomment-912341967


    I reproduced this problem through the image you provided,
      
      The root cause of the problem is like this:
      1.  you enabled --with-glog when you run config_brpc.sh, so glog will be 
linked, and the script only found a dynamic library(libglog.so), so glog will 
be dynamic linked. Similarly, gflag will be linked in a static way
      2. gflag is referenced by glog,  and libglog.so linked gflags in dynamic 
way, it is reasonable.
      3. in some platform, libgflags.a is complied without option '-fPIC', and 
it is the default behavior when compiling gflags, so when you link 
./example/echo_c++/echo_server with **libgflags.a and libglog.so**,  error 
occured.
      
      In some other platform , even if they are compiling static libraries, 
they will add options '-fPIC', for example Ubuntu. to solve this promble, 
compile gflags with source code, and set **CPPFLAGS=-fPIC**, then everything 
works fine.


-- 
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]

Reply via email to