Menu

#1 Compiling with x86_64 (Ubuntu 12.10)

closed-fixed
nobody
None
5
2012-11-16
2012-10-28
A. Mayer
No

On my Ubuntu machine (12.10, x86_64), the linking step fails, supposedly because of missing symbols. It turns out that the gcc linker here is much more sensitive to the order in which the libraries are specified: there must be first the objects/libraries which use the symbols, and then afterwards the libraries which provide the symbols.

I'm not an expert in autoconf/automake, but the solution I found is to only put linker flags (-rdynamic, -L etc) into LDFLAGS, and put library references (both static *.a and dynamic -lxyz) into LIBS, because the final linker command line will look like this (CXXLINK contains the AM_LDFLAGS):

$(CXXLINK) $(pepper_OBJECTS) $(pepper_LDADD) $(LIBS)

I modified the Makefile.am so that it works on my machine; attached is the diff to the Makefile in the pepper-0.3.2 release. Hope it helps!

Discussion

  • A. Mayer

    A. Mayer - 2012-10-28

    Diff of src/Makefile.am , to pepper-0.3.2 release

     
  • Jonas Gehring

    Jonas Gehring - 2012-11-16
    • status: open --> closed-fixed
     
  • Jonas Gehring

    Jonas Gehring - 2012-11-16

    Hi aamayer,

    I'm sorry for the long delay -- but thanks for reporting and fixing this! I updated my Ubuntu VM and could verify the issue; however, I've decided to settle with the cleaner version form stefanorivera. The current head revision at http://github.com/jgehring/pepper should now build successfully.

    Thanks again for your help!
    - Jonas

     

Log in to post a comment.

MongoDB Logo MongoDB