While trying to emerge tetex-2.0.4, I get ./mf ./tests/online This is METAFONT, Version 2.7182 (Web2C 7.4.5) (./tests/online.mfXlib: connection to ":0.0" refused by server Xlib: No protocol specified Error: Can't open display: :0.0 make[2]: *** [mf-check] Error 1 make[2]: Leaving directory `/var/tmp/portage/tetex-2.0.2-r4/work/tetex-src-2.0.2/texk/web2c' make[1]: *** [check] Error 1 make[1]: Leaving directory `/var/tmp/portage/tetex-2.0.2-r4/work/tetex-src-2.0.2/texk' make: *** [check] Error 2 !!! ERROR: app-text/tetex-2.0.2-r4 failed. !!! Function src_test, Line 520, Exitcode 0 !!! Make check failed. See above for details. !!! If you need support, post the topmost build error, NOT this status mess Reproducible: Always Steps to Reproduce: 1. 2. 3. # emerge info Portage 2.0.51-r2 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20041021-r0, 2.6.8-20040814 i686) ================================================================= System uname: 2.6.8-20040814 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.6.4 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -O2 -pipe -fstack-protector" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon -O2 -pipe -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs candy ccache distlocks maketest sandbox userpriv usersandbox" GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.easynet.nl/mirror/gentoo/ http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http://gentoo.inode.at/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/local /usr/local/portage/uncleowen /usr/local/portage/kde-split" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X aalib alsa apache2 apm avi bitmap-fonts cdr crypt cups directfb dvd dvdr encode esd f77 foomaticdb gd gif gnome gpm gtk gtk2 guile imlib ipv6 java joystick jpeg libg++ libwww mad mikmod mmx mmx2 mpeg ncurses nls nvidia oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sse sse2 ssl svga tcltk tcpd tetex truetype x86 xml2 xmms xv zlib"
Use xhost or something to allow root to access your X.
Yeah, sure, I know that, but: Isn't it a bug in itself that a package tries to access X (or any other ressource it doesn't own) during any phase of the emerge?
Hum, but this is a "test" phase to make sure that the package build is completed, and if the test of the package necessarily require X, accessing to X should be given. It might be a good idea to check if root has access to X, though. If you write a patch to achieve this, I'm also happy to include it.
Created attachment 43314 [details] tetex-2.0.2-r4.ebuild Proposed ebuild that uses the virtualx eclass.
Works for me
Yeah, this is ideal patch if this works.... However, it adds X to DEPEND, while tetex could be compiled without it. As we cannot inherit eclasses conditionally at the moment (Portage's limitation to make portage internal cache correctly), I cannot take this patch. I'm really sorry for it.
This is rather old but the problem persists even with tetex-3. The status is as follows: - Conditional inherits will never be supported by portage, but maybe some of the stuff going on in GLEP 33 will help us instead. - Another solution would be to have something like TESTDEPEND (see bug 69021). - Too many people wont like X being pulled in just to satisfy maketest, so thats not an option.
The virtualx eclass only depends on x11 if the USE flag X is set: DEPEND="X? ( || ( x11-base/xorg-server virtual/x11 ) )" IUSE="X" So what's the problem?
You are absolutely right :-) I have added it to CVS.
Thanks!
What about having a check inside the test code. If the possibly required Xvfb is not available the test might just be skipped with a warning. Currently this forces one to either disable X11 client support, or to install Xvfb and everything that pulls in. Not really useful for a headless system.
If you provide the test I'll be happy to include it. Text-markup are currently under-staffed, so fixing test targets are currently not prioritized very high, especially since the current state doesn't break installs. But either way I think you got a valid point, so please open a new bug so we will remember to fix it when we got the time (I don't think it falls under the category of this bug).