zoukankan      html  css  js  c++  java
  • 升级libtool带来的问题已经解决

    今天新装了个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 <>.

    后来发现,在我编译的这个程序目录下的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了。
  • 相关阅读:
    Ubuntu16.04更换下载源
    Linux 使用echo向文件末尾追加命令
    pkg-config 切换opencv版本
    pkg-config
    Qt C++ libcaffe.so无法调用
    TX2 上使用opencv 调用板载mipi摄像头
    error while loading shared libraies :libopencv_core_so.3.4:cannot open shared object
    caffe/proto/caffe.pb.h: No such file or director
    libcaffe.so.1.0.0: cannot open shared object file: No such file or directory 运行时报错
    Ubuntu16.04安装openBLAS
  • 原文地址:https://www.cnblogs.com/danghuijian/p/4400373.html
Copyright © 2011-2022 走看看