Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51557 - ffmpeg ebuild has undocumented dependency on XFree86
Summary: ffmpeg ebuild has undocumented dependency on XFree86
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-20 05:48 UTC by mathew
Modified: 2005-03-09 15:10 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mathew 2004-05-20 05:48:20 UTC
It seems ffmpeg requires that you have X installed, even though ffmpeg itself ought to be buildable without X.

Rather stupidly, the ffmpeg code for ffplay.c says:

#if defined(__linux__)
#define HAVE_X11
#endif


Reproducible: Always
Steps to Reproduce:
1. emerge ffmpeg on a system with no X
2. er...
3. that's it
Actual Results:  
gcc -Wl,--warn-common -rdynamic -g  -o ffplay_g ffplay.o cmdutils.o -L./libavformat -lavformat -L./
libavcodec -lavcodec -lm -lz -ldl -logg -lvorbis -lvorbisenc -L/usr/lib -Wl,-rpath,/usr/lib -lSDL 
-lpthreadffplay.o(.text+0x68c): In function `main':/var/tmp/portage/ffmpeg-0.4.7/work/ffmpeg
-0.4.7/ffplay.c:1692: undefined reference to `XOpenDisplay'ffplay.o(.text+0x6be):/var/tmp/portage/
ffmpeg-0.4.7/work/ffmpeg-0.4.7/ffplay.c:1696: undefined reference to `XCloseDisplay'collect2: ld 
returned 1 exit statusmake: *** [ffplay_g] Error 1!!! ERROR: media-video/ffmpeg-0.4.7 failed.!!! 
Function src_compile, Line 54, Exitcode 2!!! make failed.



Expected Results:  
I'd suggest a patch to fix the braindeadedness in ffplay.c. Failing that, the ebuild should include the 
dependency on X.

Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-gentoo-r1)
===============================================================
==
System uname: 2.6.5-gentoo-r1 i686 VIA Nehemiah
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer -march=i686 -msse -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /
usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer -march=i686 -msse -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://ds.thn.htu.se/linux/gentoo http://
ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acpi alsa apm avi berkdb cdr crypt curl encode gdbm gif gpm gtk2 imlib jpeg kde libg++ libwww 
mad mikmod mpeg ncurses offensive oggvorbis perl png python quicktime readline samba slang spell 
sse ssl svga tcpd usb x86 zlib"
Comment 1 mathew 2004-05-20 05:59:26 UTC
I just discovered it's fixed in media-video/ffmpeg-0.4.8.20040322

So maybe the right thing is to hurry up and get that out of ~x86 :-)
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-05-26 22:43:50 UTC
Could backport the fix, although for the moment I could see just adding virtual/x11 to the deps to cover the bases :)
Thoughts/preferences?
Comment 3 Christian Jiresjö 2004-06-01 00:56:28 UTC
Its my opinion that you should never make a librarypackage depend on X or gtk just because a demonstrationsoftware that is a part of the package want it. Better to fix the breakage.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-06-01 02:40:57 UTC
Err... look at the code.  Granted the actual usage of x functions is minimal (pretty much pulling width/height for usage w/ fullscreen)- anyone familiar w/ sdl who could recommend an equivalent function would be appreciated to chime in now.

What would be nice is detection of sdl emerged w/ X enabled (in which case the code *would* be of use)- since we can't detect that currently, unsetting HAVE_X11 is a simple enough fix.

Meanwhile, like I said, anyone know of an equivalent set of libsdl functions?
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2004-06-25 10:00:21 UTC
Brian: any news on this ?
Comment 6 Chris White (RETIRED) gentoo-dev 2005-03-09 15:10:56 UTC
This is fixed in the latest ffmpeg.