[Ambulant-users] build problem (net/ffmpeg_common.cpp:111: error: ‘CODEC_ID_MPEG4AAC’ was not declared in this scope)

Joost Geurts Joost.Geurts at inria.fr
Mon Apr 27 11:24:06 CEST 2009


Thanks Jack, that helped compiling libambulant. However, there is  
still something going wrong with ffmpeg when linking:

/bin/sh ../../libtool --tag=CXX   --mode=link g++  -g -O2  -L/Users/ 
geurts/tmp/ambulant/third_party_packages/ffmpeg/libavformat -L/Users/ 
geurts/tmp/ambulant/third_party_packages/ffmpeg/libavcodec -L/Users/ 
geurts/tmp/ambulant/third_party_packages/ffmpeg/libavutil -lavformat - 
lavcodec -lz -lbz2 -lm -lavutil -L/Users/geurts/tmp/ambulant/ 
third_party_packages/ffmpeg/libavcodec -L/Users/geurts/tmp/ambulant/ 
third_party_packages/ffmpeg/libavutil -lavcodec -lz -lbz2 -lm -lavutil  
-L/Users/geurts/tmp/ambulant/third_party_packages/ffmpeg/libavutil - 
lavutil  -o libambulant_ffmpeg.la -rpath /usr/local/lib  
ffmpeg_common.lo ffmpeg_audio.lo ffmpeg_video.lo ffmpeg_raw.lo  
demux_datasource.lo
libtool: link: g++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup - 
o .libs/libambulant_ffmpeg.0.dylib  .libs/ffmpeg_common.o .libs/ 
ffmpeg_audio.o .libs/ffmpeg_video.o .libs/ffmpeg_raw.o .libs/ 
demux_datasource.o   -L/Users/geurts/tmp/ambulant/third_party_packages/ 
ffmpeg/libavformat -L/Users/geurts/tmp/ambulant/third_party_packages/ 
ffmpeg/libavcodec -L/Users/geurts/tmp/ambulant/third_party_packages/ 
ffmpeg/libavutil -lavformat -lavcodec -lz -lbz2 -lm -lavutil    - 
install_name  /usr/local/lib/libambulant_ffmpeg.0.dylib - 
compatibility_version 1 -current_version 1.0 -Wl,-single_module
ld warning: codegen in _av_register_all (offset 0x00000004) prevents  
image from loading in dyld shared cache
ld warning: codegen in _av_register_all (offset 0x00000012) prevents  
image from loading in dyld shared cache
ld warning: codegen in _av_register_all (offset 0x00000025) prevents  
image from loading in dyld shared cache
ld warning: codegen in _av_register_all (offset 0x00000032) prevents  
image from loading in dyld shared cache
ld warning: codegen in _av_register_all (offset 0x0000003F) prevents  
image from loading in dyld shared cache
... <removed warnings>
ld warning: codegen in _av_log_get_level (offset 0x00000001) prevents  
image from loading in dyld shared cache
ld warning: codegen in _av_log_set_level (offset 0x00000005) prevents  
image from loading in dyld shared cache
ld warning: codegen in _av_log_set_callback (offset 0x00000005)  
prevents image from loading in dyld shared cache
ld warning: codegen in _av_log (offset 0x00000028) prevents image from  
loading in dyld shared cache
ld: absolute addressing (perhaps -mdynamic-no-pic) used in  
_av_register_all from /Users/geurts/tmp/ambulant/third_party_packages/ 
ffmpeg/libavformat/libavformat.a(allformats.o) not allowed in slidable  
image. Use '-read_only_relocs suppress' to enable text relocs
collect2: ld returned 1 exit status
make[2]: *** [libambulant_ffmpeg.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Any suggestions :)

Thanks Joost




On 24 apr 2009, at 22:38, Jack Jansen wrote:

>
> On  24-Apr-2009, at 16:45 , Joost Geurts wrote:
>
>> Hello,
>>
>> I am trying to build ambulant from CVS on Mac OSX (darwin 9.6.0)  
>> using the provided instructions. Unfortunately  it seems I run into  
>> a missing codec/library problem although  ffmpeg compiles fine  
>> (including faad). Any help is appreciated!
>>
>> thanks joost
>>
>> the reported error is:
> [...]
>> net/ffmpeg_common.cpp:111: error: ‘CODEC_ID_MPEG4AAC’ was not  
>> declared in this scope
>
> This looks like there is some version error/conflict with ffmpeg.
>
> For me, avcodec.h defines CODEC_ID_MPEG4AAC if the libavcodec  
> version is less than 52.0.0. And the version is set (at the top of  
> the same file) as 51.57.2.
>
> But another fix could be to replace the occurrence (in the ambulant  
> sources) of CODEC_ID_MPEG4AAC with CODEC_ID_AAC, which seems to be  
> the newer define to use.
> --
> Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
> If I can't dance I don't want to be part of your revolution -- Emma  
> Goldman
>
>
>



More information about the Ambulant-users mailing list