解决:error: Libtool library used but 'LIBTOOL' is undefined

在编译spice库函数pixman时,出现:

pixman/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
pixman/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
pixman/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
pixman/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
pixman/Makefile.am:1:   its definition is in aclocal's search path.
test/Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

意思是:configure.ac中定义了LT_INIT,但是aclocal搜索不到。而configure.ac是存在于libtool文件中。aclocal搜索configure.ac的途径是通过libtool.m4文件。

解决方法:

1)使aclocal文件夹和libtool文件夹在同一个目录下,且aclocal中包含libtool.m4,起到搭桥的作用;

2)在满足aclocal中有libtool.m4文件,且aclocal与libtool文件在同一目录下的同时,还需要检查aclocal的搜索路径是否定位到aclocal的父目录。

我的是搜索路径是:/usr/local/share/aclocal,但是我的aclocal与libtool的父目录是:/usr/share/aclocal。两者不同。

所有,要把搜索路径改了或者是在当前搜索路径下添加相应的文件。

1)修改搜索路径,发现改不了:

2)选择在当前搜索路径中添加相应的文件,重新编译后:

成功!

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值