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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With