pelegm / google-glog

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

Compilation issue #201

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download glog
2. ./configure
3. make

What is the expected output? What do you see instead?

/bin/bash ./libtool --tag=CXX   --mode=link g++  -I/usr/local//include -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   
-L/usr/local//lib -lgflags  -lpthread 
libtool: link: g++  -fPIC -DPIC -shared -nostdlib 
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/4.6/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   
-L/usr/local//lib -lgflags -lpthread -L/usr/lib/gcc/x86_64-linux-gnu/4.6 
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../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.6/../../.. -lstdc++ -lm -lc -lgcc_s 
/usr/lib/gcc/x86_64-linux-gnu/4.6/crtendS.o 
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o  -O2   
-Wl,-soname -Wl,libglog.so.0 -o .libs/libglog.so.0.0.0
/usr/bin/ld: /usr/local//lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32S 
against `std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>::_Rep::_S_empty_rep_storage' can not be used when making a shared object; 
recompile with -fPIC
/usr/local//lib/libgflags.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libglog.la] Error 1
asd@asd:~/Codes/glog-0.3.3$

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

glog-0.3.3

Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:    12.04
Codename:   precise

Please provide any additional information below.

Original issue reported on code.google.com by limh...@gmail.com on 4 May 2014 at 8:49

GoogleCodeExporter commented 9 years ago
Same error here, building on openSUSE Tumbleweed. Build ends with

/usr/local/lib/libgflags.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libglog.la] Error 1

This build attempt immediately followed building and installing gflags 2.1.1 
using cmake && make && make install - there is a libgflags.a installed at the 
location described. Version compatibility issue?

Original comment by cputt...@gmail.com on 7 Jul 2014 at 12:53

GoogleCodeExporter commented 9 years ago
Running in to this same issue on Gentoo, same versions
Gflags 2.1.1 and glog 0.3.3

Original comment by Dan.ori...@gmail.com on 15 Jul 2014 at 9:37

GoogleCodeExporter commented 9 years ago
Same issue on Ubuntu 14.04, 64 bit, g++ 4.8.2, glibc 2.19
Solved by compiling gflags-2.1.1 with -fPIC:

$ tar -xvf gflags-2.1.1.tar.gz
$ cd gflags-2.1.1 && mkdir build && cd build
$ CXXFLAGS="-fPIC" cmake .. -DGFLAGS_NAMESPACE=google
$ sudo make install

Then install glog-0.3.3 as usual.

Original comment by cosmin11...@gmail.com on 23 Jul 2014 at 3:05

GoogleCodeExporter commented 9 years ago
ubuntu 12.04.4 64bit
gflags 2.1.1
glog 0.3.3
same error!!!

Original comment by feng9...@gmail.com on 21 Dec 2014 at 9:42

GoogleCodeExporter commented 9 years ago
ubuntu 12.04.4 64bit
gflags-1.3.tar.gz  
(http://pkgs.fedoraproject.org/repo/pkgs/gflags/gflags-1.3.tar.gz/6da3d3b9cd82c2
22b521ae686b6cfa8b/)
glog 0.3.3
solved!!!

Original comment by henok.sa...@gmail.com on 29 Jan 2015 at 10:33