[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inter-library dependency

From: Peter Johansson
Subject: inter-library dependency
Date: Wed, 09 Jan 2013 15:47:33 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121116 Thunderbird/10.0.11

Hello libtoolers,

I have a question how inter-library dependency is normally handled when creating libraries (with libtool).

We use libtool to create a library yat. This library depends on several other libraries: libbam, libz, libgsl, libgslcblas, and libm. We check for these libraries with AC_SEARCH_LIBS in with the result that LIBS get populated with names of these libraries.

That has worked fine for long time until now when trying to build on a system that only had libbam installed as a static library. Then I get this error message

make[1]: Entering directory `/home/peterJo/projects/osd/_yat'
  CXXLD    yat/
/usr/bin/ld: /home/peterJo/local/lib/libbam.a(bam.o): relocation R_X86_64_32 
against `.rodata.str1.1' can not be used when making a shared object; recompile 
with -fPIC
/home/peterJo/local/lib/libbam.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [yat/] Error 1

I'm clearly doing something wrong here, and wonder what common practice is. Should I make LIBS empty, but if I do that, variable 'dependency_libs' in '' also becomes empty?

This is on CentOS6 and with libtool 2.4.2.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]