lyx2014 / g729

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

G729 Bug - undefined reference to `bad_lsf' #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. First time build of doubango v2.
2. Follow all the steps as exactly as in the Technical Guide June 2013 rev of 
webrtc2sip
3../autogen.sh && ./configure --with-ssl --with-srtp --with-vpx --with-amr 
--with-speex --with-speexdsp --with-gsm --with-ilbc --with-g729 --with-ffmpeg

What is the expected output? What do you see instead?
autogen and configure to be completed successfully. 

What is the gotten output?
checking for g729b/ld8a.h... yes
checking for Init_Decod_ld8a in -lg729b... (cached) no
configure: error: You requested G729 audio codec but not found...die

What version of the product are you using? On what operating system?
Doubang V2. svn co'ed today morning IST. OS is centOS 6.4 64 bit

Please provide any additional information below.
console out pasted below and configure.log attached 
=====================================================

[root@WebRTC2SIP doubango]# ./autogen.sh && ./configure --with-ssl --with-srtp 
--with-vpx --with-amr --with-speex --with-speexdsp --with-gsm --with-ilbc 
--with-g729 --with-ffmpeg

libtoolize

libtoolize: putting auxiliary files in `.'.

libtoolize: copying file `./ltmain.sh'

libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.

libtoolize: copying file `m4/libtool.m4'

libtoolize: copying file `m4/ltoptions.m4'

libtoolize: copying file `m4/ltsugar.m4'

libtoolize: copying file `m4/ltversion.m4'

libtoolize: copying file `m4/lt~obsolete.m4'

aclocal

autoheader

create NEWS, README, AUTHORS and ChangeLog

autoreconf

automake

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking for a BSD-compatible install... /usr/bin/install -c

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking for a sed that does not truncate output... /bin/sed

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for fgrep... /bin/grep -F

checking for ld used by gcc... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1966080

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for ar... ar

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc object... ok

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for dlfcn.h... yes

checking whether we are using the GNU C++ compiler... (cached) yes

checking whether g++ accepts -g... (cached) yes

checking dependency style of g++... (cached) gcc3

checking how to run the C++ preprocessor... g++ -E

checking for objdir... .libs

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC -DPIC

checking if gcc PIC flag -fPIC -DPIC works... yes

checking if gcc static flag -static works... no

checking if gcc supports -c -o file.o... yes

checking if gcc supports -c -o file.o... (cached) yes

checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking for ld used by g++... /usr/bin/ld -m elf_x86_64

checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes

checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes

checking for g++ option to produce PIC... -fPIC -DPIC

checking if g++ PIC flag -fPIC -DPIC works... yes

checking if g++ static flag -static works... no

checking if g++ supports -c -o file.o... yes

checking if g++ supports -c -o file.o... (cached) yes

checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking for a sed that does not truncate output... (cached) /bin/sed

checking whether make sets $(MAKE)... (cached) yes

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking whether to enable debugging... checking for stricmp... no

checking for strnicmp... no

checking for poll... yes

checking net/if_types.h usability... no

checking net/if_types.h presence... no

checking for net/if_types.h... no

checking net/if_dl.h usability... no

checking net/if_dl.h presence... no

checking for net/if_dl.h... no

checking poll.h usability... yes

