Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83897 - ati-drivers 8.8.25 does not build against 2.6.11 kernel
Summary: ati-drivers 8.8.25 does not build against 2.6.11 kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 All
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-02 16:19 UTC by Benjamin Smee (strerror) (RETIRED)
Modified: 2005-04-11 13:27 UTC (History)
1 user (show)

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


Attachments
ewarn2die.patch (ewarn2die.patch,683 bytes, patch)
2005-04-10 13:17 UTC, Ioannis Aslanidis (RETIRED)
Details | Diff
Makefile.patch (Makefile.patch,459 bytes, patch)
2005-04-10 14:19 UTC, Ioannis Aslanidis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Smee (strerror) (RETIRED) gentoo-dev 2005-03-02 16:19:50 UTC
I just grabbed the new 2.6.11 development-sources and built a new kernel that I am running off. I tried to emerge ati-drivers and it fails to compile causing a breakage of the ebuild. 
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.11 i686)
=================================================================
System uname: 2.6.11 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  8 2005, 10:40:36)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -fomit-frame-pointer -pipe -O3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/kde/cvs/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -fomit-frame-pointer -pipe -O3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox sfperms userpriv"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="en_US"
MAKEOPTS="-j3"
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 3dnowex X aac accounting acl alsa apache2 avi berkdb bidi bzlib cap caps cddb cdr chroot crypt cups curl dbm divx4linux dnsdb dts dvb dvd dvdr edl emboss encode evms2 f77 faac faad fam flac font-server foomaticdb fortran freetype gd gdbm gif gmp gpm gtk gtk2 idea imap imlib ipv6 java jpeg kde lcd ldap libg++ libwww lmtp mad maildir mha mikmod mime mmx mng mpeg mpeg4 mysql nagios-dns nagios-ntp nagios-ping nagios-s ncurses nls no-old-linux nocd nptl odbc oggvorbis opengl pam parse-clocks pcap pcre pda pdflib perl png posix pthreadspwdb python qt quicktime radeon readline real regexp ruby sasl sdl sftplogging skey snmp spell sse ssl svga tcltk tcpd threads tiff transcode truetype truetype-fonts type1-fonts unicode usb vim-with-x xchattext xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Comment 1 t35t0r 2005-03-02 22:15:42 UTC
Yes verified. Here is the solution:

/root# echo ">=media-video/ati-drivers-8.8.25 ~x86" >> /etc/portage/package.keywords
echo ">=x11-base/opengl-update-2.1_pre1 ~x86" >> /etc/portage/package.keywords
/root# emerge -C ati-drivers
emerge -av ati-drivers

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     U ] x11-base/opengl-update-2.1.1-r1 [2.0_pre5] 0 kB
[ebuild  N    ] media-video/ati-drivers-8.10.19  0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] Yes
.
.
CC      /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/fglrx.mod.o
  LD [M]  /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/fglrx.ko
