libtool: Version mismatch error. 解决方法

本文转载自:http://blog.csdn.net/fabeulous/article/details/46709215


在编译一个软件的时候,在 ./configure 和 make  之后可能会出现如下错误:

[plain]  view plain copy
  1. libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1ubuntu1, but the  
  2. libtool: definition of this LT_INIT comes from libtool 2.4.  
  3. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1ubuntu1  
  4. libtool: and run autoconf again.  
  5. make[5]: *** 1 Error 63  

解决方法很简单:

运行 autoreconf -ivf 即可。


参考:http://www.compdigitec.com/labs/2012/10/18/solving-libtool-version-mismatch-error/


make install fails with:
quiet_libtool: link: gcc -I/usr/local/src/freeswitch-1.0.6/src/include -I/usr/local/src/freeswitch-1.0.6/src/include -I/usr/local/src/freeswitch-1.0.6/libs/libteletone/src -fPIC -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -Wall -std=c99 -pedantic -Wdeclaration-after-statement -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/freeswitch-1.0.6/libs/apr/include -I/usr/local/src/freeswitch-1.0.6/libs/apr-util/include -I/usr/local/src/freeswitch-1.0.6/libs/apr-util/xml/expat/lib -I/usr/local/src/freeswitch-1.0.6/libs/stfu -I/usr/local/src/freeswitch-1.0.6/libs/sqlite -I/usr/local/src/freeswitch-1.0.6/libs/pcre -I/usr/local/src/freeswitch-1.0.6/libs/speex/include -Ilibs/speex/include -I/usr/local/src/freeswitch-1.0.6/libs/srtp/include -I/usr/local/src/freeswitch-1.0.6/libs/srtp/crypto/include -Ilibs/srtp/crypto/include -I/usr/local/src/freeswitch-1.0.6/libs/libedit/src -DSWITCH_HAVE_LIBEDIT -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT -g -O2 -o .libs/freeswitch freeswitch-switch.o -lm ./.libs/libfreeswitch.so -L/usr/local/src/freeswitch-1.0.6/libs/apr-util/xml/expat/lib -L/usr/lib64 /usr/local/src/freeswitch-1.0.6/libs/apr-util/xml/expat/lib/.libs/libexpat.a /usr/local/src/freeswitch-1.0.6/libs/apr/.libs/libapr-1.a -lpq libs/apr/.libs/libapr-1.a -lrt -lcrypt -lpthread libs/libedit/src/.libs/libedit.a -lssl -lcrypto -ldl -lz -lncurses -pthread -Wl,-rpath -Wl,/usr/local/freeswitch/lib
/usr/lib64/libnss3.so: undefined reference to `PR_FindSymbol'
/usr/lib64/libnss3.so: undefined reference to `PR_RWLock_Rlock'
/usr/lib64/libssl3.so: undefined reference to `PR_OpenAnonFileMap'
/usr/lib64/libssl3.so: undefined reference to `PR_UnloadLibrary'
/usr/lib64/libnss3.so: undefined reference to `PL_InitArenaPool'
/usr/lib64/libnss3.so: undefined reference to `PR_NewRWLock'
/usr/lib64/libnss3.so: undefined reference to `PR_RWLock_Wlock'
/usr/lib64/libnss3.so: undefined reference to `PR_LoadLibrary'
/lib64/libldap_r-2.4.so.2: undefined reference to `PR_GetEnv'
/usr/lib64/libssl3.so: undefined reference to `PR_LoadLibraryWithFlags'
/usr/lib64/libnssutil3.so: undefined reference to `PL_ClearArenaPool'
/usr/lib64/libnss3.so: undefined reference to `PR_DestroyRWLock'
/usr/lib64/libnss3.so: undefined reference to `PR_NewTCPSocket'
/lib64/libldap_r-2.4.so.2: undefined reference to `PR_SetEnv'
/lib64/libldap_r-2.4.so.2: undefined reference to `PR_GetLibraryName'
/usr/lib64/libssl3.so: undefined reference to `PR_ExportFileMapAsString'
/usr/lib64/libssl3.so: undefined reference to `PR_GetLibraryFilePathname'
/usr/lib64/libssl3.so: undefined reference to `PR_FindFunctionSymbol'
/usr/lib64/libnss3.so: undefined reference to `PL_NewHashTable'
/lib64/libldap_r-2.4.so.2: undefined reference to `PR_ErrorToString'
/usr/lib64/libnss3.so: undefined reference to `PR_RWLock_Unlock'
/usr/lib64/libssl3.so: undefined reference to `PR_ImportFileMapFromString'
/lib64/libldap_r-2.4.so.2: undefined reference to `PR_GetDirectorySeparator'
collect2: ld returned 1 exit status
make[1]: *** [freeswitch] Error 1
make: *** [install] Error 2


solution:

diff --git a/configure.in b/configure.in
index 9599c26..fbb9ccf 100644
--- a/configure.in
+++ b/configure.in
@@ -414,6 +414,17 @@ if test "x$have_libresolv" = "xyes"  ; then
 APR_ADDTO(SWITCH_AM_LDFLAGS, -lresolv)
 fi
 
+AC_CHECK_LIB(nspr4, PR_Initialize, have_nspr4=yes, have_nspr4=no)
+if test "x$have_nspr4" = "xyes"  ; then
+APR_ADDTO(SWITCH_AM_LDFLAGS, -lnspr4)
+fi
+
+AC_CHECK_LIB(plds4, PL_NewHashTable, have_plds4=yes, have_plds4=no)
+if test "x$have_plds4" = "xyes"  ; then
+APR_ADDTO(SWITCH_AM_LDFLAGS, -lplds4)
+fi
+
+
 ESL_LDFLAGS=
 PLATFORM_CORE_LDFLAGS=
 PLATFORM_CORE_LIBS=

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值