[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool: install: warning: remember to run `libtool --finish /usr/lo
From: |
Ralf Wildenhues |
Subject: |
Re: libtool: install: warning: remember to run `libtool --finish /usr/local/expat/2.0.1/lib' |
Date: |
Fri, 8 Dec 2006 10:38:42 +0100 |
User-agent: |
Mutt/1.5.13 (2006-11-01) |
Hello Perrog,
* Perrog wrote on Fri, Dec 08, 2006 at 07:41:20AM CET:
>
[...]
> $ ./configure --prefix=/usr/local/expat/2.0.1
> $ make
> $ sudo make install prefix=/usr/local
>
> Obviously, "make install prefix=/usr/local" forgets to update
> libexpat.la.
Correct. Libtool violates the GNU Coding Standards in this regard.
There is a (weak) reason: in some situations, paths are hard-coded
in the library (and not only the text file). I don't know a good
way to write an efficient portable Makefile that would detect user
overrides of 'prefix' at install time and relink in that case.
(Side note: in some situations, relinking happens anyway, but that
still won't do the right thing for you; see below.)
> In fact, when I read the "make install" console, it
> reports at one line:
>
> libtool: install: warning: remember to run `libtool --finish
> /usr/local/expat/2.0.1/lib'
Right. The reason is that the typical case where prefix at 'make' time
and prefix at 'make install' differ is because of a staging install:
make install DESTDIR=/tmp/prefix
where later, possibly on a different system, the library will appear
below the originally configured prefix. (If the Makefile does not
support DESTDIR, that would amount to changing prefix; libtool cannot
detect the difference at the moment, but it works well only in the case
of a string prefixed to the value that `prefix' had at the time the
library was created, unfortunately.)
> so I decided to clean and reconfigure expat
> $ cd expat
> $ make clean
> $ ./configure
> $ make
> $ sudo make install
You can optimize this a bit, in case libtool is the only problematic bit
here; in that case, it should be sufficient to
find . -name \*.la | xargs ./libtool --mode=clean rm -f
make prefix=/new/prefix
sudo make install prefix/new/prefix
(for non-GNU make, use the following instead:
prefix=/new/prefix make -e ... )
Hope that helps.
Cheers,
Ralf