升級libtool帶來的問題

來源:互聯網
上載者:User
今天新裝了個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了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.