升级libtool带来的问题

来源:互联网 发布:微信炸群软件下载 编辑:程序博客网 时间:2024/05/20 05:08
今天新装了个linux系统。因为版本比较低,所以对libtool, automake, autoconf,  m4,  pkg-config进行了升级。
结果没有想到出了一个很是奇怪的错误。是在编译一个程序时,configure已经过了,在make的时候报的错误。

libtool: unrecognized option `--tag=CC'
Try `libtool --help' for more information.

它说不认识--tag这个参数,查看了,可是是有的:

[zhaowei@localhost src]$ libtool --help
Usage: libtool [OPTION]... [MODE-ARG]...

Provide generalized library-building support services.

    --config          show all configuration variables
    --debug           enable verbose shell tracing
-n, --dry-run         display commands without modifying any files
    --features        display basic configuration information and exit
    --finish          same as `--mode=finish'
    --help            display this help message and exit
    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
    --quiet           same as `--silent'
    --silent          don't print informational messages
    --tag=TAG         use configuration variables from tag TAG
    --version         print version information

MODE must be one of the following:

      clean           remove files from the build directory
      compile         compile a source file into a libtool object
      execute         automatically set library path, then run a program
      finish          complete the installation of libtool libraries
      install         install libraries or executables
      link            create a library or an executable
      uninstall       remove libraries from an installed directory

MODE-ARGS vary depending on the MODE.  Try `libtool --help --mode=MODE' for
a more detailed description of MODE.

Report bugs to <bug-libtool@gnu.org>.
 
后来发现,在我编译的这个程序目录下的libtool没有这个--tag参数,这个东西是autogen.sh这个脚本产生configure文件时生成的。
现在问题明朗了,libtool会使用ltmain.sh这个脚本,每次生成的时候,libtool会拷贝一个ltmain.sh到当前的程序目录中。那就是这个ltmain.sh的版本不对了。我升级了libtool,但还保留了原来的,于是新的libtool居然使用了旧的ltmain.sh。新的libtool我安装到/usr/local/下了,所以ltmain.sh在/usr/local/share/libtool下,老的在/usr/share/libtool下,我把老的libtool彻底删除就ok了。
原创粉丝点击