krishprince / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

Link Error while making gLog (recompile with -fIPC) #218

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to install glog on my Ubuntu 12.04. When I am trying to make the 
glog it gives me bunch of error asking me to recompile it with -fPIC

make
/bin/bash ./libtool --tag=CXX   --mode=link g++    -Wall -Wwrite-strings 
-Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2    
-o libglog.la -rpath /usr/local/lib  libglog_la-logging.lo 
libglog_la-raw_logging.lo libglog_la-vlog_is_on.lo libglog_la-utilities.lo 
libglog_la-demangle.lo libglog_la-symbolize.lo libglog_la-signalhandler.lo   
-lgflags  -lpthread
libtool: link: g++  -fPIC -DPIC -shared -nostdlib 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o  .libs/libglog_la-logging.o 
.libs/libglog_la-raw_logging.o .libs/libglog_la-vlog_is_on.o 
.libs/libglog_la-utilities.o .libs/libglog_la-demangle.o 
.libs/libglog_la-symbolize.o .libs/libglog_la-signalhandler.o   -lgflags 
-lpthread -L/usr/lib/gcc/x86_64-linux-gnu/4.7 
-L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib 
-L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. -lstdc++ -lm -lc -lgcc_s 
/usr/lib/gcc/x86_64-linux-gnu/4.7/crtendS.o 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o  -O2   
-Wl,-soname -Wl,libglog.so.0 -o .libs/libglog.so.0.0.0
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_32 reloc against 'pthread_cancel' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'pthread_rwlock_destroy' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'pthread_rwlock_init' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'pthread_rwlock_unlock' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '__vsnprintf_chk' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 
'_ZN6gflags20InternalStringPrintfEPSsPKcP13__va_list_tag' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSsC1ERKSs' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'memcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_Znwm' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'strcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSsC1ERKSs' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 
'_ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_ESt4lessISsESaIS2_EE8_M_eraseE
PSt13_Rb_tree_nodeIS2_E' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSs6assignERKSs' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZSt20__throw_length_errorPKc' 
which may overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZSt20__throw_length_errorPKc' 
which may overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_Znwm' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'memcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'memcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'memcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'strcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 
'_ZN6gflags19CommandLineFlagInfoC1ERKS0_' which may overflow at runtime; 
recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'strcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSs6assignERKSs' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 
'_ZNSt11__copy_moveILb0ELb0ESt26random_access_iterator_tagE8__copy_mIPN6gflags19
CommandLineFlagInfoES5_EET0_T_S7_S6_' which may overflow at runtime; recompile 
with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSsC1ERKSs' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSs6assignERKSs' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSsC1ERKSs' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 
'_ZN6gflags19CommandLineFlagInfoC1ERKS0_' which may overflow at runtime; 
recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'strcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'strcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 
'_ZSt9make_heapIN9__gnu_cxx17__normal_iteratorIPN6gflags19CommandLineFlagInfoESt
6vectorIS3_SaIS3_EEEENS2_19FilenameFlagnameCmpEEvT_SA_T0_' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against '_ZNSsC1ERKSs' which may overflow 
at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_PC32 reloc against 'strcmp' which may overflow at 
runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile 
with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags.cc.o): 
requires dynamic R_X86_64_32 reloc against '__gxx_personality_v0' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_reporting.c
c.o): requires dynamic R_X86_64_PC32 reloc against '_ZNSsC1ERKSs' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_reporting.c
c.o): requires dynamic R_X86_64_32 reloc against 'pthread_cancel' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_reporting.c
c.o): requires dynamic R_X86_64_PC32 reloc against '_ZNSs9_M_mutateEmmm' which 
may overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_reporting.c
c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; 
recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_reporting.c
c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; 
recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_completions
.cc.o): requires dynamic R_X86_64_PC32 reloc against 'memmove' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_completions
.cc.o): requires dynamic R_X86_64_32 reloc against 'pthread_cancel' which may 
overflow at runtime; recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_completions
.cc.o): requires dynamic R_X86_64_PC32 reloc against 
'_ZNSt8_Rb_treeIPKN6gflags19CommandLineFlagInfoES3_St9_IdentityIS3_ESt4lessIS3_E
SaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E' which may overflow at runtime; 
recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_completions
.cc.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; 
recompile with -fPIC
/usr/bin/ld: error: 
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgflags.a(gflags_completions
.cc.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; 
recompile with -fPIC
collect2: error: ld returned 1 exit status
make: *** [libglog.la] Error 1

What version of the product are you using? On what operating system?

Please provide any additional information below.
ld version: GNU gold (GNU Binutils for Ubuntu 2.22) 1.11
g++ version: g++ (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3

Original issue reported on code.google.com by arsalan....@gmail.com on 8 Aug 2014 at 7:31