從官網(wǎng)下載了最新的opus 1.3的代碼琅攘,然后按照readme說(shuō)明進(jìn)行編譯。
配置的時(shí)候出現(xiàn)如下錯(cuò)誤:
$ ./autogen.sh
Updating build configuration files, please wait....
configure.ac:38: warning: macro 'AM_PROG_LIBTOOL' not found in library
configure.ac:38: error: possibly undefined macro: AM_PROG_LIBTOOL
? ? ? If this token and others are legitimate, please use m4_pattern_allow.
? ? ? See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
搜索了一下,缺少libtool,安裝解決
$ sudo apt-get install libtool
接著來(lái)了第二個(gè)錯(cuò)誤:
$ ./autogen.sh
Updating build configuration files, please wait....
libtoolize: putting auxiliary files in '.'.
libtoolize:? error: linking '/usr/share/libtool/build-aux/ltmain.sh' to './' failed
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize:? error: linking '/usr/share/aclocal/libtool.m4' to 'm4/' failed
libtoolize:? error: linking '/usr/share/aclocal/ltoptions.m4' to 'm4/' failed
libtoolize:? error: linking '/usr/share/aclocal/ltsugar.m4' to 'm4/' failed
libtoolize:? error: linking '/usr/share/aclocal/ltversion.m4' to 'm4/' failed
libtoolize:? error: linking '/usr/share/aclocal/lt~obsolete.m4' to 'm4/' failed
autoreconf: libtoolize failed with exit status: 1
原因是opus編譯代碼在我的共享文件夾下面,造成了權(quán)限問題宴猾。對(duì)我用的虛擬機(jī)VBox。
重新克隆一份opus代碼到/usr/home下叼旋,再次執(zhí)行autogen.sh鳍置,成功。
there's actually another situation that can cause the libtoolize that was not really addressed here. Permission and access issues. Consider the following situation: you're in virtualbox and trying to run libtoolize out of a VBox Shared folder, you will get this error. Move the project within the machine, error is gone.
ref:?https://stackoverflow.com/questions/31939729/regenerate-makefiles-sh-generates-libtoolize-linking-error-when-compiling-irstlm?