Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Libtool installation issue with make install

I use the following autotool steps to install my pacakges:

./configure
make
make install prefix=/my/path

However I got the following libtool warning "libtool: warning: remember to run 'libtool --finish /usr/local/lib' and "libtool: warning: 'lib/my.la' has not been installed in '/usr/local/lib'" when using the autotool to install my software package. If I change to the following command, the problem disappear:

./configure
make prefix=/my/path
make install prefix=/my/path

It looks like the first method doesn't substitute the prefix correctly to libtool. How can I avoid this problem?

like image 630
Jes Avatar asked Sep 24 '15 16:09

Jes


1 Answers

Among the information that libtool archives record about the libraries they describe is the expected installation location. That information is recorded when the library is created. You can then install to a different location, but libtool will complain. Often, libtool's warning is harmless.

In order to avoid such a warning, you need to tell libtool the same installation location at build time that you do at install time. You present one way to do that in the question, but if you're using a standard Autotools build system then it is better to specify the installation prefix to configure:

./configure --prefix=/my/path
make
make install

Alternatively, if you're installing into a staging area, such as for building an RPM, then use DESTDIR at install time. libtool will still warn, but you'll avoid messing up anything else:

./configure
make
make install DESTDIR=/staging/area
like image 175
John Bollinger Avatar answered Nov 12 '22 11:11

John Bollinger