tsipsey / doubango

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

doubango library linker error svn revision 1039 - undefined reference to `WebRtcAecm_Free' #353

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout doubango revision 1039
2. Tried to build using ./android_build.sh (gpl version)
3. Obtained linker errors listed below for all 
architectures(armv5,armv7,armv7-a,x86 etc)

What is the expected output? What do you see instead?
Clean build is what is expected. Linker failures

What version of the product are you using? On what operating system?
svn revision 1039

Please provide any additional information below.

/bin/sh ../libtool  --tag=CXX   --mode=link 
/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-andr
oid-x86/bin/i686-linux-android-g++  -DANDROID=1 -fPIC -Os -s -lc -lm -lgcc 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/x8
6/lib/dist 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/x8
6/lib/dist/gpl -Wl,-shared,-Bsymbolic,--no-undefined,--whole-archive -lm 
-lstdc++ -lgcc -llog -ldl  -lc -lm -lgcc 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/x8
6/lib/dist 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/x8
6/lib/dist/gpl -o libtinyWRAP.la -rpath 
/Users/anand/opensource/doubango/branches/2.0/doubango/android-projects/output/g
pl/x86/lib libtinyWRAP_la-ActionConfig.lo libtinyWRAP_la-AudioResampler.lo 
libtinyWRAP_la-DDebug.lo libtinyWRAP_la-MediaContent.lo 
libtinyWRAP_la-MediaSessionMgr.lo libtinyWRAP_la-Msrp.lo 
libtinyWRAP_la-ProxyConsumer.lo libtinyWRAP_la-ProxyPluginMgr.lo 
libtinyWRAP_la-ProxyProducer.lo libtinyWRAP_la-SafeObject.lo 
libtinyWRAP_la-SipCallback.lo libtinyWRAP_la-SipEvent.lo 
libtinyWRAP_la-SipMessage.lo libtinyWRAP_la-SipSession.lo 
libtinyWRAP_la-SipStack.lo libtinyWRAP_la-SipUri.lo 
libtinyWRAP_la-SMSEncoder.lo libtinyWRAP_la-Xcap.lo 
libtinyWRAP_la-tinyWRAP_wrap.lo ../tinySAK/libtinySAK.la 
../tinyHTTP/libtinyHTTP.la ../tinyXCAP/libtinyXCAP.la 
../tinyIPSec/libtinyIPSec.la ../tinySIGCOMP/libtinySIGCOMP.la 
../tinySMS/libtinySMS.la ../tinyNET/libtinyNET.la ../tinySDP/libtinySDP.la 
../tinyRTP/libtinyRTP.la ../tinyMEDIA/libtinyMEDIA.la 
../tinyMSRP/libtinyMSRP.la ../tinyDAV/libtinyDAV.la ../tinySIP/libtinySIP.la 
-lssl -lcrypto -lavcodec -lswscale -lavutil  -lx264  -lyuv -lopus 
-lopencore-amrnb -lspeex -lspeexdsp -lgsm  -liLBC 
libtool: link: 
/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-andr
oid-x86/bin/i686-linux-android-g++  -fPIC -DPIC -shared -nostdlib 
/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-andr
oid-x86/bin/../sysroot/usr/lib/crtbegin_so.o  
.libs/libtinyWRAP_la-ActionConfig.o .libs/libtinyWRAP_la-AudioResampler.o 
.libs/libtinyWRAP_la-DDebug.o .libs/libtinyWRAP_la-MediaContent.o 
.libs/libtinyWRAP_la-MediaSessionMgr.o .libs/libtinyWRAP_la-Msrp.o 
.libs/libtinyWRAP_la-ProxyConsumer.o .libs/libtinyWRAP_la-ProxyPluginMgr.o 
.libs/libtinyWRAP_la-ProxyProducer.o .libs/libtinyWRAP_la-SafeObject.o 
.libs/libtinyWRAP_la-SipCallback.o .libs/libtinyWRAP_la-SipEvent.o 
.libs/libtinyWRAP_la-SipMessage.o .libs/libtinyWRAP_la-SipSession.o 
.libs/libtinyWRAP_la-SipStack.o .libs/libtinyWRAP_la-SipUri.o 
.libs/libtinyWRAP_la-SMSEncoder.o .libs/libtinyWRAP_la-Xcap.o 
.libs/libtinyWRAP_la-tinyWRAP_wrap.o   
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinySAK/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinyHTTP/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinyIPSec/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinySIGCOMP/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinyNET/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinySDP/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinyRTP/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinyMEDIA/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/tinyMSRP/.libs 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/x8
6/lib/dist 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/x8
6/lib/dist/gpl -llog ../tinySAK/.libs/libtinySAK.a 
../tinyHTTP/.libs/libtinyHTTP.a ../tinyXCAP/.libs/libtinyXCAP.a 
../tinyIPSec/.libs/libtinyIPSec.a ../tinySIGCOMP/.libs/libtinySIGCOMP.a 
../tinySMS/.libs/libtinySMS.a ../tinyNET/.libs/libtinyNET.a 
../tinySDP/.libs/libtinySDP.a ../tinyRTP/.libs/libtinyRTP.a 
../tinyMEDIA/.libs/libtinyMEDIA.a ../tinyMSRP/.libs/libtinyMSRP.a 
../tinyDAV/.libs/libtinyDAV.a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinyRTP/.libs/libtinyRTP.
a -lsrtp 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinyMSRP/.libs/libtinyMSR
P.a -lwebrtc_nsx -lwebrtc_apm_utility -lwebrtc_system_wrappers -lwebrtc_spl 
../tinySIP/.libs/libtinySIP.a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinyHTTP/.libs/libtinyHTT
P.a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinyIPSec/.libs/libtinyIP
Sec.a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinyMEDIA/.libs/libtinyME
DIA.a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinyNET/.libs/libtinyNET.
a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinySDP/.libs/libtinySDP.
a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinySIGCOMP/.libs/libtiny
SIGCOMP.a 
/Users/anand/opensource/doubango/branches/2.0/doubango/tinySAK/.libs/libtinySAK.
a -lssl -lcrypto -lavcodec -lswscale -lavutil -lx264 -lyuv -lopus 
-lopencore-amrnb -lspeex -lspeexdsp -lgsm -liLBC 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-an
droid-x86/bin/../lib/gcc/i686-linux-android/4.6.x-google 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-an
droid-x86/bin/../lib/gcc 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-an
droid-x86/bin/../lib/gcc/i686-linux-android/4.6.x-google/../../../../i686-linux-
android/lib 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-an
droid-x86/bin/../sysroot/usr/lib -lstdc++ -lm -lc -ldl -lgcc 
/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-andr
oid-x86/bin/../sysroot/usr/lib/crtend_so.o  -Os -Wl,-shared -Wl,-Bsymbolic 
-Wl,--no-undefined -Wl,--whole-archive   -Wl,-soname -Wl,libtinyWRAP.so.0 -o 
.libs/libtinyWRAP.so.0.0.0
../tinyDAV/.libs/libtinyDAV.a(libtinyDAV_la-tdav_webrtc_denoise.o): In function 
`tdav_webrtc_denoise_close':
tdav_webrtc_denoise.c:(.text+0xa6): undefined reference to `WebRtcAecm_Free'
../tinyDAV/.libs/libtinyDAV.a(libtinyDAV_la-tdav_webrtc_denoise.o): In function 
`tdav_webrtc_denoise_process_record':
tdav_webrtc_denoise.c:(.text+0x18b): undefined reference to `WebRtcAecm_Process'
tdav_webrtc_denoise.c:(.text+0x21a): undefined reference to `WebRtcAecm_Process'
../tinyDAV/.libs/libtinyDAV.a(libtinyDAV_la-tdav_webrtc_denoise.o): In function 
`tdav_webrtc_denoise_echo_playback':
tdav_webrtc_denoise.c:(.text+0x39b): undefined reference to 
`WebRtcAecm_BufferFarend'
tdav_webrtc_denoise.c:(.text+0x411): undefined reference to 
`WebRtcAecm_BufferFarend'
../tinyDAV/.libs/libtinyDAV.a(libtinyDAV_la-tdav_webrtc_denoise.o): In function 
`tdav_webrtc_denoise_open':
tdav_webrtc_denoise.c:(.text+0x6c5): undefined reference to `WebRtcAecm_Create'
tdav_webrtc_denoise.c:(.text+0x73c): undefined reference to `WebRtcAecm_Init'

