Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 132171

Summary: media-video/ffmpeg fails with LDFLAGS="-Wl,--as-needed"
Product: Gentoo Linux Reporter: Hanno Böck <hanno>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    

Description Hanno Böck gentoo-dev 2006-05-03 13:32:55 UTC
/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.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-07 20:48:51 UTC
emerge info would be useful, because here ffmpeg works perfectly.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-07 21:22:42 UTC
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.