drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.04k stars 1.06k forks source link

cmake compile with -fPIC error? #1999

Open bethebest0622 opened 2 months ago

bethebest0622 commented 2 months ago

I got the error when i add drogon library in my repo.

[ 71%] Linking CXX shared library libcurl_util.so
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: /usr/local/lib64/libdrogon.a(AccessLogger.cc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

does this means i need to add compile config setting when i install drogon by source code?

why drogon dont set -fPIC by default?