Original issue reported on code.google.com by saket...@gmail.com on 7 Mar 2014 at 12:50

GoogleCodeExporter commented 9 years ago
In examining the config.log and makefile some more I see that libwebrtc_aecm.a 
got missed somehow.

configure:18554: checking for WebRtcAecm_Create in -lwebrtc_aecm
configure:18579: 
/Users/anand/opensource/doubango/branches/2.0/doubango/my-android-toolchain-armv
5te/bin/arm-linux-androideabi-gcc -o conftest  -DANDROID=1 -fPIC -Os -s 
-I/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/ar
mv5te/include 
-I/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/co
mmon/include 
-I/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/common/inc
lude/libyuv  -DANDROID=1 -fPIC -Os -s 
-I/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/ar
mv5te/include 
-I/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/co
mmon/include 
-I/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/common/inc
lude/libyuv  -lc -lm -lgcc 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/ar
mv5te/lib/dist 
-L/Users/anand/opensource/doubango/branches/2.0/doubango/thirdparties/android/ar
mv5te/lib/dist/gpl conftest.c -lwebrtc_aecm -lwebrtc_apm_utility 
-lwebrtc_system_wrappers -lwebrtc_spl  >&5
configure:18579: $? = 0
configure:18588: result: yes
ac_cv_lib_webrtc_aecm_WebRtcAecm_Create=yes

