升级libtool带来的问题已经解决
今天新裝了個(gè)linux系統(tǒng)。因?yàn)榘姹颈容^低,所以對libtool, automake, autoconf,m4,pkg-config進(jìn)行了升級。
結(jié)果沒有想到出了一個(gè)很是奇怪的錯(cuò)誤。是在編譯一個(gè)程序時(shí),configure已經(jīng)過了,在make的時(shí)候報(bào)的錯(cuò)誤。
libtool: unrecognized option `--tag=CC'
Try `libtool --help' for more information.
它說不認(rèn)識--tag這個(gè)參數(shù),查看了,可是是有的:
[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 <>.
后來發(fā)現(xiàn),在我編譯的這個(gè)程序目錄下的libtool沒有這個(gè)--tag參數(shù),這個(gè)東西是autogen.sh這個(gè)腳本產(chǎn)生configure文件時(shí)生成的。
現(xiàn)在問題明朗了,libtool會使用ltmain.sh這個(gè)腳本,每次生成的時(shí)候,libtool會拷貝一個(gè)ltmain.sh到當(dāng)前的程序目錄中。那 就是這個(gè)ltmain.sh的版本不對了。我升級了libtool,但還保留了原來的,于是新的libtool居然使用了舊的ltmain.sh。新的 libtool我安裝到/usr/local/下了,所以ltmain.sh在/usr/local/share/libtool下,老的在/usr /share/libtool下,我把老的libtool徹底刪除就ok了。
總結(jié)
以上是生活随笔為你收集整理的升级libtool带来的问题已经解决的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA 将 SpringBoot 项目
- 下一篇: 第106天:Ajax中同步请求和异步请求