[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
interdependent shared library problem
From: |
Patrick Welche |
Subject: |
interdependent shared library problem |
Date: |
Sun, 15 Oct 2006 20:53:41 +0100 |
User-agent: |
Mutt/1.5.11 |
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
hello2.tar.bz2
Description: Binary data
compile.out.bz2
Description: Binary data
- interdependent shared library problem,
Patrick Welche <=