Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48104 - media-video/ati-drivers-3.7.6-rc1 fail to compile against development-sources-2.6.6-rc1
Summary: media-video/ati-drivers-3.7.6-rc1 fail to compile against development-sources...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-16 21:30 UTC by Gustavo Ribeiro Alves
Modified: 2004-08-11 23:22 UTC (History)
2 users (show)

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


Attachments
Fixes the "structure has no member named `count'" compile error (ati-drivers-3.7.6-r2.ebuild,4.09 KB, patch)
2004-05-23 15:50 UTC, Tarmo Tänav
Details | Diff
Ebuild that uses the fixed patch (ati-drivers-3.7.6-r2.ebuild,3.98 KB, patch)
2004-05-23 15:55 UTC, Tarmo Tänav
Details | Diff
Fixes the "structure has no member named `count'" compile error (2.6.6-count.patch,1.46 KB, patch)
2004-05-27 16:50 UTC, Tarmo Tänav
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Ribeiro Alves 2004-04-16 21:30:43 UTC
When I try to emerge ati-drivers, I get the error messages (about a missing /usr/src/linux-2.6.6-rc1/Module.symvers file) posted bellow. 

The emerge process don't stop when the make process find this error.




Reproducible: Always
Steps to Reproduce:
1. emerge development-sources-2.6.6-rc1
2. emerge ati-drivers-3.7.6-r1
Actual Results:  
[root@gustavo][/home/gralves]$ emerge
/usr/portage/media-video/ati-drivers/ati-drivers-3.7.6-r1.ebuild
Calculating dependencies ...done!
>>> emerge (1 of 1) media-video/ati-drivers-3.7.6-r1 to /
>>> md5 src_uri ;-) fglrx-4.3.0-3.7.6.i386.rpm
 * X11 implementation is xorg-x11.
>>> Unpacking source...
>>> Unpacking fglrx-4.3.0-3.7.6.i386.rpm
 * Applying fglrx-2.6-vmalloc-vmaddr.patch...                             [ ok
]>>> Source unpacked.
 * Building the DRM module...
make: Entering directory `/usr/src/linux-2.6.6-rc1'
  CC [M] 
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agp3.o
  CC [M] 
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/nvidia-agp.o
  CC [M] 
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o
  CC [M] 
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/i7505-agp.o
  CC [M] 
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/firegl_public.o
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:2248:
warning: initialization from incompatible pointer type
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:2266:
warning: initialization from incompatible pointer type
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:2273:
warning: initialization from incompatible pointer type
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:2280:
warning: initialization from incompatible pointer type
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:2289:
warning: initialization from incompatible pointer type
  LD [M] 
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/fglrx.o
  Building modules, stage 2.
  MODPOST
/usr/src/linux-2.6.6-rc1/Module.symvers: No such file or directory
make[1]: *** [__modpost] Error 134
make: *** [modules] Error 2
make: Leaving directory `/usr/src/linux-2.6.6-rc1'
 * DRM module not built
nostrip
 
