Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111148 - ati-drivers-8.18.8 don't emerge with (masked) modular xorg-server
Summary: ati-drivers-8.18.8 don't emerge with (masked) modular xorg-server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: X11 External Driver Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 112004
  Show dependency tree
 
Reported: 2005-11-01 07:12 UTC by Thomas Schlesinger
Modified: 2005-11-25 10:38 UTC (History)
4 users (show)

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


Attachments
Kludge to get ati-driver to install things in the right places. SPECIFICALLY FOR MODULAR XORG ONLY (ati-driver.kludge,1.97 KB, patch)
2005-11-03 14:49 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schlesinger 2005-11-01 07:12:31 UTC
This is more a request than a bug report: 
 
The ati-driver can't be installed with xorg-server. It had a (correct) 
dependency check on modular xorg and if it was built with --nodeps, the 
fglrx-driver was not available for xorg-server. Please modify the ebuild for 
being able to install the ati-driver on the modular server. 
 

Reproducible: Always
Steps to Reproduce:
emerge ati-drivers 
  
Actual Results:  
xorg-server can't find the fglrx module on starting 

Expected Results:  
ati-drivers should be installed on modular xorg-server, too 

ortage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r3, 
2.6.14-gentoo i686) 
================================================================= 
System uname: 2.6.14-gentoo i686 Intel(R) Pentium(R) M processor 1.73GHz 
Gentoo Base System version 1.12.0_pre9 
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
dev-lang/python:     2.3.5, 2.4.2 
sys-apps/sandbox:    1.2.13 
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-r1 
sys-devel/binutils:  2.16.1 
sys-devel/libtool:   1.5.20 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86 ~amd64 ~x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-O3 -march=pentium-m -pipe -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d" 
CXXFLAGS="-O3 -march=pentium-m -pipe -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/linux/distributions/gentoo" 
LANG="de_DE" 
LC_ALL="en_US" 
LINGUAS="de" 
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 X a52 acpi alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl 
divx4linux dri dv dvb dvd dvdread eds emboss encode esd fam fame flac 
foomaticdb fortran gdbm gif gpm gstreamer gtk2 guile imagemagick imlib ipv6 
irmc java jpeg junit kde kdepim kdexdeltas libg++ libwww mad mikmod mmx mmxext 
motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pda pdflib perl png 
python qt quicktime readline samba scanner sdl speex spell sqlite sse ssl 
subtitles svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev 
uselocales visualization vorbis xine xml2 xmms xv xvid zeroconf zlib 
linguas_de userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 1 Luca Barbato gentoo-dev 2005-11-01 08:43:33 UTC
Installing by hand works?

I guess I have to add another if clause in order to make it pick the right dir.
Comment 2 Mike Auty (RETIRED) gentoo-dev 2005-11-02 17:15:03 UTC
Hi,
  I've tried jiggering an ebuild to get it to install things in the right
places.  At the moment this is where I've put everything:

* Contents of media-video/ati-drivers-8.18.8:
/etc
/etc/env.d
/etc/env.d/09ati
/lib
/lib/modules
/lib/modules/2.6.14
/lib/modules/2.6.14/video
/lib/modules/2.6.14/video/fglrx.ko
/opt
/opt/ati
/opt/ati/bin
/opt/ati/bin/aticonfig
/opt/ati/bin/fglrx_pplay
/opt/ati/bin/fglrx_xgamma
/opt/ati/bin/fglrxconfig
/opt/ati/bin/fglrxinfo
/usr
/usr/include
/usr/include/GL
/usr/include/GL/glATI.h
/usr/include/GL/glxATI.h
/usr/include/X11
/usr/include/X11/extensions
/usr/lib
/usr/lib/opengl
/usr/lib/opengl/ati
/usr/lib/opengl/ati/extensions -> ../xorg-x11/extensions
/usr/lib/opengl/ati/include -> ../xorg-x11/include
/usr/lib/opengl/ati/lib
/usr/lib/opengl/ati/lib/libGL.la
/usr/lib/opengl/ati/lib/libGL.so -> libGL.so.1.2
/usr/lib/opengl/ati/lib/libGL.so.1 -> libGL.so.1.2
/usr/lib/opengl/ati/lib/libGL.so.1.2
/usr/lib/xorg
/usr/lib/xorg/libfglrx_gamma.a
/usr/lib/xorg/libfglrx_gamma.so.1.0
/usr/lib/xorg/libfglrx_pp.a
/usr/lib/xorg/libfglrx_pp.so.1.0
/usr/lib/xorg/modules
/usr/lib/xorg/modules/dri
/usr/lib/xorg/modules/dri/atiogl_a_dri.so
/usr/lib/xorg/modules/dri/fglrx_dri.so
/usr/lib/xorg/modules/drivers
/usr/lib/xorg/modules/drivers/fglrx_drv.so
/usr/lib/xorg/modules/linux
/usr/lib/xorg/modules/linux/libfglrxdrm.so

Unfortunately when I try and do anything glx related, it tells me there's no
direct rendering even though Xorg.0.log said direct rendering started up fine. 
On further investigation I saw the following:

$ LIBGL_DEBUG=verbose glxinfo
name of display: :0.0
libGL: XF86DRIGetClientDriverName: 8.18.8 atiogl_a (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/atiogl_a_dri.so
libGL error: dlopen /usr/X11R6/lib/modules/dri/atiogl_a_dri.so failed
(/usr/X11R6/lib/modules/dri/atiogl_a_dri.so: cannot open shared object file: No
such file or directory)
libGL error: unable to find driver: atiogl_a_dri.so
libGL: XF86DRIGetClientDriverName: 8.18.8 atiogl_a (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/atiogl_a_dri.so
libGL error: dlopen /usr/X11R6/lib/modules/dri/atiogl_a_dri.so failed
(/usr/X11R6/lib/modules/dri/atiogl_a_dri.so: cannot open shared object file: No
such file or directory)
libGL error: unable to find driver: atiogl_a_dri.so
display: :0  screen: 0
direct rendering: No

Not only are the modules installed in lib/xorg/modules, but also I've removed
the X11R6 symlink, so this is really never going to find it.  Unfortunately I've
got no idea where that path is taken from, or how to fix it to point to the
correct location.  Does anyone have any ideas?  I'd be quite happy testing out
any suggestions and reporting back if it will help the final ebuild figure out
what needs to go exactly where.  Thanks...

Mike
Comment 3 Luca Barbato gentoo-dev 2005-11-03 02:25:59 UTC
try to set accordingly LIBGL_DRIVERS_PATH that may be a solution, please attach
the ebuild. I'll probably merge your xorg fixes and the amd64/linux-2.6.14 fixes
in the weekend or soon.
Comment 4 Mike Auty (RETIRED) gentoo-dev 2005-11-03 14:49:30 UTC
Created attachment 72069 [details, diff]
Kludge to get ati-driver to install things in the right places.  SPECIFICALLY FOR MODULAR XORG ONLY

Hi,

Unfortunately all I've got at the moment is a bit of a kludge.	It starts off
with good intentions and determines what version of xorg you're running and
makes the changes accordingly, but nearer the bottom I was getting crankier and
I just forced the inslibdir to include the xorg location.  I've actually got no
idea how you're supposed to figure out when to put things in /usr/lib/modules
and when to put them in /usr/lib/xorg/modules...

Anyway, I've attached a patch for the ebuild, which will hopefully make it
easier to see which bits need to be altered.  As mentioned, this doesn't solve
the problem of the X11R6 path being built into one of the modules somewhere
somehow.  If anyone can come up with an answer, I'll be happy to test it out...


Mike
Comment 5 Luca Barbato gentoo-dev 2005-11-05 13:46:59 UTC
I modified it just a bit to support correctly non modular and committed, thank you.
Comment 6 Thomas Schlesinger 2005-11-06 02:46:58 UTC
The installation of the latest ebuild doesn't work with the modular xorg-server 
0.99.2-r1 for me. It seems, that the identification of the used xorg-version 
doesn't work proper. 
 
get_version_component_range 1 ${X11_IMPLEM_V} returns the value "0" for modular 
xorg 0.99 (I suppose, 1 for 1.x), so I've changed the ebuild's function 
chosse_driver_folder() to that an can now install the driver: 
 
choose_driver_folder() { 
        echo "X-Version: " 
        echo $(get_version_component_range 1 ${X11_IMPLEM_V}) 
        #new modular X paths 
        if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 7 ] 
        then 
                BASE_NAME="${WORKDIR}/x690" 
                xlibdir="xorg" 
        else 
                BASE_NAME="${WORKDIR}/x$(get_version_component_range 1 
${X11_IMPLEM_V})" 
                xlibdir="" 
 
                # Determine if we are facing X.org 6.8.99 aka 6.9 
                if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] 
&& 
                   [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] 
&& 
                   [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ] 
                then 
                        BASE_NAME="${BASE_NAME}90" 
                else 
                        BASE_NAME="${BASE_NAME}$(get_version_component_range 2 
${X11_IMPLEM_V})0" 
                fi 
        fi 
        #checking for xorg-server 0.xx and 1.xx 
        if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 0 ] || 
           [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 1 ] 
        then 
                BASE_NAME="${WORKDIR}/x690" 
                xlibdir="xorg" 
        fi 
        if use amd64 ; then 
                BASE_NAME="${BASE_NAME}_64a" 
        fi 
} 
 
Comment 7 Mike Auty (RETIRED) gentoo-dev 2005-11-06 03:11:03 UTC
Thomas, can I ask, are you using just the xorg-server-0.99.2-r1 package, or do
you have the xorg-x11-7.0.0_rc1 installed as well?  That could well make a
difference in which version number is reported...

Also I didn't add anything to the ebuild to cope with this glx error.  It needs
both the /usr/X11R6 -> /usr symlink, and a symlink from
/usr/lib/modules/dri/atiogl_a_dri.so to
/usr/lib/xorg/modules/dri/atiogl_a_dri.so for the OpenGL to just work.  I
haven't been able to track down their location in the source code yet (assuming
it's not hardwired in)...
Comment 8 Thomas Schlesinger 2005-11-06 03:32:16 UTC
Mike,  
  
I don't have install xorg-x11 anymore. I've followed this guide to upgrade from  
xorg-x11 (monolithic) to xorg-server-0.99.2-r1 (modular):  
http://gentoo-wiki.com/HOWTO_Modular_Xorg .  
  
I have glx running:  
thomas@SchlesisNB ~ $ LIBGL_DEBUG=verbose fglrxinfo  
libGL: XF86DRIGetClientDriverName: 8.18.8 fglrx (screen 0)  
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri//fglrx_dri.so  
libGL: XF86DRIGetClientDriverName: 8.18.8 fglrx (screen 0)  
drmOpenByBusid: busid is PCI:1:0:0  
drmOpenDevice: minor is 0  
drmOpenDevice: node name is /dev/dri/card0  
drmOpenDevice: open result is 4, (OK)  
drmOpenByBusid: drmOpenMinor returns 4  
drmOpenByBusid: drmGetBusid reports PCI:1:0:0  
Can't open configuration file /etc/drirc: No such file or directory.  
Can't open configuration file /home/thomas/.drirc: No such file or directory.  
display: :0.0  screen: 0  
OpenGL vendor string: ATI Technologies Inc.  
OpenGL renderer string: MOBILITY RADEON X600 Generic  
OpenGL version string: 1.3.5395 (X4.3.0-8.18.8)  
  
and Xorg.0.log doesn't show OpenGL-problems:  
[..]  
(II) LoadModule: "glx"  
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so  
(II) Module glx: vendor="X.Org Foundation"  
        compiled for 6.99.99.901, module version = 1.0.0  
        ABI class: X.Org Server Extension, version 0.2  
(II) Loading sub module "GLcore"  
(II) LoadModule: "GLcore"  
(II) Loading /usr/lib/xorg/modules/libGLcore.so  
(II) Module GLcore: vendor="X.Org Foundation"  
        compiled for 6.99.99.901, module version = 1.0.0  
        ABI class: X.Org Server Extension, version 0.2  
(II) Loading extension GLX  
(II) LoadModule: "dri"  
(II) Loading /usr/lib/xorg/modules/extensions/libdri.so  
(II) Module dri: vendor="X.Org Foundation"  
        compiled for 6.99.99.901, module version = 1.0.0  
        ABI class: X.Org Server Extension, version 0.2  
(II) Loading sub module "drm"  
(II) LoadModule: "drm"  
(II) Loading /usr/lib/xorg/modules/linux/libdrm.so  
(II) Module drm: vendor="X.Org Foundation"  
        compiled for 6.99.99.901, module version = 1.0.0  
        ABI class: X.Org Server Extension, version 0.2  
(II) Loading extension XFree86-DRI  
(II) LoadModule: "fglrx"  
(II) Loading /usr/lib/xorg/modules/drivers/fglrx_drv.so  
(II) Module fglrx: vendor="FireGL - ATI Technologies Inc."  
        compiled for 6.8.99.8, module version = 8.18.8  
        Module class: X.Org Video Driver  
        ABI class: X.Org Video Driver, version 0.7  
 
I've installed atiogl_a_dri.so in /usr/lib/modules/dri and 
in /usr/lib/xorg/modules/dri, as you've written. 
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2005-11-06 03:36:05 UTC
Thomas, please don't reassign bugs.
Comment 10 Thomas Schlesinger 2005-11-06 03:38:07 UTC
Addenum: I've checked, that OpenGL does really work, fgl_glxgears shows me the 
rotating gears cube ;-) 
Comment 11 Luca Barbato gentoo-dev 2005-11-06 04:15:35 UTC
What's wrong exactly?
Comment 12 Thomas Schlesinger 2005-11-06 04:42:04 UTC
For me, that was the problem on emerging ati-drivers-8.18.8-r1 on   
xorg-server-0.99.2-r1:    
[..]     
 * Applying fglrx-2.6.14-access_ok.patch ...                                                                                          
