With CVS autotools of this month I am getting in a pickle trying
to build a program which depends on a shared library which depends
on a shared library. This is on NetBSD which uses rpath. An example
based on one from autobook is attached which builds

  hello -> libhello -> (libSM,libICE)

.libs/libhello.so seems fine (objdump -x):

  NEEDED      libSM.so.6
  NEEDED      libICE.so.6
  SONAME      libhello.so.0
  RPATH       /usr/X11R6/lib

but the binary .libs/hello seems less happy:

  NEEDED      libhello.so.0
  NEEDED      libSM.so.6
  NEEDED      libICE.so.6
  NEEDED      libc.so.12
  RPATH       /usr/local/lib

so on execution libSM and libICE won't be found. If however, I manually
do:

  gcc -o hello2 -Wall main.o -R.libs -L.libs -lhello

hello2 has:

  NEEDED      libhello.so.0
  NEEDED      libc.so.12
  RPATH       .libs

which is good enough for hello2 to run. So, at least in my case, it
seems libtool is doing too good a job of mentioning all the libraries
in the link line.

Thoughts?

Cheers,

Patrick

Attachment: hello2.tar.bz2
Description: Binary data

Attachment: compile.out.bz2
Description: Binary data

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to