make: Leaving directory `/usr/src/linux-2.6.11-gentoo'
.
.
that should do it now i need to test acceleration..brb rebooting
Comment 2 t35t0r 2005-03-02 22:34:15 UTC
Don't forget to opengl-update ati after installing ~x86 ebuild! everything works as it was again (really horribly, ut2k4 is too choppy to play, some movies don't work with -vo xv, haha but what can i say its ATI).

fgl_glxgears/glxgears works. glxinfo showing direct rendering and ATI extensions.

direct rendering: Yes
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9600SE Generic
OpenGL version string: 1.3.4893 (X4.3.0-8.10.19)
Comment 3 Luca Barbato gentoo-dev 2005-03-03 02:32:06 UTC
if you are building something that is ~x86 on a x86 you may expect issue. Once the .11 is marked stable probably I'll mark as well xorg-6.8.2 openg-update 2.1x and the appropriate ati driver.

at the moment if you want a .11 kernel please try the latest driver provided with the proper deps.

Marked as REMIND

amd64 please test those ebuild too
Comment 4 mark0 2005-03-10 07:06:02 UTC
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.11-gentoo-r3 i686)
=================================================================
System uname: 2.6.11-gentoo-r3 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Jan 12 2005, 19:30:23)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r2, 1.6.3, 1.7.9, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r3
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -msse -mmmx -m3dnow -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -ffast-math -fprefetch-loop-arrays -finline-limit=600"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/rc.d /etc/snort /etc/terminfo /etc/wget /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -msse -mmmx -m3dnow -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -ffast-math -fprefetch-loop-arrays -finline-limit=600"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US"
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 X aalib acpi alsa apache2 apm audiofile avi bash-completion berkdb bitmap-fonts blender-game bzlib cdr cpdflib crypt css divx4linux dvb dvd dvdr dvdread encode esd exif f77 fam fbcon flac font-server foomaticdb fortran gd gd-external gdbm gif gphoto2 gpm gtk gtk2 guile i8x0 icq imagemagick imlib ipv6 irda java joystick jpeg libg++ libwww mad memlimit mikmod mime mjpeg mmx motif mpeg mysql mythtv ncurses nls nptl oggvorbis openal opengl oss pam pdflib perl php png posix python qt quicktime readline samba sdl slang sox spell ssl svga tcltk tcpd tiff transcode truetype truetype-fonts type1-fonts unicode userlocales xface xine xml2 xmms xosd xpm xv xvid xvmc zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS

qq ~ # emerge ati-drivers
Calculating dependencies ...done!
>>> emerge (1 of 1) media-video/ati-drivers-8.10.19 to /
>>> md5 src_uri ;-) fglrx_6_8_0-8.10.19-1.i386.rpm
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.11-gentoo-r3
 * X11 implementation is xorg-x11.
>>> Unpacking source...
>>> Unpacking fglrx_6_8_0-8.10.19-1.i386.rpm
 * Applying fglrx-2.6-pagetable.patch ...                                                                                                     [ ok ]
 * Applying 8.8.25-via-amd64.patch ...                                                                                                        [ ok ]
>>> Source unpacked.
 * Building the DRM module...
make: Entering directory `/usr/src/linux-2.6.11-gentoo-r3'
  CC [M]  /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agp3.o
  CC [M]  /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/nvidia-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.o
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `agp_find_supported_device':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c:6542: warning: unused variable `cap_ptr'
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `__fgl_agp_init':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c:7627: warning: `pm_register' is deprecated (declared at include/l                     
inux/pm.h:106)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `__fgl_agp_cleanup':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c:7637: warning: `pm_unregister_all' is deprecated (declared at inc                     
lude/linux/pm.h:116)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c: At top level:
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/agpgart_be.c:6523: warning: 'agp_check_supported_device' defined but not used
  CC [M]  /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/i7505-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.o
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `firegl_stub_putminor':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:509: warning: `inter_module_put' is deprecated (declared at in                     
clude/linux/module.h:578)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:511: warning: `inter_module_unregister' is deprecated (declare                     
d at include/linux/module.h:574)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `firegl_stub_register':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:531: warning: `inter_module_register' is deprecated (declared                      
at include/linux/module.h:573)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:562: warning: `inter_module_put' is deprecated (declared at in                     
clude/linux/module.h:578)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `do_vm_shm_nopage':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2216: error: `pgd' undeclared (first use in this function)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2216: error: (Each undeclared identifier is reported only once
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2216: error: for each function it appears in.)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2216: error: `p' undeclared (first use in this function)
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2216: error: too many arguments to function `pud_offset'
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `__ke_vm_phys_addr_str':
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2597: warning: passing arg 1 of `pmd_offset' from incompatible                     
 pointer type
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2585: warning: unused variable `pud_p'
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c: At top level:
/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.c:2686: warning: initialization from incompatible pointer type
make[1]: *** [/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/firegl_public.o] Error 1
make: *** [_module_/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod] Error 2
make: Leaving directory `/usr/src/linux-2.6.11-gentoo-r3'
 * DRM module not built
>>> Test phase [not enabled]: media-video/ati-drivers-8.10.19

Comment 5 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-10 13:06:00 UTC
I can confirm Comment #4

Additionally, ebuild for ati-drivers-8.12.10 fails with the similar error. Looks like the ebuild won't work on (~)amd64.
Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-10 13:17:48 UTC
Created attachment 55911 [details, diff]
ewarn2die.patch

Perhaps it would be better to halt emerge if the DRM module fails to build
instead of issuing a warning. This patch does just that.
Comment 7 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-10 13:58:48 UTC
It looks to me that the following line in the Makefiles of lib/ are the ones that bring the error:

GCC_VER_MAJ      = $(shell gcc --version | head -n 1 | sed -e 's/[^0-9. ]//g;s/^ *//;s/^\(.\)\..*$$/\1/')


The expected output is _not_ which it should be. What I get with that command is:

bluehat build_mod # sh gcc --version | head -n 1 | sed -e 's/[^0-9. ]//g;s/^ *//;s/^\(.\)\..*$$/\1/'
8664  3.4.320050110   3.4.3.200501102 3.4.3.200501100 8.7.7


Instead of that, it should return just '3'. Ideas?
Comment 8 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-10 14:05:17 UTC
COROLLARY: Replacing


GCC_VER_MAJ = $(shell gcc --version | head -n 1 | sed -e 's/[^0-9. ]//g;s/^ *//;s/^\(.\)\..*$$/\1/')

with

GCC_VER_MAJ = 3

worked. Obviously this won't work on any version different than gcc3.

To meanwhile workaround this until there is a final solution to this:

# emerge ati-drivers

when you see '>>Source files unpacked', press CTRL+Z (stop)

edit GCC_VER_MAJ as explained above in the following Makefile:

/var/tmp/portage/ati-drivers-8.10.19/work/lib/modules/fglrx/build_mod/2.6.x/Makefile

after that, just do

# fg

---> Installation successful, now can modprobe fine:

bluehat ~ # file /lib/modules/2.6.11-gentoo-r6/video/fglrx.ko 
/lib/modules/2.6.11-gentoo-r6/video/fglrx.ko: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped
Comment 9 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-10 14:19:21 UTC
Created attachment 55919 [details, diff]
Makefile.patch

This patch corrects lib/modules/fglrx/build_mod/2.6.x/Makefile for amd64 (at
least).

It should be applied by the ebuild if uname -m = x86_64
Comment 10 Luca Barbato gentoo-dev 2005-04-11 04:25:42 UTC
Please use separate bugs...

Fixed
Comment 11 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-04-11 13:27:35 UTC
It works. Sorry for mixing bugs... my fault :)