[Top][All Lists]

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

Re: removal of .la files from Debian and a possible solution to the lib

From: Anssi Hannula
Subject: Re: removal of .la files from Debian and a possible solution to the libtool shared libs problem
Date: Wed, 26 Aug 2009 03:11:45 +0300
User-agent: Thunderbird (X11/20090815)

address@hidden wrote:
> Mike wrote:
>> making the code use reduced library sets for only linux targets is fine by
>> me.
>> libtool already has plenty of target-specific code based on the quality of
>> library handling.
> I think the scope of the problem is more devious than you imagine.
> Example:
> - install libA to /odd/lib/
> - configure libB with /odd/lib/
> - install libB to /odd/usr/lib/
> - configure App with libB in /odd/usr/lib/
> - compilation of App fails since the linker can't find
> Libtool's dependency lists would have told the linker where libA was
> installed.  Many people follow this sort of pattern on shared filesystems.

rpath tells that as well, and libtool adds it automatically when
installing to a non-standard path. I tested the above:

$ cd malaga-7.12
$ ./configure --prefix=/home/anssi/odd --libdir=/home/anssi/odd/lib
$ make && make install
$ sed -i "s,^dependency_libs=.*$,dependency_libs=''," \
$ cd ../libvoikko-2.0
$ ./configure --prefix=/home/anssi/odd/usr \
        --libdir=/home/anssi/odd/usr/lib LDFLAGS=-L/home/anssi/odd/lib \
$ make && make install
$ sed -i "s,^dependency_libs=.*$,dependency_libs=''," \
$ cd ../tmispell-voikko-0.7.1
$ ./configure --prefix=/home/anssi/odd/usr \
        --libdir=/home/anssi/odd/usr/lib \
        LDFLAGS=-L/home/anssi/odd/usr/lib \
$ make && make install

Compilation worked fine. The program also works correctly:

$ /home/anssi/odd/usr/bin/tmispell --help | head -n1
Usage: tmispell-voikko [options] [file]...

This is because libtool automatically sets the RPATH correctly in the
binary and the libraries:

$ objdump -p /home/anssi/odd/usr/bin/tmispell | grep -e voikko -e RPATH
  RPATH                /home/anssi/odd/usr/lib

$ objdump -p /home/anssi/odd/usr/lib/ | grep -e malaga -e
  RPATH                /home/anssi/odd/lib

Anssi Hannula

reply via email to

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