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

Bug 130200

Summary: media-video/mplayer ebuild fails w/ linux-headers-2.6.16
Product: Gentoo Linux Reporter: Mike Lothian <mike>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal CC: alex, gentoo, leio, matteo-ml, patrizio.bassi, plasmaroo
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mike Lothian 2006-04-16 16:40:07 UTC
When I try and emerge mplayer it fails with this error:

 * Make
./version.sh `cc -dumpversion`
iconv -f `cat help/help_mp-en.h.charset` -t UTF-8 "help/help_mp-en.h" >> help_mp.h
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -march=athlon-xp -Os -D__STDC_LIMIT_MACROS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE  -I.      -I/usr/include/freetype2 -I/usr/include -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include   -I./libavutil -I./libavcodec   -o mplayer.o mplayer.c
In file included from mplayer.c:181:
libmpdemux/demuxer.h:107: error: field 'get_current' declared as a function
make: *** [mplayer.o] Error 1

!!! ERROR: media-video/mplayer-1.0.20060415 failed.
Call stack:
  ebuild.sh, line 1533:   Called dyn_compile
  ebuild.sh, line 930:   Called src_compile
  mplayer-1.0.20060415.ebuild, line 492:   Called die

!!! Failed to build MPlayer!
!!! If you need support, post the topmost build error, and the call stack if relevant.


Here is my emerge info

quark ~ # emerge info
*** Deprecated use of action 'info', use '--info' instead
Portage 2.1_pre8-r5 (default-linux/x86/2006.0, gcc-4.1.0-beta20060210, glibc-2.4-r2, 2.6.17-rc1-mm2 i686)
=================================================================
System uname: 2.6.17-rc1-mm2 i686 AMD Athlon(TM) XP 3200+
Gentoo Base System version 1.12.0_pre17
ccache version 2.4 [disabled]
dev-lang/python:     2.4.3
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.91.0.6
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -mfpmath=sse,387 -frename-registers"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -mfpmath=sse,387 -frename-registers -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_GB"
LC_ALL="en_GB"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/fireburn/Portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds X a52 aac aalib acpi akode alsa amr amuled apm ares arts artswrappersuid artworkextra asf async audiofile automount avi bash-completion berkdb bidi bitmap-fonts bl bluetooth browserplugin bzip2 bzlib cairo cdda cddb cdinstall cdio cdparanoia cdr cli css ctype cups curl custom-cflags dba dbus dga directfb dmx dpms dri dts dvb dvd dvdr dvdread emboss encode esd exif expat faad fame fastbuild fbcon fbsplash ffmpeg flac flash foomaticdb force-cgi-redirect fortran freetype freetype2 ftp gcj gd gif glibc-omitfp glitz glut gphoto2 gpm gstreamer10 gtk gtk2 hal idn ilbc imagemagick imlib ipod isdnlog ithreads jack java javascript jingle jit joystick jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdenewldflags kdgraphics lcms libg++ libwww lm_sensors mad memlimit mikmod mmx mmxext mng mozdevelop mozilla mozpango mozsvg mp3 mpeg mpeg2 msn musepack music musicbrainz nas ncurses neon network no-helper no_wxgtk1 nomalloccheck nptl nptlonly nsplugin nv nvidia offensive ogg openal opengl pam pam_chroot pam_console pango pcre pdflib perl pertty pic png portaudio posix pppd python qt quicktime rdesktop readline real remote risky rtc samba sametime sdl sensord session simplexml slang slp sndfile soap sockets speex spell spl sse ssl stream svg svga sysfs syslog tcpd tga theora threads threadsonly tidy tiff tokenizer transcode truetype truetype-fonts type1-fonts udev userlocales v4l vcd vcdimager vidix visualization vorbis wifi win32codecs wmf x264 x86 xcomposite xine xml xml2 xmms xprint xscreensaver xsl xv xvid xvmc yv12 zeroconf zlib elibc_glibc input_devices_mouse input_devices_keyboard input_devices_evdev kernel_linux linguas_en_GB userland_GNU video_cards_nvidia video_cards_none"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK


I relise that this is an experimental toolchain but I think the problem is using the new linux-headers and glibc

I was hoping someone would be able to confirm this bug as I can't find any other references to it anywhere else
Comment 1 Matteo Settenvini 2006-04-17 02:24:21 UTC
Could be: I've the same problem and I use both the new linux-headers (I needed inotify support for an application we're developing) and gcc-3.4.6.

The same happens with the 20060408 snapshot, of course.

emerge --info output:

Gentoo Base System version 1.12.0_pre17
Portage 2.1_pre7-r5 (default-linux/x86/2005.0, gcc-3.4.6, glibc-2.4-r1, 2.6.16-suspend2-r2 i686)
=================================================================
System uname: 2.6.16-suspend2-r2 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.gentoo.or.kr/ http://mirror.gentoo.gr.jp ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/"
LC_ALL="it_IT.UTF-8"
LINGUAS="it"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/php/testing /usr/local/overlays/php/experimental /usr/local/overlays/gentopia"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apache2 arts avi berkdb bitmap-fonts cairo cdr crypt cups dbus dga doc dri dvd eds emacs emboss encode fbcon firefox flac foomaticdb fortran gdbm gif gnome gnutls gpm gstreamer gtk gtk2 imap imlib ipv6 isdnlog jpeg kde libg++ libwww mad maildir mbox mikmod mmx motif mp3 mpeg musicbrainz mysql ncurses nls nptl ogg oggvorbis opengl oss pam pcmcia pdflib perl png pppd python qt quicktime readline samba sasl sdl spell sse sse2 ssl tcpd theora truetype truetype-fonts type1-fonts unicode vorbis xml2 xmms xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_it userland_GNU video_cards_i810"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS
Comment 2 Daniel Kenzelmann 2006-04-17 13:53:43 UTC
same problem, using linux-headers-2.6.16 with gcc-4.1.0

