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

Jack Jansen Jack.Jansen at cwi.nl
Mon Apr 27 16:12:34 CEST 2009


Building ffmpeg on OSX in such a way that you can include the static  
library into a dynamic binary (which is what we want to do for  
Ambulant) is a bit nasty: for the ffmpeg configure, there's no  
distinction between "build the dynamic library" and "build the code so  
that it can be used in a dynamic library".

If you build exactly the version that we've specified, and build it  
exactly following the recipe outlined in third_party_packages/readme- 
osx.txt then everything should work. If you're using a different  
ffmpeg version (which it seems you're doing?) you may need to make  
some amends. If you carefully read third_party_packages/readme-osx.txt  
and the accompanying script, ffmpeg-osx-fatbuild.sh, you should be  
able to figure out what to do (or where to look) to fix things.

But: unless you have very good reason to do things differently, I  
would suggest you follow the instructions to the letter.

The good news (also for the other ambulant-users subscribers) is that  
for the next Ambulant release these problems should finally be a thing  
of the past. Now that the ffmpeg developers have finally issued a  
release again we have a fixed target that we can aim at, the ffmpeg  
0.5 release. That means that building ffmpeg for Ambulant should  
become a lot more predictable.

On 27 apr 2009, at 11:24, Joost Geurts wrote:

> 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 :)

--
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