從官網下載了最新的opus 1.3的代碼,然后按照readme說明進行編譯。
配置的時候出現(xiàn)如下錯誤:
$ ./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
接著來了第二個錯誤:
$ ./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編譯代碼在我的共享文件夾下面,造成了權限問題。對我用的虛擬機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?