Missing in the auto-generated doubango/makefile
LIBWEBRTC_LIBADD = -lwebrtc_nsx  -lwebrtc_apm_utility -lwebrtc_system_wrappers 
-lwebrtc_spl

So I suspect, if I can link with -lwebrtc_aecm, the problem will go away

Anyone else seeing this issue?

Original comment by saket...@gmail.com on 7 Mar 2014 at 1:39

GoogleCodeExporter commented 9 years ago
Works fine on CentOS but it's strange because AECM is missing.
Patch:
Index: bindings/Makefile.am
===================================================================
--- bindings/Makefile.am    (revision 1037)
+++ bindings/Makefile.am    (working copy)
@@ -85,6 +85,10 @@
 libtinyWRAP_la_LIBADD += ${LIBILBC_LIBADD}
 endif

+if USE_WEBRTC
+libtinyWRAP_la_LIBADD += ${LIBWEBRTC_LIBADD}
+endif
+
 libtinyWRAP_la_SOURCES  = \
    _common/ActionConfig.cxx \
    _common/AudioResampler.cxx \
Index: configure.ac
===================================================================
--- configure.ac    (revision 1037)
+++ configure.ac    (working copy)
@@ -801,11 +801,11 @@
    have_webrtc_aec=no
    if test "$target_os" = "android"; then
        AC_CHECK_HEADERS(webrtc/echo_control_mobile.h,
-               AC_CHECK_LIB(webrtc_aecm, WebRtcAecm_Create, [have_webrtc_aec=yes], 
[], [-lwebrtc_apm_utility -lwebrtc_system_wrappers -lwebrtc_spl])
+               AC_CHECK_LIB(webrtc_aecm, WebRtcAecm_Create, [have_webrtc_aec=yes], 
[LIBWEBRTC_LIBADD="-lwebrtc_aecm ${LIBWEBRTC_LIBADD}"], [-lwebrtc_apm_utility 
-lwebrtc_system_wrappers -lwebrtc_spl])
        )
    else
        AC_CHECK_HEADERS(webrtc/echo_cancellation.h,
-               AC_CHECK_LIB(webrtc_aec, WebRtcAec_Create, [have_webrtc_aec=yes], [], 
[-lwebrtc_apm_utility -lwebrtc_system_wrappers -lwebrtc_spl])
+               AC_CHECK_LIB(webrtc_aec, WebRtcAec_Create, [have_webrtc_aec=yes], 
[LIBWEBRTC_LIBADD="-lwebrtc_aec ${LIBWEBRTC_LIBADD}"], [-lwebrtc_apm_utility 
-lwebrtc_system_wrappers -lwebrtc_spl])
        )
    fi
    # WebRTC NS

Original comment by boss...@yahoo.fr on 8 Mar 2014 at 2:56

GoogleCodeExporter commented 9 years ago
r1040

Original comment by boss...@yahoo.fr on 10 Mar 2014 at 1:28

GoogleCodeExporter commented 9 years ago
checkout version 1043, building is ok(centos 6.5), but test on device, Echo is 
still very serious, AECM does not seem to work. more detail: 
https://groups.google.com/forum/#!topic/doubango/OPh9m3QePsQ

Original comment by taolesss...@gmail.com on 10 Mar 2014 at 2:48

GoogleCodeExporter commented 9 years ago
i am also have this problem,do you solve it?

Original comment by zhangxia...@gmail.com on 19 Apr 2014 at 11:41