/SDL -D_REENTRANT -c -o ffplay.o ffplay.c i686-pc-linux-gnu-gcc -Wl,--warn-common -rdynamic -Wl,-O1 -Wl,--as-needed -g -o ffplay_g ffplay.o cmdutils.o -L./libavformat -lavformat -L./libavcodec -lavcodec -L./libavutil -lavutil -lm -lmp3lame -lxvidcore -logg -lvorbis -lvorbisenc -ltheora -ldts -lx264 -lfaad -lfaac -lz -ldl -lSDL -lpthread /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/bin/ld: warning: libavutil.so.49, needed by ./libavformat/libavformat.so, not found (try using -rpath or -rpath-link) ./libavcodec/libavcodec.so: undefined reference to `ff_sqrt_tab' ./libavformat/libavformat.so: undefined reference to `av_rescale_q' ./libavformat/libavformat.so: undefined reference to `av_dbl2int' ./libavcodec/libavcodec.so: undefined reference to `av_d2q' ./libavformat/libavformat.so: undefined reference to `av_int2dbl' ./libavcodec/libavcodec.so: undefined reference to `av_div_q' ./libavformat/libavformat.so: undefined reference to `av_dbl2ext' ./libavformat/libavformat.so: undefined reference to `av_ext2dbl' ./libavcodec/libavcodec.so: undefined reference to `ff_log2_tab' ./libavformat/libavformat.so: undefined reference to `av_rescale_rnd' ./libavformat/libavformat.so: undefined reference to `av_rescale' ./libavformat/libavformat.so: undefined reference to `av_reduce' ./libavformat/libavformat.so: undefined reference to `ff_gcd' ./libavformat/libavformat.so: undefined reference to `av_int2flt' collect2: ld returned 1 exit status make: *** [ffplay_g] Error 1 !!! ERROR: media-video/ffmpeg-0.4.9_p20060302 failed.
emerge info would be useful, because here ffmpeg works perfectly.
Okay TGL suggested me the way to go, -rpath-link has to be passed. Woah for stricter binutils. I'm going to append the flags from the ebuild, as the fix is probably not suitable for upstream as it's GNU-ld only.