Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure #12

Open
Baughn opened this issue Jan 31, 2015 · 2 comments
Open

Compilation failure #12

Baughn opened this issue Jan 31, 2015 · 2 comments

Comments

@Baughn
Copy link

Baughn commented Jan 31, 2015

On the newest Ubuntu, it appears there's some compiler flag missing:

*** Warning: Linking the shared library libglog.la against the non-libtool
*** objects  /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags.cc.o /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags_completions.cc.o /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags_nc.cc.o /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags_reporting.cc.o is not portable!
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.9/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  /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags.cc.o /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags_completions.cc.o /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags_nc.cc.o /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags_reporting.cc.o   -L/usr/local/lib -L/opt/local/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.9 -L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../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.9/../../.. -lstdc++ -lm -lpthread -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o  -pthread -O3   -pthread -Wl,-soname -Wl,libglog.so.0 -o .libs/libglog.so.0.0.0
/usr/bin/ld: /home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags.cc.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/svein/dev/repobuild/.gen-obj/common/third_party/google/gflags/src/gflags.cc.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:734: recipe for target 'libglog.la' failed
make[1]: *** [libglog.la] Error 1
make[1]: Leaving directory '/home/svein/dev/repobuild/common/third_party/google/glog'
Makefile:242: recipe for target '.gen-obj/common/third_party/google/glog/.glog_gen.1.0.dummy' failed
make: *** [.gen-obj/common/third_party/google/glog/.glog_gen.1.0.dummy] Error 1
@chrisvana
Copy link
Owner

Thanks, I will try and reproduce.

From the error message, it may be that glog.cc.o is getting compiled without -fPIC. That sounds like a problem in the autoconf/configure script. If you want to play with it, you can try to run ./configure && make manually in that directory to see if it still gives the error.

@benley
Copy link

benley commented Feb 28, 2015

I can reproduce the failure on Ubuntu 14.10 as well.

Running ./configure && make in the glog submodule doesn't yield the error, but running the repobuild make does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants