Libtool install warning: xxx.la has not been installed in /user/local/lib
Asked Answered
G

1

8

While using autoreconf & automake & libtool to build and install my application, I always get warning "libtool: warning: xxx.la has not been installed in /user/local/lib" and "libtool: warning: remember to run 'libtool --finish /usr/local/lib". I have tried many methods, e.g., cleaning the project, and reconfigure with make clean, but still can't get rid of the warning. Here is what I tried:

./configure
make clean
make
make install prefix=~/Software/

Here is part of my configure.ac that relates to automake and libtool.

AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror])
LT_INIT([dlopen])

Why are these warnings emitted, and how do I get rid of them?

Guff answered 23/9, 2015 at 14:31 Comment(0)
C
5

This may be a little late, but I was having the same problem. It went away after I did a make clean followed by regenerating my "configure" script with autoreconf. After that doing the standard ./configure --prefix=... followed by make and make install no longer showed the error. Good luck!

Chingchinghai answered 27/4, 2016 at 16:49 Comment(4)
It looks like libtool simply does not support install-time relocation via DESTDIR or whatever (confirmed by this answer), and will always try to look in the --libdir specified at configure time, no matter how many times you run autoreconf.Moskva
Regarding my previous comment, it look like it is possible to patch the libtool script by inserting $DESTDIR into the line libfile="$libdir/"……… which is luckily unique in the entire file. This needs to be done just once after the script was generated (or updated), and can be accomplished automatically by running perl -p -i -e 's#^(\s*libfile=")(\$libdir/)#$1\$DESTDIR$2#' libtool.Moskva
The previous patch prevents the warning "$lib has not been installed in $libdir". To also get rid of the warning "remember to run `libtool --finish $libdir`", one can run perl -p -i -e 's#^(\s*if test "X\$destdir" = "X)(\$libdir")#$1\$DESTDIR$2#' libtool. Note, however, that I have no idea what side effects these patches have in the most general case.Moskva
Have you tried contacting libtool upstream with your findings?Slr

© 2022 - 2024 — McMap. All rights reserved.