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?

Binarus
  • 4,005
  • 3
  • 25
  • 41
Jes
  • 2,614
  • 4
  • 25
  • 45

1 Answers1

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!

Jvinniec
  • 616
  • 12
  • 18
  • 2
    It looks like `libtool` simply does not support install-time relocation via `DESTDIR` or whatever (confirmed by [this answer](http://stackoverflow.com/a/32766842/1879042)), and will always try to look in the `--libdir` specified at configure time, no matter how many times you run `autoreconf`. – Anton Samsonov May 31 '16 at 17:39
  • 1
    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`. – Anton Samsonov Jun 01 '16 at 12:18
  • 1
    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. – Anton Samsonov Jun 01 '16 at 14:27
  • Have you tried contacting `libtool` upstream with your findings? – Ferenc Wágner Jul 21 '16 at 11:09