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 configure.ac 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/libyat.la
/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/libyat.la] 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 'libyat.la' also becomes empty?
This is on CentOS6 and with libtool 2.4.2.
Thanks,
Peter
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool