Bug 1057 - [PATCH] GLX looks for DRI drivers in wrong dir on AMD64 (and others?)
Summary: [PATCH] GLX looks for DRI drivers in wrong dir on AMD64 (and others?)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/GLX (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
: 1093 (view as bug list)
Depends on:
Blocks: 351
  Show dependency treegraph
 
Reported: 2004-08-12 03:32 UTC by Ronny V. Vindenes
Modified: 2004-08-19 08:01 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Imakefile fix (541 bytes, patch)
2004-08-12 03:33 UTC, Ronny V. Vindenes
no flags Details | Splinter Review
xorg-x11-6.8.0-glx-install-dri-modules-in-correct-place.patch (439 bytes, patch)
2004-08-16 16:10 UTC, Mike A. Harris
no flags Details | Splinter Review

Description Ronny V. Vindenes 2004-08-12 03:32:48 UTC
On AMD64 DRI drivers are installed in /usr/X11R6/lib64/modules/dri but GLX
defaults to /usr/X11R6/lib/modules/dri . I'm attaching a patch for this, tested
on AMD64. If it's wrong for PPC64 & s390, then substitute HaveLib64 with
defined(AMD64Architeture) in the patch.
Comment 1 Ronny V. Vindenes 2004-08-12 03:33:50 UTC
Created attachment 618 [details] [review]
Imakefile fix
Comment 2 Mike A. Harris 2004-08-12 09:56:30 UTC
amd64, ppc64, s390x are all the same for libdir beign "lib64".  Both the current
CVS glx code is broken with ProjectRoot, as well as the attached patch.  Imake
defines BUILDMODULESDIR as a base for the modules to get installed into.

A patch that does something like this might work better, and fix ProjectRoot
at the same time:

-   GLX_DEFS = GlxDefines VidModeExtensionDefines
+   GLX_DEFS = GlxDefines VidModeExtensionDefines \
+              -DDEFAULT_DRIVER_DIR=\"$(BUILDMODULEDIR)\"

Untested yet however.  If someone else hasn't tested this yet when I get
to testing AMD64, I'll test it.
Comment 3 Mike A. Harris 2004-08-12 09:57:53 UTC
(on a side note, s390 architectures do not build the core X server, and
 ppc64 doesn't have a working X server either, however if either arch did,
 they would also use lib64 dirs for the modules)
Comment 4 Ronny V. Vindenes 2004-08-12 10:39:35 UTC
(In reply to comment #2)
> amd64, ppc64, s390x are all the same for libdir beign "lib64".  Both the current
> CVS glx code is broken with ProjectRoot, as well as the attached patch.  Imake
> defines BUILDMODULESDIR as a base for the modules to get installed into.
> 
> A patch that does something like this might work better, and fix ProjectRoot
> at the same time:
> 
> -   GLX_DEFS = GlxDefines VidModeExtensionDefines
> +   GLX_DEFS = GlxDefines VidModeExtensionDefines \
> +              -DDEFAULT_DRIVER_DIR=\"$(BUILDMODULEDIR)\"
> 
> Untested yet however.  If someone else hasn't tested this yet when I get
> to testing AMD64, I'll test it.
> 

I don't fully understand what you think ProjectRoot should be..

How about this:

-     GLX_DEFS = GlxDefines VidModeExtensionDefines
+     GLX_DEFS = GlxDefines VidModeExtensionDefines \
+               -DDEFAULT_DRIVER_DIR=\"$(MODULEDIR)/dri\"

Tested on AMD64.
Comment 5 Mike A. Harris 2004-08-12 23:21:09 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > amd64, ppc64, s390x are all the same for libdir beign "lib64".  Both the current
> > CVS glx code is broken with ProjectRoot, as well as the attached patch.  Imake
> > defines BUILDMODULESDIR as a base for the modules to get installed into.
> > 
> > A patch that does something like this might work better, and fix ProjectRoot
> > at the same time:
> > 
> > -   GLX_DEFS = GlxDefines VidModeExtensionDefines
> > +   GLX_DEFS = GlxDefines VidModeExtensionDefines \
> > +              -DDEFAULT_DRIVER_DIR=\"$(BUILDMODULEDIR)\"
> > 
> > Untested yet however.  If someone else hasn't tested this yet when I get
> > to testing AMD64, I'll test it.
> > 
> 
> I don't fully understand what you think ProjectRoot should be..

ProjectRoot defaults to /usr/X11R6, however it is redefineable to anywhere
else.  All files that normally install in /usr/X11R6, aren't hard coded
to be there, but rather they are relative to ProjectRoot, so if you move
ProjectRoot to say /opt/X11, all files will install there instead.  When this
happens, and NothingOutsideProjectRoot is set, all stuff should get installed
in ProjectRoot/... at make install time, and everything looking for files
at runtime should be relative to ProjectRoot as well (such as looking for
server modules).

> How about this:
> 
> -     GLX_DEFS = GlxDefines VidModeExtensionDefines
> +     GLX_DEFS = GlxDefines VidModeExtensionDefines \
> +               -DDEFAULT_DRIVER_DIR=\"$(MODULEDIR)/dri\"
> 
> Tested on AMD64.
 
Yes, this looks correct, I picked the wrong directive in my sleepiness.

Comment 6 Eric Anholt 2004-08-16 16:00:52 UTC
Keith and I used that last diff while we were working on the r200 issues.  It
should get committed.
Comment 7 Mike A. Harris 2004-08-16 16:10:56 UTC
Created attachment 653 [details] [review]
xorg-x11-6.8.0-glx-install-dri-modules-in-correct-place.patch
Comment 8 Mike A. Harris 2004-08-16 16:12:09 UTC
Ok, the fix in comment #4 has been confirmed by 3 people now, and is in my
6.7.99.2-5 rpms.  Please apply the patch above in comment #7
Comment 9 Kevin E. Martin 2004-08-16 22:30:05 UTC
Patch applied and tested.  Closing.
Comment 10 Marko Kreen 2004-08-17 05:00:00 UTC
Applied patch is broken - it has "/dri" missing.  See #1093 for 'fix'.
Comment 11 Ronny V. Vindenes 2004-08-17 05:21:51 UTC
*** Bug 1093 has been marked as a duplicate of this bug. ***
Comment 12 Ronny V. Vindenes 2004-08-17 05:32:07 UTC
Apply the incremental fix in #1093 (and give Mike Harris more coffee ;) )
Comment 13 Kevin E. Martin 2004-08-17 10:57:29 UTC
(In reply to comment #12)
> Apply the incremental fix in #1093 (and give Mike Harris more coffee ;) )

Incremental fix applied.  Will work on Mike's coffee intake, but that's not a
release blocker, so closing this one. ;)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.