>>> Install ati-drivers-3.7.6-r1 into
/var/tmp/portage/ati-drivers-3.7.6-r1/image/ category media-video
install: cannot stat
`/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/fglrx.ko':
No such file or directory
man:
making executable: /usr/X11R6/lib/libfglrx_gamma.so.1.0
>>> Completed installing into /var/tmp/portage/ati-drivers-3.7.6-r1/image/
 
>>> Merging media-video/ati-drivers-3.7.6-r1 to /
--- /etc/
--- /etc/env.d/
>>> /etc/env.d/09ati
--- /lib/
--- /lib/modules/
--- /lib/modules/2.6.6-rc1/
--- /lib/modules/2.6.6-rc1/video/
--- /opt/
--- /opt/ati/
--- /opt/ati/bin/
>>> /opt/ati/bin/fglrxinfo
>>> /opt/ati/bin/fglrx_xgamma
>>> /opt/ati/bin/fglrxconfig
--- /usr/
--- /usr/lib/
--- /usr/lib/opengl/
--- /usr/lib/opengl/ati/
>>> /usr/lib/opengl/ati/lib/
>>> /usr/lib/opengl/ati/lib/libGL.so.1.2
>>> /usr/lib/opengl/ati/lib/libMesaGL.so -> libGL.so.1.2
>>> /usr/lib/opengl/ati/lib/libGL.la -> ../../xorg-x11/lib/libGL.la
>>> /usr/lib/opengl/ati/lib/libGL.so -> libGL.so.1.2
>>> /usr/lib/opengl/ati/extensions -> ../xorg-x11/extensions
>>> /usr/lib/opengl/ati/include -> ../xorg-x11/include
--- /usr/X11R6/
--- /usr/X11R6/bin/
--- /usr/X11R6/lib/
--- /usr/X11R6/lib/modules/
--- /usr/X11R6/lib/modules/dri/
>>> /usr/X11R6/lib/modules/dri/fglrx_dri.so
--- /usr/X11R6/lib/modules/linux/
>>> /usr/X11R6/lib/modules/linux/libfglrxdrm.a
--- /usr/X11R6/lib/modules/drivers/
>>> /usr/X11R6/lib/modules/drivers/fglrx_drv.o
>>> /usr/X11R6/lib/libfglrx_gamma.so.1.0
>>> /usr/X11R6/lib/libfglrx_gamma.a
--- /usr/X11R6/include/
--- /usr/X11R6/include/X11/
--- /usr/X11R6/include/X11/extensions/
>>> /usr/X11R6/include/X11/extensions/fglrx_gamma.h
--- /usr/share/
--- /usr/share/doc/
--- /usr/share/doc/ati-drivers-3.7.6-r1/
>>> /usr/share/doc/ati-drivers-3.7.6-r1/LICENSE.GPL.gz
>>> /usr/share/doc/ati-drivers-3.7.6-r1/LICENSE.QPL.gz
--- /usr/include/
--- /usr/include/GL/
>>> /usr/include/GL/glxATI.h
>>> /usr/lib/opengl/ati/lib/libGL.so.1 -> libGL.so.1.2
>>> Safely unmerging already-installed instance...
--- !mtime obj /usr/share/doc/ati-drivers-3.7.6-r1/LICENSE.QPL.gz
--- !mtime obj /usr/share/doc/ati-drivers-3.7.6-r1/LICENSE.GPL.gz
--- !mtime obj /usr/lib/opengl/ati/lib/libGL.so.1.2
--- !mtime obj /usr/include/GL/glxATI.h
--- !mtime obj /usr/X11R6/lib/modules/linux/libfglrxdrm.a
--- !mtime obj /usr/X11R6/lib/modules/drivers/fglrx_drv.o
--- !mtime obj /usr/X11R6/lib/modules/dri/fglrx_dri.so
--- !mtime obj /usr/X11R6/lib/libfglrx_gamma.so.1.0
--- !mtime obj /usr/X11R6/lib/libfglrx_gamma.a
--- !mtime obj /usr/X11R6/include/X11/extensions/fglrx_gamma.h
--- !mtime obj /opt/ati/bin/fglrxinfo
--- !mtime obj /opt/ati/bin/fglrxconfig
--- !mtime obj /opt/ati/bin/fglrx_xgamma
--- cfgpro dir /lib/modules/2.6.6-rc1/video
--- cfgpro dir /lib/modules/2.6.6-rc1
--- !mtime obj /etc/env.d/09ati
--- cfgpro dir /etc/env.d
--- !empty dir /usr/share/doc/ati-drivers-3.7.6-r1
--- !empty dir /usr/share/doc
--- !empty dir /usr/share
--- !empty dir /usr/lib/opengl/ati/lib
--- !empty dir /usr/lib/opengl/ati
--- !empty dir /usr/lib/opengl
--- !empty dir /usr/lib
--- !empty dir /usr/include/GL
--- !empty dir /usr/include
--- !empty dir /usr/X11R6/lib/modules/linux
--- !empty dir /usr/X11R6/lib/modules/drivers
--- !empty dir /usr/X11R6/lib/modules/dri
--- !empty dir /usr/X11R6/lib/modules
--- !empty dir /usr/X11R6/lib
--- !empty dir /usr/X11R6/include/X11/extensions
--- !empty dir /usr/X11R6/include/X11
--- !empty dir /usr/X11R6/include
--- !empty dir /usr/X11R6/bin
--- !empty dir /usr/X11R6
--- !empty dir /usr
--- !empty dir /opt/ati/bin
--- !empty dir /opt/ati
--- !empty dir /opt
--- !empty dir /lib/modules
--- !empty dir /lib
--- !empty dir /etc
--- !targe sym /usr/lib/opengl/ati/lib/libMesaGL.so
--- !targe sym /usr/lib/opengl/ati/lib/libGL.so.1
--- !targe sym /usr/lib/opengl/ati/lib/libGL.so
--- !targe sym /usr/lib/opengl/ati/lib/libGL.la
--- !targe sym /usr/lib/opengl/ati/include
--- !targe sym /usr/lib/opengl/ati/extensions
>>> original instance of package unmerged safely.
 
 * To switch to ATI OpenGL, run "opengl-update ati"
 * To change your XF86Config you can use the bundled "fglrxconfig"
 
>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...
>>> media-video/ati-drivers-3.7.6-r1 merged.
 
>>> clean: No packages selected for removal.
 
>>> Auto-cleaning packages ...
 
>>> No outdated packages were found on your system.
 
 
 * GNU info directory index is up-to-date.
 
[root@gustavo][/home/gralves]$


Expected Results:  
Built DRM drivers :)
Comment 1 Gustavo Ribeiro Alves 2004-04-17 10:12:21 UTC
According to http://forums.gentoo.org/viewforum.php?f=23 , it appears that the problem is only present if you compile the kernel without any modules.
Comment 2 Luca Barbato gentoo-dev 2004-04-18 08:09:16 UTC
do you have module support enabled?
Comment 3 Gustavo Ribeiro Alves 2004-04-18 11:17:53 UTC
Yes I did. But for some unknow reason the kernel does not build Modules.symvers unless you explicitelly sellect some module to be compiled.

Right now I selected a random module(NFS client) and the driver compiled.
Comment 4 Luca Barbato gentoo-dev 2004-04-18 19:26:49 UTC
looks like more a kernel issue than an ebuild issue, anybody could comment about that?
Comment 5 John Mylchreest (RETIRED) gentoo-dev 2004-04-19 10:44:00 UTC
I can also confirm with gustavo.
Its a fundemental problem with Kbuild which has been verified and soon corrected by sam.
Until the next release I wouldnt except this to work with this setup.
Comment 6 Aanund Austrheim 2004-05-18 01:19:10 UTC
Hiyas, it craps out on mm-sources-2.6.6-r2 also, the error msg's differ, so I just threw them in here for fun.

---

>>> emerge (1 of 1) media-video/ati-drivers-3.7.6-r1 to /
>>> md5 src_uri ;-) fglrx-4.3.0-3.7.6.i386.rpm
 * X11 implementation is xfree.
>>> Unpacking source...
>>> Unpacking fglrx-4.3.0-3.7.6.i386.rpm
 * Applying fglrx-2.6-vmalloc-vmaddr.patch...                             [ ok ]>>> Source unpacked.
 * Building the DRM module...
make: Entering directory `/usr/src/linux-2.6.6-mm2'
  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agp3.o
  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/nvidia-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `agp_generic_alloc_page':
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.c:1405: error: structure has no member named `count'
make[1]: *** [/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o] Error 1
make: *** [/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod] Error 2
make: Leaving directory `/usr/src/linux-2.6.6-mm2'
 * DRM module not built
nostrip

---

Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.6-mm2)
=================================================================
System uname: 2.6.6-mm2 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.14
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -mmmx -msse -m3dnow -fomit-frame-pointer -ffast-math"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -mmmx -msse -m3dnow -fomit-frame-pointer -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo http://mirror.pudas.net/gentoo ftp://mirror.pudas.net/gentoo"
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="3dnow X alsa apm artswrappersuid avi berkdb crypt cups encode esd faad flac foomaticdb gdbm gif gnome gpm gstreamer gtk2 gtkhtml imlib java jpeg libg++ libwww mad mikmod mmx mozilla mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python quicktime readline samba sdl slang spell sse ssl svga tcpd threads tiff truetype x86 xml xml2 xv zlib"
Comment 7 M.Gniffke 2004-05-20 02:41:35 UTC
Same here with 2.6.6-mm4 Sources


bash-2.05b$ sudo emerge ati-drivers
Calculating dependencies ...done!
>>> emerge (1 of 1) media-video/ati-drivers-3.7.6-r1 to /
>>> md5 src_uri ;-) fglrx-4.3.0-3.7.6.i386.rpm
 * X11 implementation is xorg-x11.
>>> Unpacking source...
>>> Unpacking fglrx-4.3.0-3.7.6.i386.rpm
 * Applying fglrx-2.6-vmalloc-vmaddr.patch...                             [ ok ]
>>> Source unpacked.
 * Building the DRM module...
make: Entering directory `/usr/src/linux-2.6.6-mm4'
  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agp3.o
  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/nvidia-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `agp_generic_alloc_page':
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.c:1405: error: structure has no member named `count'
make[1]: *** [/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o] Error 1
make: *** [_module_/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod] Error 2
make: Leaving directory `/usr/src/linux-2.6.6-mm4'
 * DRM module not built
nostrip
Comment 8 Asbjorn Sannes 2004-05-20 07:54:27 UTC
Found two patches that I added to the ebuild and it worked out for me, ..

Just store those two into two files and add lines in the ebuild (look for epatch  and you'll know what to do.. )

A regparm patch from http://rage3d.com/board/showthread.php?s=&threadid=33748041 (http://www.kaseorg.com/fglrx-3.7.6-regparm.patch).

And another one from 
http://rage3d.com/board/showthread.php?s=&threadid=33737573

--- agpgart_be.c.orig   2004-05-14 21:39:19.943584512 +0000
+++ agpgart_be.c        2004-05-14 21:39:28.140338416 +0000
@@ -1402,7 +1402,7 @@ unsigned long agp_generic_alloc_page(voi
     }
 #endif
 
-    atomic_inc(&page->count);
+    get_page(page);
     set_bit(PG_locked, &page->flags);
     atomic_inc(&agp_bridge.current_memory_agp);
 
@@ -4413,7 +4413,7 @@ static unsigned long ali_alloc_page(void
     if (page == NULL)
         return 0;
 
-    atomic_inc(&page->count);
+        get_page(page);
     set_bit(PG_locked, &page->flags);
     atomic_inc(&agp_bridge.current_memory_agp);
 
--- firegl_public.c.orig        2004-05-14 21:38:53.296635464 +0000
+++ firegl_public.c     2004-05-14 21:40:28.492163544 +0000
@@ -2052,7 +2052,7 @@ static vm_nopage_ret_t vm_shm_nopage(str
     pMmPage = virt_to_page(kaddr);
 #endif /* LINUX_VERSION_CODE < 0x020400 */
 
-    atomic_inc(&(pMmPage->count));  /* inc usage count of page */
+    get_page(pMmPage);  /* inc usage count of page */
 
 #if LINUX_VERSION_CODE >= 0x020400
   //  __KE_DEBUG3("vm-address 0x%08lx => kernel-page-address 0x%p\n",
Comment 9 Luca Barbato gentoo-dev 2004-05-21 10:15:52 UTC
those are two differen issues

one is a kbuild issue solvible building another module in the kernel

the -mm one is a bit more problematic, I already patched locally it but the result is a kernel oops. I guess it needs a bit more investigation

Comment 10 Tarmo Tänav 2004-05-23 15:50:39 UTC
Created attachment 31912 [details, diff]
Fixes the "structure has no member named `count'" compile error

