Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276630 - x11-drivers/xf86-video-mga fails to compile when USE flag -dri is used
Summary: x11-drivers/xf86-video-mga fails to compile when USE flag -dri is used
Status: RESOLVED DUPLICATE of bug 266087
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 276822
  Show dependency tree
 
Reported: 2009-07-05 20:10 UTC by Olav Sandstå
Modified: 2009-11-17 07:07 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 Olav Sandstå 2009-07-05 20:10:04 UTC
In connection with upgrading to xorg-server-1.5 there was a new version of x11-drivers/xf86-video-mga-1.4.9. This failed to compile. 

Note that I the USE flag -drm set in my make.conf file.


Reproducible: Always

Steps to Reproduce:
1. Disable USE flag dri in make.conf by adding -dri to USE
2. emerge --update --deep --newuse world
3.

Actual Results:  
When doing the compile it fails with the following compile error:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/xorg -I/usr/include/pixman-1 -O3 -march=pentium3 -fomit-frame-pointer -pipe -MT clientlx.lo -MD -MP -MF .deps/clientlx.Tpo -c clientlx.c  -fPIC -DPIC -o .libs/clientlx.o
In file included from mga.h:33,
                 from clientlx.c:17:
/usr/include/xf86drm.h:40:17: error: drm.h: No such file or directory
In file included from mga.h:33,
                 from clientlx.c:17:

The reason for this failure is that xf86drm.h want to include "drm.h". This file is located in /usr/include/drm/drm.h but the compile command does not include this in the search path for include files. So it is unable to locate the drm.h file.

Expected Results:  
Given that dri still is a supported USE flag for this package I would expect it to compile even when -dri was configured.

Work-around: removing "-dri" from my make.conf file makes this package compile and install correctly. So possible fixes for this problem migth either be to fix the compile error - or possibly remove the dri flag from this package?

sandra etc # emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r4-i686-Pentium_III_-Coppermine-with-glibc2.0
Timestamp of tree: Sun, 05 Jul 2009 09:45:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=pentium3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.gentoo.no/ http://ftp.du.se/pub/os/gentoo http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ "
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl alsa berkdb bzip2 cli cracklib crypt gdbm gpm matrox midi mmx mp3 mysql ncurses nls no_gf nptl nptlonly pam pcre perl pppd python readline reflection session spl sse ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ens1371" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev mga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Michael Heide 2009-07-18 08:23:53 UTC
Same here (not x86 related):
mips64el-unknown-linux-gnu, emerging x11-drivers/xf86-video-sis-0.10.1
dri use flag is not changeable via USE="dri" because it's in ()-braces, the ebuilds Changelog says it "is handled in x-modular.eclass now". I did the following to successfully compile it:
I have stopped emerge (via ~Z / ctrl-z) at the end of the configure script, right some milliseconds after writing config.h and manually edited config.h:
- /* #undef XF86DRI */
+ #undef XF86DRI
- /* #undef XF86DRI_DEVEL */
+ #undef XF86DRI_DEVEL

The reason for the compiling error is:
portage configures the video driver with "--disable-dri" set so the configure-script does not search any dri includes. In config.h it does not define any XF86DRI settings but it #include "xorg-server.h" where XF86DRI gets set to 1.
Without #undef XF86DRI this must fail. That's the reason why it works if you enable dri support. (I do not want this because my sis315 is not supported by linux' dri anyway)
Comment 2 Mads 2009-11-17 01:20:17 UTC
Can also confirm this behaviour for xf86-video-sis (tried with version 0.10.2).
Comment 3 Mads 2009-11-17 01:23:38 UTC
Now I see that Michael Heide also uses xf86-video-sis in his example, sorry for the double take. But I can at least confirm it works for version 0.10.2 too.
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2009-11-17 07:07:42 UTC

*** This bug has been marked as a duplicate of bug 266087 ***