Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218422 - x11-drivers/ati-drivers fail to build against 2.6.25-r1 kernel
Summary: x11-drivers/ati-drivers fail to build against 2.6.25-r1 kernel
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: kernel-2.6.25
  Show dependency tree
 
Reported: 2008-04-19 14:46 UTC by John Doe
Modified: 2008-08-11 14:32 UTC (History)
11 users (show)

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


Attachments
working patch (1.patch,1.35 KB, patch)
2008-04-21 21:03 UTC, Tim Mason
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Doe 2008-04-19 14:46:35 UTC
cap_t has been removed from include/linux/capability.h and ati-driver uses it "vi /var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c"

1886 KCL_TYPE_Cap ATI_API_CALL KCL_PosixSecurityCapGetEffectiveVector()
1887 {
1888     return cap_t(current->cap_effective);
1889 }
1890
1891 /** \brief Set vector of effective security caps for the current process
1892  *  \param cap OS dependent vector of effective security caps
1893  */
1894 void ATI_API_CALL KCL_PosixSecurityCapSetEffectiveVector(KCL_TYPE_Cap cap)
1895 {
1896     cap_t(current->cap_effective) = cap;
1897 }


Reproducible: Always

Steps to Reproduce:
1. emerge ati-drivers


Actual Results:  
* Messages for package x11-drivers/ati-drivers-8.471.3:

 *
 * ERROR: x11-drivers/ati-drivers-8.471.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3204:  Called linux-mod_src_compile
 *             environment, line 2422:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CC=\"$(get-KERNEL_CC)\"                                                LDFLAGS=\"$(get_abi_LDFLAGS)\"                                ${BUILD_FIXES}                                           ${BUILD_PARAMS}                                               ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  GCC_VER_MAJ=4 KVER=2.6.25-gentoo-r1 KDIR=/usr/src/linux kmod_build
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/temp/environment'.
 *



* Preparing fglrx module
make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r1'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_PosixSecurityCapGetEffectiveVector':
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1888: error: implicit declaration of function 'cap_t'
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_PosixSecurityCapSetEffectiveVector':
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1896: error: invalid lvalue in assignment
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r1'
make: *** [kmod_build] Error 2
 *
 * ERROR: x11-drivers/ati-drivers-8.471.3 failed.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-04-19 15:16:59 UTC
Hope you're ready to help fixing the drivers :)
Comment 2 Luca Barbato gentoo-dev 2008-04-19 15:35:32 UTC
the cap stuff is easy to fix, the tlb and memory management stuff got unexposed and require upstream to take care.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2008-04-19 15:42:43 UTC
Luca, any chance you could add a kernel version check to the ebuild so that it deliberately bails out on 2.6.25? Or if it works on some configurations, perhaps just an ewarn would be useful. Thanks.
Comment 4 Tim Mason 2008-04-21 20:58:31 UTC
applying the two patches found on google for this problem, and then altering the kernel sources via the method in the Gentoo ATI Drivers HOWTO page will make this compile correctly.  I do not know if this can be accommodated via portage as it would require patches for both the kernel and the drivers.
Comment 5 Tim Mason 2008-04-21 21:03:01 UTC
Created attachment 150533 [details, diff]
working patch
Comment 6 Tim Mason 2008-04-21 21:04:39 UTC
The attached file is the patch to fix the original problem the compilation fails with, and then the process listed at 

http://gentoo-wiki.com/Ati#Build_ati-drivers_on_rt-kernels_failed

will fix the subsequent problem. 
Comment 7 Ortwin Glueck 2008-05-06 17:59:39 UTC
Woah, that page suggests to remove GPL-only annotations! That's bloody illegal. Greg KH would probably kill you with his own hands for that.
Comment 8 Tim Mason 2008-05-07 21:55:00 UTC
i don't know about the legality of it, as i'm strictly an end-user.  all i know is it works.
Comment 9 Ortwin Glueck 2008-05-11 15:23:31 UTC
Oh yeah, I forgot that the GPL and copyright law doesn't apply to end users.
Comment 10 Marek Szuba (RETIRED) archtester gentoo-dev 2008-07-27 22:59:52 UTC
For the record, I would just like to point out that a dependency conflict now exists between x11-drivers/ati-drivers and sys-kernel/gentoo-sources or sys-kernel/vanilla-sources - both kernel ebuilds have now got 2.5.25 releases tagged as stable (at least on x86 and amd64). Given that the problem seems to have already been resolved in more recent upstream packages, it seems a good idea to resolve this conflict by selecting one of such more recent packages and marking it as stable.
Comment 11 Thiago Berne 2008-08-11 14:32:45 UTC
I agree. It would be nice having my X server running without any hack...

(In reply to comment #10)
> For the record, I would just like to point out that a dependency conflict now
> exists between x11-drivers/ati-drivers and sys-kernel/gentoo-sources or
> sys-kernel/vanilla-sources - both kernel ebuilds have now got 2.5.25 releases
> tagged as stable (at least on x86 and amd64). Given that the problem seems to
> have already been resolved in more recent upstream packages, it seems a good
> idea to resolve this conflict by selecting one of such more recent packages and
> marking it as stable.
>