[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
Wed Apr 29 14:31:17 CEST 2009
I managed to compile libambulant! The trick was to remove the explcit
references to -lavcodec -lavutil -lavformat -lavdevice from lib*-
uninstalled.pc and just keep -L${libdir}. I am not sure why this is a
problem as they are supposed to reference the same libraries right?
Anyway the next problem is :
gtk_logger.h:41:38: error: ambulant/lib/byte_buffer.h: No such file or
directory.
ambulant/lib/byte_buffer.h seems indeed absent in CVS, is this correct?
Finally, I am happy to hear compiling ambulant will be easier in the
future, it is indeed a bit of a hassle at the moment. Do you have a
target date in mind? Perhaps a daily build could be an option until
then or is this too hard to setup? Anyway thanks a lot for ambulant!
joost
the full error:
Making all in player_gtk
g++ -DPACKAGE_NAME=\"ambulant\" -DPACKAGE_TARNAME=\"ambulant\" -
DPACKAGE_VERSION=\"2.1\" -DPACKAGE_STRING=\"ambulant\ 2.1\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ambulant\" -DVERSION=\"2.1\" -
DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -
DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -
DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -
DHAVE_UNISTD_H=1 -DLT_MODULE_EXT=\".so\" -DLT_MODULE_PATH_VAR=
\"DYLD_LIBRARY_PATH\" -DLT_DLSEARCH_PATH=\"/usr/local/lib:/lib:/usr/lib
\" -DHAVE_LIBDL=1 -DHAVE_DLERROR=1 -DHAVE_LIBDLLOADER=1 -
DHAVE_DLFCN_H=1 -Derror_t=int -D__error_t_defined=1 -DLT_OBJDIR=
\".libs/\" -DHAVE_PRELOADED_SYMBOLS=1 -DHAVE_UNISTD_H=1 -
DHAVE_MACH_O_DYLD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_CLOSEDIR=1 -
DHAVE_OPENDIR=1 -DHAVE_READDIR=1 -DHAVE_STRLCAT=1 -DHAVE_STRLCPY=1 -
DLT_LIBEXT=\"\" -DLT_OBJDIR=\".libs/\" -DHAVE_ICONV=1 -DENABLE_NLS=1 -
DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DWITH_LTDL_PLUGINS=1 -
DWITH_SMIL30=1 -DWITH_EXTERNAL_DOM=1 -DWITH_OVERLAY_WINDOW=1 -
DWITH_EXPAT=1 -DHAVE_PTHREAD=1 -I. -DAMBULANT_DATADIR=\"/usr/local/
share/ambulant\" -DWITH_SDL -DWITH_FFMPEG -DWITH_FFMPEG_AVFORMAT -I/
Users/geurts/tmp/ambulant/third_party_packages/ffmpeg -I/Users/
geurts/tmp/ambulant/third_party_packages/ffmpeg -I/Users/geurts/tmp/
ambulant/third_party_packages/ffmpeg -DLOCALEDIR=\"/usr/local/share/
locale\" -DWITH_LIVE -I../../include -I../../include -I../../include/
ambulant/gui/gtk -I../../include/ambulant/gui/gtk -I/Users/geurts/tmp/
ambulant/third_party_packages/expat-unix/include -D_REENTRANT -I/opt/
local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/
include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/
pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/
include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/
local/include/freetype2 -I/opt/local/include/libpng12 -I/Users/
geurts/tmp/ambulant/third_party_packages/live/BasicUsageEnvironment/
include -I/Users/geurts/tmp/ambulant/third_party_packages/live/
groupsock/include -I/Users/geurts/tmp/ambulant/third_party_packages/
live/liveMedia/include -I/Users/geurts/tmp/ambulant/
third_party_packages/live/UsageEnvironment/include -g -O2 -MT
gtk_gui.o -MD -MP -MF .deps/gtk_gui.Tpo -c -o gtk_gui.o gtk_gui.cpp
In file included from gtk_gui.h:34,
from gtk_gui.cpp:28:
gtk_logger.h:41:38: error: ambulant/lib/byte_buffer.h: No such file or
directory
gtk_logger.h:82: error: ‘ambulant::lib::byte_buffer’ has not been
declared
gtk_gui.cpp: In constructor ‘gtk_gui::gtk_gui(const char*, const
char*)’:
gtk_gui.cpp:326: error: invalid conversion from ‘_opaque_pthread_t*’
to ‘long unsigned int’
gtk_gui.cpp: In member function ‘void gtk_gui::internal_message(int,
char*)’:
gtk_gui.cpp:959: error: ISO C++ forbids comparison between pointer and
integer
make[2]: *** [gtk_gui.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
On 27 apr 2009, at 16:12, Jack Jansen wrote:
> 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