i686-pc-linux-gnu-gcc -o mencoder mencoder.o mp_msg-mencoder.o parser-mecmd.o xvid_vbr.o asxparser.o codec-cfg.o cpudetect.o edl.o find_sub.o get_path.o m_config.o m_option.o m_struct.o mpcommon.o parser-cfg.o playtree.o playtreeparser.o spudec.o sub_cc.o subopt-helper.o subreader.o vobsub.o libaf/af.o libaf/af_center.o libaf/af_channels.o libaf/af_comp.o libaf/af_delay.o libaf/af_dummy.o libaf/af_equalizer.o libaf/af_extrastereo.o libaf/af_format.o libaf/af_gate.o libaf/af_hrtf.o libaf/af_karaoke.o libaf/af_pan.o libaf/af_resample.o libaf/af_scaletempo.o libaf/af_sinesuppress.o libaf/af_sub.o libaf/af_surround.o libaf/af_sweep.o libaf/af_tools.o libaf/af_volnorm.o libaf/af_volume.o libaf/filter.o libaf/format.o libaf/reorder_ch.o libaf/window.o osdep/getch2.o osdep/timer-linux.o osdep/mmap_anon.o libaf/af_export.o libass/ass.o libass/ass_bitmap.o libass/ass_cache.o libass/ass_font.o libass/ass_fontconfig.o libass/ass_library.o libass/ass_mp.o libass/ass_render.o libass/ass_utils.o libaf/af_lavcresample.o libaf/af_lavcac3enc.o osdep/shmem.o unrar_exec.o libmpcodecs/libmpencoders.a libmpdemux/libmpmux.a libmpcodecs/libmpcodecs.a libmpdemux/libmpdemux.a stream/stream.a libswscale/libswscale.a libvo/libosd.a libavformat/libavformat.a libavcodec/libavcodec.a libavutil/libavutil.a libpostproc/libpostproc.a loader/libloader.a mp3lib/libmp3.a liba52/liba52.a libmpeg2/libmpeg2.a libfaad2/libfaad2.a tremor/libvorbisidec.a dvdread/libdvdread.a libdvdcss/libdvdcss.a -lfaac -lx264 -lpthread -lmp3lame -Wl,-z,noexecstack -lncurses -lsmbclient -lpng -lz -ljpeg -lgif -lasound -ldl -lpthread -lfreetype -lz -lfontconfig -lz -lmad -ltheora -logg -ldts -lxvidcore -lm -lpthread -ldl -lm mpcommon.o: In function `noconfig_all': mpcommon.c:(.text+0x2c): undefined reference to `disable_gui_conf' mpcommon.o:(.rodata+0x70): undefined reference to `disable_gui_conf' collect2: ld returned 1 exit status make: *** [mencoder] Error 1 make: *** Waiting for unfinished jobs.... * * ERROR: media-video/mplayer-1.0_rc2_p26450 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2532: Called die * The specific snippet of code: * emake || die "Failed to build MPlayer!"; * The die message: * Failed to build MPlayer! Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.7-r2, 2.6.24-gentoo-r5 i686) ================================================================= System uname: 2.6.24-gentoo-r5 i686 Intel(R) Pentium(R) M processor 1.86GHz Timestamp of tree: Tue, 15 Apr 2008 04:00:02 +0000 app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.4 dev-lang/python: 2.4.4-r9 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium-m -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=pentium-m -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac accessibility ace acl acpi aiglx alsa apache2 apm archive asf audiofile avi battery berkdb bitmap-fonts bzip2 cairo cdda cdr chm cli cpudetection cpufreq cracklib crypt css ctype cups dba dbus divx dri dts dvd dvdnav dvdr dvdread emboss encode exif exo expat fam fastbuild ffmpeg firefox flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gimp gimpprint glitz glut gmp gnutls gpm gtk gtk2 gtkhtml hal htmlhandbook iconv idn imlib isdnlog jabber java jingle jpeg kde lame lcms libg++ libnotify libvisual libwww lm_sensors mad matroska memlimit midi mikmod mmx mng modplug mozbranding mozilla mp3 mp4 mpeg msn mudflap ncurses nls no-seamonkey nptl nptlonly nsplugin offensive ogg opengl openmp oss pam panel-plugin pcmcia pcre pdf pdflib perl plugins png posix pppd python qt qt3 qt3support qt4 quicktime rar readline reflection rpm samba scanner sdl sensord session simplexml slang sndfile soap sockets spell spl srt sse sse2 ssl startup-notification svg tcpd theora thumbnail tiff tokenizer truetype truetype-fonts tta type1-fonts udev unicode usb vcd visualization vorbis wavpack wifi win32codecs wma wxwindows x264 x86 xcb xcomposite xinerama xml xml2 xorg xscreensaver xsl xv xvid zip zlib" ALSA_CARDS="snd-intel8x0 snd-intel8x0m" 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" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc glib" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Reproducible: Always Steps to Reproduce:
media-video/mplayer-1.0_rc2_p26450 also fails with the same error here (amd64).
Same here. What USE flags do you use? I've got: [ebuild U ] media-video/mplayer-1.0_rc2_p26450 [1.0_rc2_p26300-r1] USE="-3dnow -3dnowext X -a52 -aac -aalib alsa (-altivec) -amrnb -amrwb -arts -bidi -bindist -bl cddb -cdio cdparanoia (-color-console%) -cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb dvd -enca encode -esd -fbcon ftp ggi gif gtk iconv -ipv6 -jack -joystick jpeg -ladspa -libcaca -lirc -live lzo mad -md5sum mmx mmxext -mp2 mp3 -musepack -nas -nemesi -openal opengl -oss png -pnm -pulseaudio quicktime -radio rar real rtc -samba sdl -speex -srt sse sse2 -ssse3 -svga -teletext -tga -theora -tivo truetype unicode v4l v4l2 -vidix vorbis win32codecs x264 -xanim xinerama xscreensaver xv xvid xvmc -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa" 0 kB
* media-video/mplayer [U 1.0_rc2_p26300-r1 -> 1.0_rc2_p26450] <target> 3dnow 3dnowext X a52 aac aalib alsa (-altivec) -amrnb -amrwb -arts -bidi -bindist -bl -cddb -cdio cdparanoia cpudetection -custom-cflags -debug -dga -directfb doc dts -dv -dvb dvd -enca encode -esd -fbcon -ftp -ggi gif gtk iconv -ipv6 -jack -joystick jpeg -ladspa -libcaca -lirc -live -lzo mad -md5sum mmx mmxext -mp2 mp3 musepack -nas -nemesi -openal -opengl* -oss png -pnm -pulseaudio quicktime -radio -rar real rtc -samba sdl -speex -srt sse sse2 -ssse3 (-svga) -teletext -tga theora -tivo truetype unicode -v4l v4l2 (-vidix) vorbis (-win32codecs) x264 -xanim -xinerama xscreensaver xv xvid xvmc -zoran kernel: (linux) video_cards: -mga -s3virge -tdfx -vesa
*** Bug 217762 has been marked as a duplicate of this bug. ***
USE="-gtk" emerge mplayer fixed this bug for me
verified use=-gtk fixes linking issue here on ~amd64
It seems that the Makefile concept of mplayer is broken: mpcommon.c should be compiled with different #defines (and should honour them) depending on whether it is linked to mencoder or to gmplayer. As a quick&dirty fix, I just see the possibility to disable the option --disable-gui-conf Probably, most users will not need this option anyway, and this is better than to have no gui (gtk) support at all.
Created attachment 149836 [details, diff] Patch against mplayer-1.0_rc2_p26450 to disable --disable-gui-conf
Created attachment 149846 [details, diff] changes in r26454 of mplayer svn Upstream noticed this problem as well, and applied these changes here to fix it. We might either apply only those, or completely bump to at least revision 26454 of their sources. As all other changes are to documentation, it doesn't really matter. Applying the patch means we won't need a new tarball, though, and probably not even a revbump, as this is a compile time issue.
*** Bug 217858 has been marked as a duplicate of this bug. ***
See upstream diff for revision 26448 at http://svn.mplayerhq.hu/mplayer/trunk/mpcommon.c?r1=26448&r2=26454 My build.log/emerge.info which resulted in the bug described here is at https://bugs.gentoo.org/attachment.cgi?id=149808
(In reply to comment #11) > See upstream diff for revision 26448 at > http://svn.mplayerhq.hu/mplayer/trunk/mpcommon.c?r1=26448&r2=26454 That's only half the story; you need the changes to gui/cfg.c as well, otherwise you'll get duplicate symbols. So please take my attached patch, which contains both. See http://svn.mplayerhq.hu/mplayer?view=rev&revision=26454 > My build.log/emerge.info which resulted in the bug described here is at > https://bugs.gentoo.org/attachment.cgi?id=149808 Nothing new there, same errors about undefined disable_gui_conf. Try the patch.
*** Bug 217916 has been marked as a duplicate of this bug. ***
Created attachment 149925 [details, diff] declares disable_gui_conf as extern in the HEADER, not in the source file.
this bug seems to be about a different (older) version, however the bug filed for my version has been marked as duplicate of this one so i'm posting it here: this diff seems to fix the problem: diff -r mplayer-1.0_rc2_p26450/mpcommon.c mplayer-1.0_rc2_p26450-new/mpcommon.c 213c213 < extern int disable_gui_conf; --- > int disable_gui_conf; diff -r mplayer-1.0_rc2_p26450/mpcommon.h mplayer-1.0_rc2_p26450-new/mpcommon.h 16a17 > extern int disable_gui_conf; generally, there's an int disable_gui_conf declared as extern in mpcommon.c. this is wrong, extern variables should be declared as such in header files, not source files. the source file should only declare or define them locally. that's what this diff fixes. the patch from Martin Väth probably works, too, but i prefer keeping whatever functionality disable_gui_conf provides over just commenting everything :) patch added
do i only need the last patch or all of these patches?
(In reply to comment #15) > this diff seems to fix the problem: Not really: It is even worse than my patch, because it also disables the functionality because --disable-gui-conf modifies then the "wrong" instance of disable_gui_conf (Actually this should even give duplicate symbols at linking). Upstream's patch (i.e. the one posted by Martin von Gagern) is the best one (when writing my patch, I simply did not have the idea that one could just move the definition to a file which is linked to mencoder). This patch is correct in the sense that everything should work as expected. However, it is not a "clean" solution either, since mencoder will then accept the option --disable-gui-conf and reserve a variable for it, although option and variable are actually ignored, because mencoder never has a gui. But who cares...
(In reply to comment #16) > do i only need the last patch or all of these patches? Only Martin von Gagern's patch is needed.
(In reply to comment #17) > (In reply to comment #15) > > this diff seems to fix the problem: > > Not really: It is even worse than my patch, because it also disables the > functionality because --disable-gui-conf modifies then the "wrong" instance of > disable_gui_conf (Actually this should even give duplicate symbols at linking). > > Upstream's patch (i.e. the one posted by Martin von Gagern) is the best one > (when writing my patch, I simply did not have the idea that one could just > move the definition to a file which is linked to mencoder). > This patch is correct in the sense that everything should work as expected. > However, it is not a "clean" solution either, since mencoder will then accept > the option --disable-gui-conf and reserve a variable for it, although option > and variable are actually ignored, because mencoder never has a gui. But > who cares... > I'll apologize if I'm wrong, but I'm kinda confused by Martin von Gagern's patch. first of all it's for a different version than mine, so maybe that's why, but if i were to apply it to my version it would introduce a line that does exactly the opposite of the line right below it: -extern int disable_gui_conf; +#ifdef HAVE_NEW_GUI +int disable_gui_conf=0; +#endif /* HAVE_NEW_GUI */ code in my version: #ifdef HAVE_NEW_GUI disable_gui_conf = 1; #endif /* HAVE_NEW_GUI */ I presume setting disable_gui_conf to 0 or to 1 is not the same? (not that it matters, since indeed the value is never actually useful) I did miss the definition/extern declaration of disable_gui_conf in gui/cfg.c but i'm kinda reluctant to accept the declaration there, too, since it's again not in a header file... the definition would not break anything afaik :S care to explain how there'd be several instances? thanks,
(In reply to comment #19) > first of all it's for a different version than mine, My patch is straight from the SVN trunk. It should apply to all versions that contain the bug but not the fix. In the main Gentoo portage three, that's exactly one: 1.0_rc2_p26450. Version 1.0_rc2_p26300-r1 din't even contain disable_gui_conf, so I'm a but surprised about the subject of this bug. Maybe original reporter or some dev can change that? Even comment #0 talks about 1.0_rc2_p26450. > so maybe that's > why, but if i were to apply it to my version it would introduce a line that > does exactly the opposite of the line right below it: No, that's not right below it, one is top level and the other inside a function. > -extern int disable_gui_conf; > +#ifdef HAVE_NEW_GUI > +int disable_gui_conf=0; > +#endif /* HAVE_NEW_GUI */ That's a change at the beginning of the source file, with the global definitions, changing an extern declaration to a global declaration. > code in my version: > > #ifdef HAVE_NEW_GUI > disable_gui_conf = 1; > #endif /* HAVE_NEW_GUI */ That's from the function noconfig_all which only gets executed when the user specifies the corresponding command line switch. It remains unmodified by the patch. The upshoot of all this is that the default is 0 and some command line switch will set it to 1m which makes perfect sense. > I presume setting disable_gui_conf to 0 or to 1 is not the same? (not that it > matters, since indeed the value is never actually useful) Sure the value is useful, as a 1 will prevent some configuration files from being used. That's the whole point of that revision, discussed in length on the mplayer mailing list. For details see that discussion: http://thread.gmane.org/gmane.comp.video.mplayer.devel/48498 or http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2008-April/057132.html > I did miss the definition/extern declaration of disable_gui_conf in gui/cfg.c > but i'm kinda reluctant to accept the declaration there, too, since it's again > not in a header file... the definition would not break anything afaik :S > > care to explain how there'd be several instances? Anything contained in a header file will be included by the preprocessor, so by the time the actual compiler sees this, it's all one big file, no distinction between headers and c files. A line like "int foo" on the top level (i.e. outside any function) of that file tells the compiler "I want a new integer variable called foo, I want you to reserve memory right here and now in this object file, as I'm responsible for this". A line like "extern int bar" tells it "I want to use an integer variable named bar, but I don't want you to reserve any new memory for this, as it is already defined in some other object file. Instead, let the linker look up its address later on". So for every global variable baz, you want exactly one "int baz" in one file, and an "extern int baz" in as many files as you like, but at least all files actually using baz. Common convention is to have the "extern int baz" in a header, but there is nothing wrong with an extern definition in a single source file, if only that source file needs access to the variable, in addition to the one defining it. What will break things is an "int" without "extern" in a header that gets included by multiple source files. In that case, there are multiple memory addresses for the same name, which is just that kind of "multiple instances" mentioned in comment #17. You get the same kind of problem when multiple source files have an "int" without "extern" for the same symbol.
Created attachment 149944 [details, diff] switches places between declaration and definition of disable_gui_conf This is what I think should be the correct solution. The big difference with Martin von Gagern's patch is that his patch sets disable_gui_conf to 0 if HAVE_NEW_GUI is defined, however my original source sets it to 1 then (which imo makes more sense). My patch includes a default assignment of 0.
(In reply to comment #20) > (In reply to comment #19) > > first of all it's for a different version than mine, > > My patch is straight from the SVN trunk. It should apply to all versions that > contain the bug but not the fix. In the main Gentoo portage three, that's > exactly one: 1.0_rc2_p26450. Version 1.0_rc2_p26300-r1 din't even contain > disable_gui_conf, so I'm a but surprised about the subject of this bug. Well, that certainly explains my confusion. :) We're talking about different versions, here. Still waiting on testing for >26450 to see if it will compile on non-x86 cpus.
OH, I see how it works now I'm still a bit reluctant about the extern declaration in a source file (not for bugs etc, but it's just what i always learned), but Martin von Gagern's patch is indeed the right one. that'll learn me mistrusting code from the mplayer svn :)
(In reply to comment #5) > USE="-gtk" emerge mplayer > fixed this bug for me > USE="-gtk" emerge mplayer works for me too
media-video/mplayer-1.0_rc2_p26454-r1 compiles OK for me on ~amd64. The only thing I noticed is that I'm missing a shortcut to gmplayer in my Gnome applications menu now. Can anyone confirm if this occurs for them as well? It won't compile on non-x86/x87 arch's because of bug 217773.
*** Bug 218044 has been marked as a duplicate of this bug. ***
This bug seems to be fixed, at least for me. I ran sync earlier today, and it's compiled without any more intervention. Does it work for everybody else, or something wonky happen?
media-video/mplayer-1.0_rc2_p26454-r2 compiled OK on my amd64 box, but shortcut disapeared for me as well as for virdiq (but I'm using KDE 3.5.9).
I had the same problem with the icon disappearing on x86.
should be all fixed now in latest mplayer (mplayer-1.0_rc2_p26753-r1), reopen if still an issue