checking poll.h presence... yes
checking for poll.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for getifaddrs... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking for net/if_dl.h... (cached) no
checking for net/if_types.h... (cached) no
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking net/route.h usability... yes
checking net/route.h presence... yes
checking for net/route.h... yes
checking for struct rt_metrics... no
checking for struct sockaddr_dl... no
checking dns.h usability... no
checking dns.h presence... no
checking for dns.h... no
checking for dns_search in -lresolv... no
checking for clock_gettime in -lrt... yes
checking for struct sockaddr_storage.ss_len... no
checking for struct sockaddr.sa_len... no
checking srtp/srtp.h usability... yes
checking srtp/srtp.h presence... yes
checking for srtp/srtp.h... yes
checking for srtp_create in -lsrtp... yes
checking for append_salt_to_key in -lsrtp... yes
checking for srtp_profile_get_master_key_length in -lsrtp... yes
checking for srtp_profile_get_master_salt_length in -lsrtp... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking for SSL_library_init in -lssl... yes
checking for BN_init in -lcrypto... yes
checking for SSL_CTX_set_tlsext_use_srtp in -lssl... yes
checking for DTLSv1_method in -lssl... yes
checking libavutil/avutil.h usability... yes
checking libavutil/avutil.h presence... yes
checking for libavutil/avutil.h... yes
checking for av_gettime in -lavutil... yes
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking for sws_scale in -lswscale... yes
checking libavcodec/avcodec.h usability... yes
checking libavcodec/avcodec.h presence... yes
checking for libavcodec/avcodec.h... yes
checking for avcodec_find_encoder in -lavcodec... yes
checking vpx/vpx_encoder.h usability... yes
checking vpx/vpx_encoder.h presence... yes
checking for vpx/vpx_encoder.h... yes
checking for vpx_codec_encode in -lvpx... yes
checking vpx/vpx_decoder.h usability... yes
checking vpx/vpx_decoder.h presence... yes
checking for vpx/vpx_decoder.h... yes
checking for vpx_codec_encode in -lvpx... (cached) yes
checking libyuv/libyuv.h usability... no
checking libyuv/libyuv.h presence... no
checking for libyuv/libyuv.h... no
checking opencore-amrnb/interf_dec.h usability... yes
checking opencore-amrnb/interf_dec.h presence... yes
checking for opencore-amrnb/interf_dec.h... yes
checking for Encoder_Interface_init in -lopencore-amrnb... yes
checking opencore-amrnb/interf_enc.h usability... yes
checking opencore-amrnb/interf_enc.h presence... yes
checking for opencore-amrnb/interf_enc.h... yes
checking for Encoder_Interface_init in -lopencore-amrnb... (cached) yes
checking opus/opus.h usability... yes
checking opus/opus.h presence... yes
checking for opus/opus.h... yes
checking for opus_decoder_create in -lopus... yes
checking speex/speex.h usability... yes
checking speex/speex.h presence... yes
checking for speex/speex.h... yes
checking for speex_decode_int in -lspeex... yes
checking speex/speex_preprocess.h usability... yes
checking speex/speex_preprocess.h presence... yes
checking for speex/speex_preprocess.h... yes
checking for speex_preprocess_state_init in -lspeexdsp... yes
checking speex/speex_jitter.h usability... yes
checking speex/speex_jitter.h presence... yes
checking for speex/speex_jitter.h... yes
checking for jitter_buffer_init in -lspeexdsp... yes
checking speex/speex_resampler.h usability... yes
checking speex/speex_resampler.h presence... yes
checking for speex/speex_resampler.h... yes
checking for speex_resampler_init in -lspeexdsp... yes
checking speex/speex_echo.h usability... yes
checking speex/speex_echo.h presence... yes
checking for speex/speex_echo.h... yes
checking for speex_echo_playback in -lspeexdsp... yes
checking gsm.h usability... yes
checking gsm.h presence... yes
checking for gsm.h... yes
checking for gsm_create in -lgsm... yes
checking for g729b/typedef.h... yes
checking for Init_Decod_ld8a in -lg729b... no
checking for g729b/ld8a.h... yes
checking for Init_Decod_ld8a in -lg729b... (cached) no
configure: error: You requested G729 audio codec but not found...die
================================================================

Original issue reported on code.google.com by vmelache...@gmail.com on 1 Jul 2013 at 3:42

Attachments:

GoogleCodeExporter commented 9 years ago
The exact problem is this line in config.log,

/usr/local/src/webRTC2SIP/g729b/dec_ld8a.c:198: undefined reference to `bad_lsf'

Thank you.

Original comment by shaherya...@gmail.com on 2 Jul 2013 at 12:38

GoogleCodeExporter commented 9 years ago
Here is a patch which resolves the problem. Though it can be improved further..!

Original comment by shaherya...@gmail.com on 2 Jul 2013 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for quick response.
I tried to apply patch but patching failed as below.
-------------------------
[root@WebRTC2SIP g729b]# patch < bad_lsf.patch
patching file dec_ld8a.c
Hunk #1 FAILED at 136.
1 out of 1 hunk FAILED -- saving rejects to file dec_ld8a.c.rej
-------------------------------------

Original comment by vmelache...@gmail.com on 2 Jul 2013 at 5:16

GoogleCodeExporter commented 9 years ago
Can any one help me resolve above patching problems.

Original comment by vmelache...@gmail.com on 3 Jul 2013 at 9:32

GoogleCodeExporter commented 9 years ago
bad_lsf is an extern variable. Just declare it somewhere in your wrapper code 
and assign it.

Original comment by shaiful....@gmail.com on 2 Oct 2013 at 6:46

GoogleCodeExporter commented 9 years ago
Thank's

Original comment by f.abelja...@gmail.com on 7 Oct 2013 at 7:24

GoogleCodeExporter commented 9 years ago
I declared bad_lsf  in coder.c to compile a application

Original comment by vimales...@gmail.com on 23 Oct 2013 at 5:26