[ ok ]     
>>> Source unpacked.     
 * Building the DRM module...     
[..]     
/var/tmp/portage/ati-drivers-8.18.8-r1/work/common/lib/modules/fglrx/build_mod/firegl_public.c:3758:     
warning: passing arg 1 of `smp_call_function' from incompatible pointer type     
make[1]: *** No rule to make target     
`/var/tmp/portage/ati-drivers-8.18.8-r1/work/common/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC3',     
needed by     
`/var/tmp/portage/ati-drivers-8.18.8-r1/work/common/lib/modules/fglrx/build_mod/fglrx.o'.      
Stop.     
make: ***     
[_module_/var/tmp/portage/ati-drivers-8.18.8-r1/work/common/lib/modules/fglrx/build_mod]     
Error 2     
make: Leaving directory `/usr/src/linux-2.6.14-gentoo'     
 * DRM module not built     
>>> Test phase [not enabled]: media-video/ati-drivers-8.18.8-r1     
     
>>> Install ati-drivers-8.18.8-r1     
into /var/tmp/portage/ati-drivers-8.18.8-r1/image/ category media-video     
 * Installing fglrx module     
install: cannot stat `fglrx.ko': No such file or directory     
install: cannot stat     
`/var/tmp/portage/ati-drivers-8.18.8-r1/work/x000/usr/X11R6/bin/*': No such     
file or directory     
man:     
>>> Completed installing ati-drivers-8.18.8-r1     
into /var/tmp/portage/ati-drivers-8.18.8-r1/image/     
[..]     
    
get_version_component_range 1 ${X11_IMPLEM_V} returns the value "0" for modular   
xorg 0.99, so the right path to libfglrx_ip.a.GCC3 wasn't detected. I've found  
a workaround (see comment #6) with some help from the Gentoo forum. 
Comment 13 Mike Auty (RETIRED) gentoo-dev 2005-11-06 04:55:19 UTC
Thanks Thomas, that explains it a little bit.  Firstly Donnie's put a masked
xorg-x11-7.0.0_rc1 ebuild into portage in the four days or so, and I have the
feeling that will return 7 rather than 0 in "get_version_component_range 1
${X11_IMPLEM_V}",  It certainly installed fine for me.  It's probably best to
have support for both, just in case people don't use the xorg-x11 meta package...

As to the glx issue, we're using different video cards, I've got a 9000M, and
also you've used flgrxinfo whilst I was used glxinfo.  Either way, I wasn't
attempting to load fglrx_dri.so, I needed atiogl_a_dri.so for some reason.  Does
anyone know if that's a misconfiguration on my part, or if the different cards
or test programs call different dri modules?  Thanks,

Mike
Comment 14 Luca Barbato gentoo-dev 2005-11-06 05:23:31 UTC
Did you try setting LIBGL_DRIVERS_PATH ? From what I could say the default is
"/usr/X11R6/blah" but could/should work if you override it.

I'm adding the new version there. I hope that's enough
Comment 15 gent_bz 2005-11-08 02:25:03 UTC
Adding symlinks - as suggested by some - works, but adding the line :

LIBGL_DRIVERS_PATH=/usr/lib/xorg/modules/dri

to /etc/env.d/09ati works without filesystem pollution ;)

I now have ati-drivers-8.18.8-r1 working with xorg-x11-7.0.0_rc1 (glxgears,
fgl_glxgears works).  

Thanks.
Comment 16 Mike Auty (RETIRED) gentoo-dev 2005-11-13 08:04:00 UTC
Yep, adding the environment variable to 09ati also works fine for me now.  Sorry
I didn't get back to this bug sooner.  Unfortunately this seems not to have made
it into the recent clean-up/new version of the ati-drivers.  Once that's done I
can't see any reason this bug can't be closed.
Comment 17 gent_bz 2005-11-24 19:11:37 UTC
The env var problem appears to have been fixed - it works for me.

Can this bug be closed?
Comment 18 Mike Auty (RETIRED) gentoo-dev 2005-11-25 00:23:10 UTC
Yep, sorry, my bad.  I didn't notice the environment variable gets added to
09ati in the middle of the ebuild.  I have no problem with marking this as
closed now.
Comment 19 Luca Barbato gentoo-dev 2005-11-25 10:38:24 UTC
eventually closed!

(the deps in the ebuild will come later, sorry)