【问题标题】:Libtool install warning: xxx.la has not been installed in /user/local/libLibtool 安装警告:xxx.la 尚未安装在 /user/local/lib 中
【发布时间】:2015-12-20 22:32:20
【问题描述】:

在使用autoreconf & automake & libtool 构建和安装我的应用程序时,我总是收到警告“libtool: warning: xxx.la has not been installed in /user/local/lib”和“libtool:警告:记得运行‘libtool --finish /usr/local/lib”。我尝试了很多方法,例如,清理项目,并使用 make clean 重新配置,但仍然无法摆脱警告。这是我尝试过的:

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

这是我的configure.ac 的一部分,与automake 和libtool 有关。

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

为什么会发出这些警告,我该如何消除它们?

【问题讨论】:

    标签: autotools automake libtool


    【解决方案1】:

    这可能有点晚了,但我遇到了同样的问题。在我执行make clean 然后使用autoreconf 重新生成我的“配置”脚本后,它就消失了。之后执行标准 ./configure --prefix=... 后跟 make 和 make install 不再显示错误。祝你好运!

    【讨论】:

    • 看起来libtool 根本不支持通过DESTDIR 或其他方式进行安装时重定位(由this answer 确认),并且将始终尝试查看在配置中指定的--libdir时间,不管你跑了多少次autoreconf。
    • 关于我之前的评论,看起来可以通过将$DESTDIR 插入到libfile="$libdir/"……… 行中来修补libtool 脚本,幸运的是,这在整个文件中是唯一的。这需要在脚本生成(或更新)后执行一次,并且可以通过运行perl -p -i -e 's#^(\s*libfile=")(\$libdir/)#$1\$DESTDIR$2#' libtool 自动完成。
    • 之前的补丁阻止了警告“$lib has not been installed in $libdir”。要摆脱警告“remember to run `libtool --finish $libdir`”,可以运行perl -p -i -e 's#^(\s*if test "X\$destdir" = "X)(\$libdir")#$1\$DESTDIR$2#' libtool。但是请注意,我不知道这些补丁在最普遍的情况下有什么副作用。
    • 您是否尝试联系上游的libtool 告知您的发现?
    猜你喜欢
    • 1970-01-01
    • 2013-08-13
    • 2021-09-27
    • 2018-01-29
    • 1970-01-01
    • 1970-01-01
    • 2021-05-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多