Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357589 - media-video/mplayer-1.0_rc4_p20110302 fails linking mencoder
Summary: media-video/mplayer-1.0_rc4_p20110302 fails linking mencoder
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 00:45 UTC by Harris Landgarten
Modified: 2011-12-15 13:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (1299371954-install-media-video_mplayer-1.0_rc4_p20110302:0::gentoo.out,278.50 KB, text/plain)
2011-03-06 00:46 UTC, Harris Landgarten
Details
config.log (config.log,161.97 KB, text/plain)
2011-03-06 19:02 UTC, Harris Landgarten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2011-03-06 00:45:39 UTC
ffmpeg/libavcodec/libavcodec.a(libvorbis.o): In function `oggvorbis_encode_init':
libvorbis.c:(.text.unlikely+0xad): undefined reference to `vorbis_encode_setup_vbr'
libvorbis.c:(.text.unlikely+0xe7): undefined reference to `vorbis_encode_setup_managed'
libvorbis.c:(.text.unlikely+0x108): undefined reference to `vorbis_encode_ctl'
libvorbis.c:(.text.unlikely+0x140): undefined reference to `vorbis_encode_ctl'
libvorbis.c:(.text.unlikely+0x168): undefined reference to `vorbis_encode_ctl'
libvorbis.c:(.text.unlikely+0x170): undefined reference to `vorbis_encode_setup_init'
collect2: ld returned 1 exit status
make: *** [mencoder] Error 1
make: *** Waiting for unfinished jobs....


full build log to follow.

This are the flags:

3dnow -3dnowext X a52 -aalib alsa (-altivec) -amr (-aqua) ass -bidi -bindist -bl -bluray -bs2b -cddb* cdio -cdparanoia -cpudetection -custom-cpuopts -debug -dga dirac -directfb -doc dts dv -dvb dvd dvdnav -dxr3 enca encode esd faac faad -fbcon -ftp -ggi gif -gsm iconv ipv6 -jack -joystick jpeg -jpeg2k -ladspa -libcaca -libmpeg2 -lirc live -lzo mad -md5sum mmx -mmxext mng mp3 -mpg123 -nas network -nut -openal opengl osdmenu -oss png -pnm pulseaudio -pvr quicktime -radio rar real rtc -rtmp -samba schroedinger sdl shm speex sse sse2 ssse3* -tga theora toolame tremor truetype twolame unicode -v4l -v4l2 vdpau (-vidix) vorbis -vpx (-win32codecs) x264 -xanim xinerama xscreensaver xv xvid -xvmc -zoran VIDEO_CARDS: -mga -s3virge -tdfx vesa build_options: -optional_tests split strip -trace -preserve_work




Reproducible: Always
Comment 1 Harris Landgarten 2011-03-06 00:46:45 UTC
Created attachment 264885 [details]
build log

failed build log
Comment 2 Chris Coleman 2011-03-06 07:34:01 UTC
Those symbols are part of libvorbisenc. The link statement for mencoder is missing -lvorbisenc on your system.
Comment 3 Chris Coleman 2011-03-06 08:17:37 UTC
I can't reproduce this, but I think it has something to do with this in ./configure:

if test "$_libvorbis" = auto; then
  _libvorbis=no
  for vorbislibs in '-lvorbis -logg' '-lvorbis -lvorbisenc -logg' ; do
    statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0)' $vorbislibs $_ld_lm && _libvorbis=yes && break
  done
fi

Apparently, on your system, the configure script decides that -lvorbisenc isunnecessary because the symbol 'vorbis_encode_ctl' is available with just -lvorbis and -logg. But when linking mencoder without -lvorbisenc 'vorbis_encode_ctl' is undefined.

I'm not really sure what's happening.
Comment 4 Chris Coleman 2011-03-06 08:25:05 UTC
Would you mind emerging mplayer with USE=keepwork and then posting config.log?
Comment 5 Chris Coleman 2011-03-06 08:43:57 UTC
(In reply to comment #4)
> Would you mind emerging mplayer with USE=keepwork and then posting config.log?
> 

Sorry, I meant FEATURES=keepwork.
Comment 6 Harris Landgarten 2011-03-06 19:02:36 UTC
Created attachment 264991 [details]
config.log

config.log as requested
Comment 7 Chris Coleman 2011-03-06 20:52:30 UTC
Got it. For some reason you're missing -Wl,--as-needed in your LDFLAGS. It needs to be set for that configure check to work properly.

Try adding this to /etc/make.conf:

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

That should be the default value anyway.
Comment 8 Harris Landgarten 2011-03-07 17:04:52 UTC
(In reply to comment #7)
> Got it. For some reason you're missing -Wl,--as-needed in your LDFLAGS. It
> needs to be set for that configure check to work properly.
> 
> Try adding this to /etc/make.conf:
> 
> LDFLAGS="-Wl,-O1 -Wl,--as-needed"
> 
> That should be the default value anyway.

I edited the bashrc file in /etc/paludis so the the LDFLAGS are as you indicated. They were previously :

LDFLAGS="-Wl,-O1"

that did indeed fix the problem. Thanks.
Comment 9 Alexis Ballier gentoo-dev 2011-12-15 13:11:55 UTC
should be fixed in 1.0_rc4_p20111215 in any case