In file included from mplayer.c:117:
libmpdemux/dvbin.h:70: error: field 'get_current' declared as a function
In file included from mplayer.c:182:
libmpdemux/demuxer.h:107: error: field 'get_current' declared as a function
Comment 3 Priyantha Bleeker 2006-04-18 04:58:36 UTC
Here is an workaround, found in this topic: http://forums.gentoo.org/viewtopic-p-3263707.html#3263707
Thanks to fred0 who posted it there.

-----
Unpack mplayer (choose the corect ebuild)

type:
ebuild /usr/portage/media-video/mplayer/mplayer-1.0.20060408.ebuild unpack


Go to help directory

type:
cd /var/tmp/portage/mplayer-1.0.20060408/work/mplayer-1.0.20060408/help/


Copy charset file

type:
cp help_mp-de.h.charset help_mp-fr.h.charset


Return to home

type:
cd


Compiling

type:
ebuild /usr/portage/media-video/mplayer/mplayer-1.0.20060408.ebuild compile install qmerge
Comment 4 Matteo Settenvini 2006-04-19 07:34:10 UTC
About comment #3: this bug isn't about the same error presented in the topic pointed out.
Comment 5 Patrizio Bassi 2006-04-21 01:44:01 UTC
same error here
Comment 6 mtthsme 2006-04-25 03:36:19 UTC
Please see my posting

http://forums.gentoo.org/viewtopic-t-450784.html

or

Yes, as far as i can guess, linux-headers is the culprit. I had the same problem (~x86), and got around it by editing a header file. 

Since i do not know the name of the file for sure, here is how i found out. 

First, i removed current.h from /usr/include/asm(?), and mplayer failed to compile, but showed, which header files are included. In one of these(wait.h?) i removed the include of current.h (or another file, i am not sure), and it worked. mplayer compiled, and works just fine.
Comment 7 Daniel Kenzelmann 2006-04-25 03:50:10 UTC
The current mplayer CVS compiles fine with new linux-headers.
(manual compiled, no ebuild)

Thus, the problem could be an outdated mplayer snapshot.
Comment 8 mtthsme 2006-05-03 10:06:54 UTC
Well, i can't confirm this. I checked out mplayer yesterday (20060502), emerged linux-headers-2.6.16 with v2 of the patchset, still i had to edit wait.h and remove 

#include <asm/current.h>

from it in order to compile mplayer. Maybe it got unfixed.
Comment 9 Daniel Kenzelmann 2006-05-03 10:41:47 UTC
MPlayer dev-CVS-060418-22:04-4.1.0 worked for me

gcc-4.1.0
linux-headers-2.6.16

Plain mplayer fresh from CVS (2006-05-03) (with AND without copied libavcodec, libavutil and libavformat from ffmpeg-CVS) 
./configure (no parameters) and make 
is compiling fine here
Comment 10 Matteo Settenvini 2006-05-03 14:22:58 UTC
I just added a "#undef current" directive after the includes in demuxer.h; it's probably the best course of action without taking another snapshot from the mplayer repository. That did it for me, at least.
Comment 11 mtthsme 2006-05-05 02:30:36 UTC
So it seems to me it was never fixed in the mplayer-sources. The error probably only occurs when enabling an option which is normally disabled (rtc?). One should probably try to find out whether the 

#include <asm/current.h>

is really needed in wait.h, and then fix it there, in the linux-headers-package.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-06-12 10:49:32 UTC
*** Bug 136555 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-06-12 10:51:37 UTC
Still broken in mplayer-1.0_pre8.
Comment 14 Tim Yamin (RETIRED) gentoo-dev 2006-06-12 15:45:48 UTC
I can't hit this with either gcc-3.4.5 or 4.1.1 on mplayer 20060415. Can somebody please emerge sync, remerge linux-headers-2.6.16 and then see if the bug still exists. If it does, remove "#include <asm/current.h>" in /usr/include/linux/wait.h and then try compiling again. If it fixes the issue then I can happily include the patch in linux-headers but the issue needs to be isolated first.
Comment 15 deathlove 2006-06-12 22:41:51 UTC
Hi,

yes I re-merge linux-headers-2.6.16, and now WORKSe mplayer-1.0_pre8 (gcc-4.1.1 amd64)

THANKS!
Comment 16 Guillaume Infantes 2006-06-14 03:42:11 UTC
(In reply to comment #15)

On x86, gcc-4.1.1, re emerging linux-headers-2.6.16 made compilation work too (with mplayer 1.0_pre8).




> Hi,
> 
> yes I re-merge linux-headers-2.6.16, and now WORKSe mplayer-1.0_pre8 (gcc-4.1.1
> amd64)
> 
> THANKS!
> 

Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-08-27 00:15:52 UTC
Closing then.