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
Hello,
i have build gflags' files with : cmake -DINTTYPES_FORMAT:STRING=C99 -DNAMESPACE:STRING=google -DCMAKE_INSTALL_PREFIX=../../Install/gflags -DBUILD_SHARED_LIBS=ON ../../gflags
Then, i have added : set (CMAKE_POSITION_INDEPENDENT_CODE ON) to the CMakefile.txt
which, i believe, add the -fPic compile option.
i have the following error :
[ 24%] Built target glog_internal
[ 27%] Linking CXX shared library libglog.so
/usr/bin/ld: /home/franck/Dev/LibLivre/Build/..Install/gflags/lib/libgflags.a(gflags_completions.cc.o): warning: relocation against `_ZN3fLS25FLAGS_tab_completion_wordB5cxx11E' in read-only section `.text.startup'
/usr/bin/ld: /home/franck/Dev/LibLivre/Build/..Install/gflags/lib/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
make[2]: *** [CMakeFiles/glog.dir/build.make:96: libglog.so.0.7.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:889: CMakeFiles/glog.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
I looking for solutions but i run out of ideas... i didn't know if i manage well to "recompile with -fPic", i do not know what is fPic, i have googled it and there is no result...
Any idea ?
The text was updated successfully, but these errors were encountered:
The linker error message indicates that, in fact, you did not compile gflags using -fPIC which can be easily verified by inspecting the command-line used by the compiler.
Please ask the gflags folks how can this be best achieved or use the search function. This issue popped up several times in the past; see #680#661#174#819.
Hello,
i have build gflags' files with : cmake -DINTTYPES_FORMAT:STRING=C99 -DNAMESPACE:STRING=google -DCMAKE_INSTALL_PREFIX=../../Install/gflags -DBUILD_SHARED_LIBS=ON ../../gflags
Then, i have added : set (CMAKE_POSITION_INDEPENDENT_CODE ON) to the CMakefile.txt
which, i believe, add the -fPic compile option.
i have the following error :
I looking for solutions but i run out of ideas... i didn't know if i manage well to "recompile with -fPic", i do not know what is fPic, i have googled it and there is no result...
Any idea ?
The text was updated successfully, but these errors were encountered: