Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130919 - x11-drivers/xf86-video-sis fails to compile with -dri
Summary: x11-drivers/xf86-video-sis fails to compile with -dri
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal critical
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-04-22 19:38 UTC by Todd Merrill
Modified: 2009-08-21 06:44 UTC (History)
0 users

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


Attachments
Emerge log (xf86-driver-sis.log,23.98 KB, text/plain)
2006-04-22 19:40 UTC, Todd Merrill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Todd Merrill 2006-04-22 19:38:07 UTC
Both versions of the SiS X11 driver in Portage fail to compile with the -dri USE flag.  However, both versions compile with the dri USE flag enabled.

Please note that I have also tried compiling this driver on a pure x86 system (with the exception of X.Org 7.0, of course) using a stable version of GCC with the same result.

I am using a chipset that does not support DRI, so I am using software rendering.

Portage 2.1_pre9-r3 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.4-r1, 2.6.17-rc2 i686)
=================================================================
System uname: 2.6.17-rc2 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.12.0_pre18
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r3
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.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aalib acpi aim alsa apache2 ares asf audacious avi bash-completion bitmap-fonts bzip2 cairo cddb cli crypt cups custom-cflags djbfft dri dvd emboss encode fbcon ffmpeg firefox flac fontconfig foomaticdb fortran gif glitz glut gnutls gpm gtk gtk2 icq imlib isdnlog ithreads jabber jpeg libcaca libg++ libvisual libwww lirc mad mikmod mmap mmx mmxext mng mp3 mpeg msn ncurses nls nodrm nptl nptlonly ogg opengl pam pango pcre pdflib perl picnls png pppd python readline reflection sdl session spell spl sse ssl startup-notification tcpd truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vda vorbis win32codecs xchat xml xorg xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_en userland_GNU video_cards_vesa video_cards_v4l"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK
Comment 1 Todd Merrill 2006-04-22 19:40:07 UTC
Created attachment 85237 [details]
Emerge log
Comment 2 Todd Merrill 2006-04-22 20:19:41 UTC
According to this post:

http://bugs.gentoo.org/show_bug.cgi?id=127387#c6

DRI isn't optional, it's required?  Or am I reading this wrong?
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-04-23 00:34:33 UTC
(In reply to comment #2)
> According to this post:
> 
> http://bugs.gentoo.org/show_bug.cgi?id=127387#c6
> 
> DRI isn't optional, it's required?  Or am I reading this wrong?

Yes. The dri part of that post is parenthetical. exa is non-optional.

Your problem is simply this:
/usr/include/xorg/xf86drm.h:39:17: error: drm.h: No such file or directory

Interestingly, in configure I see this:
checking whether to include DRI support... no

Yet apparently it's trying to build dri support anyway.
Comment 4 Todd Merrill 2006-04-24 08:25:51 UTC
Yeah, I noticed that.  I wasn't sure if that was the only problem.

I tried compiling the driver outside of Portage, but I got the same result.
Comment 5 Joshua Baergen (RETIRED) gentoo-dev 2006-04-29 11:36:06 UTC
(In reply to comment #3)
> Your problem is simply this:
> /usr/include/xorg/xf86drm.h:39:17: error: drm.h: No such file or directory
> 
> Interestingly, in configure I see this:
> checking whether to include DRI support... no
> 
> Yet apparently it's trying to build dri support anyway.
> 

This could be a result of xorg-server being +dri.  If xorg-server was build -dri, then this should probably be moved upstream.
Comment 6 Todd Merrill 2006-04-30 08:41:45 UTC
(In reply to comment #5)
> This could be a result of xorg-server being +dri.  If xorg-server was build
> -dri, then this should probably be moved upstream.

That was indeed the problem.  Thank you.
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2006-04-30 11:13:55 UTC
That still sounds like a bug, if the autodetection is overriding an explicitly passed --disable-dri.
Comment 8 Joshua Baergen (RETIRED) gentoo-dev 2006-05-02 08:33:54 UTC
(In reply to comment #7)
> That still sounds like a bug, if the autodetection is overriding an explicitly
> passed --disable-dri.
> 
I believe it's actually just a bug in one of the headers.  Nothing is explicitly being included by the driver, but somewhere in xorg-server's headers (or related) having DRI enabled drags in DRI stuff anyway.
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-20 23:10:49 UTC
Maybe we can get the real bug figured out here, if there is one, so we can push it upstream.
Comment 10 Alan Hourihane 2007-08-03 09:38:31 UTC
This bug isn't sis specific it's a widespread issue with the other drivers too.

The --disable-dri option removes an include path where normally it would have picked up the drm.h header file, and that's why the build barfs.

XF86DRI is defined in xorg-server.h and config.h includes that, then doesn't #undef it as it gets commented out later in that file.

We could either fix it so it does undef XF86DRI, but to be honest, I'm more inclined to remove the --disable-dri option from the configure script these days.
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-03 16:59:42 UTC
(In reply to comment #10)
> We could either fix it so it does undef XF86DRI, but to be honest, I'm more
> inclined to remove the --disable-dri option from the configure script these
> days.

Won't that kill any archs without DRI?
Comment 12 Alan Hourihane 2007-08-03 18:06:38 UTC
No.

I'm proposing removing the --disable-dri option as it's currently broken as it stands, as xorg-server.h continues to define XF86DRI regardless of the drivers choice.

If an arch doesn't support DRI, then XF86DRI should not be set in xorg-server.h.

Still, if --disable-dri is desired, then all we need to do is make configure.ac set 

#undef XF86DRI

in config.h for the driver.
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-03 19:21:57 UTC
Problem with that from a Gentoo perspective is that it makes things too autodetected -- the build state is no longer determined purely by USE flags. Rebuilding xorg-server with a change in USE=dri should somehow indicate that drivers need to be rebuilt with a change in USE as well, but build-time autodetection doesn't allow that.
Comment 14 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-03 19:22:33 UTC
Problem with that from a Gentoo perspective is that it makes things too autodetected -- the build state is no longer determined purely by USE flags. Rebuilding xorg-server with a change in USE=dri should somehow indicate that drivers need to be rebuilt with a change in USE as well, but build-time autodetection doesn't allow that.(In reply to comment #13)
> Problem with that from a Gentoo perspective is that it makes things too
> autodetected -- the build state is no longer determined purely by USE flags.
> Rebuilding xorg-server with a change in USE=dri should somehow indicate that
> drivers need to be rebuilt with a change in USE as well, but build-time
> autodetection doesn't allow that.

But it would be reasonable to add checks that prevent -dri driver builds against a +dri server.
Comment 15 Alan Hourihane 2007-08-03 21:06:27 UTC
Can't you leave the USE="dri" flag available to drivers, but not actually do anything with it ???

That could still signify a driver needs to be rebuilt with --newuse if the xserver changed.

If not, then let's make configure.ac #undef XF86DRI.
Comment 16 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-03 21:32:42 UTC
We've got this in e.g. the xf86-video-ati ebuild already:

pkg_setup() {
    if use dri && ! built_with_use x11-base/xorg-server dri; then
        die "Build x11-base/xorg-server with USE=dri."
    fi
}

We could just add the opposing case of -dri/-dri. Seems like that would be easier than the other approaches, because I don't see the mixture as a realistic use case for upstream.
Comment 17 Alan Hourihane 2007-08-03 21:44:11 UTC
yep, sounds good.
Comment 18 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-03 21:54:16 UTC
We've got this in e.g. the xf86-video-ati ebuild already:

pkg_setup() {
    if use dri && ! built_with_use x11-base/xorg-server dri; then
        die "Build x11-base/xorg-server with USE=dri."
    fi
}

We could just add the opposing case of -dri/-dri. Seems like that would be easier than the other approaches, because I don't see the mixture as a realistic use case for upstream.
Comment 19 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-03 21:56:02 UTC
Woops, sorry for the extra comment -- firefox extensions gone wild
Comment 20 Tiago Marques 2007-08-08 18:36:41 UTC
Hi.
It also doesn't compile with dri USE enabled on amd64.
Gives errors on src/sis_dri.c, conflicting types for DRICloseScreen
Should i open a new bug report for this one?
Comment 21 Tomáš Chvátal (RETIRED) gentoo-dev 2009-08-21 06:44:08 UTC
Eapi2ed for correct deps. Thus this bug is fixed.