[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inter-library dependencies
From: |
Wesley W. Terpstra |
Subject: |
Re: Inter-library dependencies |
Date: |
Sun, 22 Oct 2000 10:51:12 -0600 |
User-agent: |
Mutt/1.2.5i |
On Sun, Oct 22, 2000 at 03:26:42PM +0200, Carlo Wood wrote:
> I wrote a package that exists of two libraries, both of which are build
> with libtool. One of the libraries is independant of the other, this one
> gets configured first and after issueing a `make' it gets build first.
>
> Whether or not an (old version of) the independant library (cwd) is
> installed or not, the dependant library (cw) forms a unity with the first
> and should always link with the version that comes with the package.
>
> Therefore, what needs to happen is:
>
> The package is configured
> The package is build (building two libraries)
> The testsuite is run.
>
> The testsuite links only with libcw; libtool should figure out that this
> library depends on libcwd (which in turn depends on libdl, libbfd and
> libiberty, and on some OS also on libintl) and should then link the tests
> with the newly compiled libcwd.
>
> What happens however is that it only links with -lcwd in the plain
> usual way, failing to find the not-yet-installed libcwd, or silently
> linking with an already installed old version.
>
> Needless to say that an install and subsequent link with -lcw
> should automatically get the *installed* libcwd etc.
All of what you have just described should already work under the newest
libtool. Try getting the version out of cvs and seeing if that solves your
problems. Also check that you are compiling with commands roughly like:
libtool c++ -Wall -O2 -g -c cwd.c -o cwd.lo
libtool c++ -Wall -O2 -g -rpath /usr/lib -o libcwd.la cwd.lo -ldl -lbfd
libtool c++ -Wall -O2 -g -c cw.c -o cw.lo
libtool c++ -Wall -O2 -g -rpath /usr/lib -o libcw.la cw.lo libcwd.la
c++ -Wall -O2 -g -c mytest.c -o mytest.o
libtool c++ -Wall -O2 -g -o mytest mytest.o libcwd.la
Then running ./mytest should work. It will likely actually be a shell
script.
libtool install -D libcwd.la /usr/lib/libcwd.la
libtool install -D libcw.la /usr/lib/libcw.la
libtool --finish /usr/lib
libtool install -D mytest /usr/bin/mytest
This should also work, relinking libcw.la at install time.
I personally have been successfully using these features after I switched to
the cvs head version of libtool. To get this version:
cvs -z3 -d:pserver:address@hidden:/var/cvs co libtool
Good luck.
PS. I've moved my reply from 'libtool-patch' to 'libtool' b/c there is no
patch under discussion.
--
Wesley W. Terpstra <address@hidden>
Javien Canada Inc. - Linux Developer
pgpdC0mVwurTT.pgp
Description: PGP signature
- Re: Inter-library dependencies,
Wesley W. Terpstra <=
- Re: Inter-library dependencies, Carlo Wood, 2000/10/22
- Re: Inter-library dependencies, Wesley W. Terpstra, 2000/10/22
- Re: Inter-library dependencies, Carlo Wood, 2000/10/23
- Re: Inter-library dependencies, Wesley W. Terpstra, 2000/10/23
- Re: Inter-library dependencies, Carlo Wood, 2000/10/24
- Re: Inter-library dependencies, Alexandre Oliva, 2000/10/24
- Re: Inter-library dependencies, Carlo Wood, 2000/10/24