More info on URL; Error thrown: x86_64-pc-linux-gnu-g++ -O2 -mtune=nocona -march=nocona -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -pthread -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--as-needed -o .libs/gparser parser.o -Wl,--export-dynamic -L/usr/lib64 ../server/.libs/libgnashserver.so -L/lib -L/usr/lib ../libbase/.libs/libgnashbase.so ../backend/.libs/libgnashbackend.so /mnt/data/tmp/portage/net-www/gnash-0.8.0/work/gnash-0.8.0/server/.libs/libgnashserver.so /mnt/data/tmp/portage/net-www/gnash-0.8.0/work/gnash-0.8.0/libamf/.libs/libgnashamf.so /mnt/data/tmp/portage/net-www/gnash-0.8.0/work/gnash-0.8.0/libgeometry/.libs/libgnashgeo.so /usr/lib64/libxml2.so /usr/lib64/libSDL.so /usr/lib64/libaa.so -lncurses -lgpm /usr/lib64/libpangox-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so ../libamf/.libs/libgnashamf.so /mnt/data/tmp/portage/net-www/gnash-0.8.0/work/gnash-0.8.0/libbase/.libs/libgnashbase.so /usr/lib64/libjpeg.so /usr/lib64/libcurl.so -lssl -lcrypto /usr/lib/libGLU.so /usr/lib64/libGL.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libXmu.so /usr/lib64/libXt.so /usr/lib64/libltdl.so -lboost_date_time-mt -lboost_thread-mt -lpthread /usr/lib64/libdts.so /usr/lib64/libvorbisenc.so /usr/lib64/libvorbis.so -lavformat -lavcodec -lz -lx264 -lxvidcore /usr/lib64/libfaac.so /usr/lib64/libfaad.so -lavutil /usr/lib64/libtheora.so /usr/lib64/libogg.so /usr/lib64/libglib-2.0.so -lrt /usr/lib64/libXi.so /usr/lib64/libX11.so /usr/lib64/libXext.so /usr/lib64/libXdmcp.so -ldl /usr/lib64/libXau.so -lm ../server/.libs/libgnashserver.so: undefined reference to `av_alloc_format_context()' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_close(AVCodecContext*)' ../server/.libs/libgnashserver.so: undefined reference to `av_close_input_file(AVFormatContext*)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_init()' ../server/.libs/libgnashserver.so: undefined reference to `audio_resample(ReSampleContext*, short*, short*, int)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_decode_video(AVCodecContext*, AVFrame*, int*, unsigned char*, int)' ../server/.libs/libgnashserver.so: undefined reference to `av_seek_frame(AVFormatContext*, int, long, int)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_decode_audio2(AVCodecContext*, short*, int*, unsigned char*, int)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_find_decoder(CodecID)' ../server/.libs/libgnashserver.so: undefined reference to `av_register_all()' ../libbase/.libs/libgnashbase.so: undefined reference to `avpicture_get_size(int, int, int)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_alloc_frame()' ../server/.libs/libgnashserver.so: undefined reference to `audio_resample_init(int, int, int, int)' ../server/.libs/libgnashserver.so: undefined reference to `init_put_byte(ByteIOContext*, unsigned char*, int, int, void*, int (*)(void*, unsigned char*, int), int (*)(void*, unsigned char*, int), long (*)(void*, long, int))' ../libbase/.libs/libgnashbase.so: undefined reference to `sws_getContext(int, int, int, int, int, int, int, SwsFilter*, SwsFilter*, double*)' ../libbase/.libs/libgnashbase.so: undefined reference to `sws_scale(SwsContext*, unsigned char**, int*, int, int, unsigned char**, int*)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)' ../server/.libs/libgnashserver.so: undefined reference to `av_probe_input_format(AVProbeData*, int)' ../libbase/.libs/libgnashbase.so: undefined reference to `avpicture_fill(AVPicture*, unsigned char*, int, int, int)' ../server/.libs/libgnashserver.so: undefined reference to `av_open_input_stream(AVFormatContext**, ByteIOContext*, char const*, AVInputFormat*, AVFormatParameters*)' ../server/.libs/libgnashserver.so: undefined reference to `av_free(void*)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_register_all()' ../server/.libs/libgnashserver.so: undefined reference to `audio_resample_close(ReSampleContext*)' ../server/.libs/libgnashserver.so: undefined reference to `avcodec_alloc_context()' ../server/.libs/libgnashserver.so: undefined reference to `av_init_packet(AVPacket*)' ../server/.libs/libgnashserver.so: undefined reference to `av_read_frame(AVFormatContext*, AVPacket*)' ../server/.libs/libgnashserver.so: undefined reference to `av_find_stream_info(AVFormatContext*)' collect2: ld returned 1 exit status make[2]: *** [gparser] Fehler 1
confirm this bug. emerge --info: Portage 2.1.3_rc6 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r3, 2.6.21-gentoo-r3 i686) ================================================================= System uname: 2.6.21-gentoo-r3 i686 AMD Athlon(tm) 3200+ Gentoo Base System release 1.12.10 Timestamp of tree: Sat, 30 Jun 2007 14:50:01 +0000 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -pipe -march=athlon-xp -mtune=athlon-xp -mmmx -msse -m3dnow -fomit-frame-pointer -fforce-addr -minline-all-stringops -maccumulate-outgoing-args" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=athlon-xp -mtune=athlon-xp -mmmx -msse -m3dnow -fomit-frame-pointer -fforce-addr -minline-all-stringops -maccumulate-outgoing-args" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.belnet.be/gentoo-portage" USE="3dnow 3dnowext 7zip X a52 aac acl acpi alsa aotuv apm bash-completion berkdb bitmap-fonts bzip2 cairo cdda cdr cjk cli cracklib crypt cups curl d dbus deprecated discouraged dri dts dv dvb dvd dvdr dvdread encode fbcon ffmpeg firefox flac fortran ftp gcj gdbm gif gimp glade gnome gpm gstreamer gtk gtk2 gtkhtml hal httpd iconv inherit-graph ipv6 isdnlog java javascript jpeg jpeg2k kerberos kqemu ldap libg++ lm_sensors lzo mad matroska midi mime mjpeg mmx mmxext mng mono mp3 mp4 mpeg msn mudflap musepack nas ncurses nls nodrm nptl nptlonly nsplugin ogg openal opengl openmp pam pcre pdf perl php png pppd python quicktime readline reflection ruby samba scanner sdl session snmp sockets socks5 sourceview speex spell spl sse ssl stream subversion svg svga tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode usb v4l valgrind vcd vim-syntax vorbis wifi wmf wxwindows x264 x86 xinerama xml xorg xpm xv xvid yv12 zip zlib" ALSA_CARDS="emu10k1 via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" DVB_CARDS="dibusb-usb2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I can confirm as well. What's more it seems to enabling as-needed even if you don't use LDFLAGS in make.conf. There's a check in configure for it. I tried setting --no-as-needed, and it decided to use this: LDFLAGS = -Wl,-O1,--no-as-needed -Wl,--as-needed Now, normally I do use --as-needed, and I'm all for it, but this is just annoying. I've been trying to find out where the link problems are, but it does link to all the required ffmpeg libraries. Nevertheless, it still ends up with undefined symbols. I'll attach the ldd output for each problem library. ldd reports no undefined symbols for the ffmpeg libraries on the system.
Bugzilla went dyslexic on me and added the attachments to bug 183741. Wtf?
Created attachment 124119 [details, diff] gnash-as-needed-patch.patch With connection with filter flags it should be a quick & dirty solution
*** Bug 183741 has been marked as a duplicate of this bug. ***
I added a few lines to gnash-0.8.0 but I commented them since it does not work for me. The patch and filtering the flags makes no difference at all :( This really needs to be fixed correctly.
Ok, I found the cause and got some workaround or fix(?). I will attach the patches, one for ffmpeg and one for gnash. Latter one will have to raise ffmpeg depend so that it can link to new libswscale from ffmpeg.
Created attachment 124484 [details, diff] ffmpeg patch
Created attachment 124486 [details, diff] gnash patch
media-video: please take a look at the ffmpeg patch and apply it if possible :)
(In reply to comment #10) > media-video: please take a look at the ffmpeg patch and apply it if possible :) > imho it's better to do the "extern "C"" stuff around the #include's of ffmpeg's headers in gnash code since it has been dropped upstream. btw, swscale is present only in ffmpeg-0.4.9_p20070616-r1 so if you link unconditionally to it you should update the deps. It would be better to ask pkg-config for swscale as previous versions should wrap it, have swscale.h and libswscale.pc will automagically tell the libs to link to. (but I've seen cases where using the wrappers to swscale when swscale wasn't compiled in ffmpeg didn't work)
Example of pkgconfig can be found in, media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-1.1.2-ffmpeg.patch
I've tried compiling it with "--enable-media=GST" rather than "--enable-media=ffmpeg" and that appears to work at least to some extent (I've got at least one .swf file which produces music). It seems as if a few more USE flags are required. I tried compiling with both --enable-static and --enable-shared and that worked. Some people might also like a "debug" use flag (I've got at least one swf file which produces a core dump) and a "wrote" use flag (for --enable-write if one wants to save temporary files).
I have ffmpeg installed, but I tried to use the gstreamer and -ffmpeg flags for gnash: [ebuild N ] net-www/gnash-0.8.0 USE="gstreamer xml -agg -ffmpeg -kde -nsplugin" VIDEO_CARDS="-i810" 0 kB Unfortunately, it still uses ffmpeg. Here is some lines of build.log: Configurable options are: (...) Media handler: ffmpeg Quit strange, because there are these lines in the ebuild: if use gstreamer && use !ffmpeg; then myconf="${myconf} --enable-media=gst" Did I miss something?
JFYI, gnash cvs is fixed wrt 'extern "C"' issue. A patch is attached at https://savannah.gnu.org/bugs/?20002
Stefan, I patch gnash to use extern "C" {} 's where needed and use pkg-config to check for -lswscale.. Got tired of this bugspam. ;) 23 Jul 2007; Samuli Suominen <drac@gentoo.org> +files/gnash-0.8.0-ffmpeg.patch, gnash-0.8.0.ebuild: Fix building with --as-needed and swscaler enabled ffmpeg-20070616-r1 for bug 183714. Now people, if you have other issues with gnash open a separate bug for them, thanks.