I made this patch to fix the error:
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.c:
In function `agp_generic_alloc_page':
/var/tmp/portage/ati-drivers-3.7.6-r1/work/lib/modules/fglrx/build_mod/agpgart_be.c:1405:
error: structure has no member named `count'

It has so far worked fine, no oopses, no stability issues whatsoever
(2.6.6-love4 (based on some -mm patchset), 3.7.6 ati-drivers)
Comment 11 Tarmo Tänav 2004-05-23 15:55:08 UTC
Created attachment 31913 [details, diff]
Ebuild that uses the fixed patch
Comment 12 Luca Barbato gentoo-dev 2004-05-24 02:35:43 UTC
I'll take a look in short time
Comment 13 Paulo Fidalgo 2004-05-25 06:00:22 UTC
Please take a look as sooner as you can, because in this version we have some bugfixes, and more performance... 3.2.8 has some visual artifacts in some games like ut 2003/2004....
Comment 14 Simon Cooper 2004-05-26 10:23:56 UTC
I've tried putting the patch code above into files/2.6.6-count.patch, but it doesnt patch. Could someone post an actual patch file as an attachment to make it easier to find (and to make sure im not messing up myself)
Comment 15 Luca Barbato gentoo-dev 2004-05-27 08:42:44 UTC
I put a similar patch in portage, I just tested it on 2.6.7-rc1, not the -mm ones.
Comment 16 Tarmo Tänav 2004-05-27 16:50:17 UTC
Created attachment 32176 [details, diff]
Fixes the "structure has no member named `count'" compile error

Oops, sent the ebuild instead of the patch
Comment 17 Luca Barbato gentoo-dev 2004-08-11 23:22:15 UTC
Fixed long time ago