Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583574 - x11-drivers/ati-drivers-15.12-r1 doesn't build with new kernels
Summary: x11-drivers/ati-drivers-15.12-r1 doesn't build with new kernels
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo X packagers
: 575248 586076 (view as bug list)
Depends on:
Reported: 2016-05-20 12:06 UTC by Niels Dettenbach
Modified: 2017-03-15 19:33 UTC (History)
6 users (show)

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

build output / log (build_log.txt,15.02 KB, text/plain)
2016-05-20 12:06 UTC, Niels Dettenbach
Kernel 4.6+ patch (kernel-4.6.patch,1.20 KB, patch)
2016-05-23 17:27 UTC, Marcin Deranek
Details | Diff
Kernel 4.7+ patch (kernel-4.7.patch,814 bytes, patch)
2016-08-01 19:11 UTC, Marcin Deranek
Details | Diff
Fix for 4.9 kernel (kernel-4.9.patch,1.16 KB, patch)
2016-12-12 05:47 UTC, adebeus
Details | Diff
Kernel 4.10 patch (kernel-4.10.patch,4.60 KB, patch)
2017-02-21 15:52 UTC, Risto A. Paju
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Dettenbach 2016-05-20 12:06:51 UTC
Created attachment 434770 [details]
build output / log

Hu guys,

i've hit a bug when compiling ati-drivers (fglrx / ATI/AMD graphic drivers) with the new 4.6.0 kernel. Swotching to the latest 4.5 kernel works instead.

I get this:

/var/tmp/portage/x11-drivers/ati-drivers-15.12-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_UnlockUserPages’:
/var/tmp/portage/x11-drivers/ati-drivers-15.12-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3277:9: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
         page_cache_release((struct page*)page_list[i]);
/var/tmp/portage/x11-drivers/ati-drivers-15.12-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level:
/var/tmp/portage/x11-drivers/ati-drivers-15.12-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6495:12: warning: ‘KCL_fpu_save_init’ defined but not used [-Wunused-function]
 static int KCL_fpu_save_init(struct task_struct *tsk)
cc1: some warnings being treated as errors
scripts/ recipe for target '/var/tmp/portage/x11-drivers/ati-drivers-15.12-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o' failed
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-15.12-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1

Following the kernel lists it seems to me related to some of the the 4.6 kernel changes in memory page handling - so possibly the driver has to be adapted to 4.6 yet - but just an idea...

many thanks,

Comment 1 Marcin Deranek 2016-05-23 17:27:40 UTC
Created attachment 435102 [details, diff]
Kernel 4.6+ patch
Comment 2 Marcin Deranek 2016-05-23 17:35:40 UTC
Hopefully it works for you...
Comment 3 Zdeněk Žamberský 2016-05-27 17:56:15 UTC
I had the same problem (failed build of ati-drivers-15.12-r1 on kernel 4.6.0). Patch attached Marcin fixed the issue. It builds, X runs.
Comment 4 Niels Dettenbach 2016-06-03 12:55:58 UTC
Works as expected with kernel 4.6.0-gentoo

Many thanks!!!

btw: Pls note if i should send my regarding ebuild patch (just placed patch into "files" and call it by "epatch" in the ebuilds epatch section) to anyone here (if not automatically goes into portage upstream)? Seems not in portage yet.

best regards,

Comment 5 Marcin Deranek 2016-06-04 06:42:23 UTC
Easier to put it as eg. /etc/portage/patches/x11-drivers/ati-drivers/kernel-4.6.patch and build it (as I do) as ati-drivers supports user provided patches (epatch_user directive).
Comment 6 Nick 2016-06-16 06:44:16 UTC
*** Bug 586076 has been marked as a duplicate of this bug. ***
Comment 7 Marcin Deranek 2016-08-01 19:11:47 UTC
Created attachment 442216 [details, diff]
Kernel 4.7+ patch

Patch for Kernels 4.7+
Comment 8 adebeus 2016-12-12 05:47:49 UTC
Created attachment 455962 [details, diff]
Fix for 4.9 kernel

This patch allows ati-drivers to compile on kernel 4.9. Tested with gentoo-sources-4.9.0. Assumes that kernel-4.6.patch from this thread has already been applied.
Comment 9 Risto A. Paju 2017-02-21 15:52:34 UTC
Created attachment 464540 [details, diff]
Kernel 4.10 patch

Patch for Linux 4.10, needs the previous patches. Tested with ati-drivers 15.9-r1 as 15.12 has problems with my setup, but so far the same patches have worked.
Comment 10 Matt Turner gentoo-dev 2017-02-23 23:13:23 UTC
*** Bug 575248 has been marked as a duplicate of this bug. ***
Comment 11 Matt Turner gentoo-dev 2017-03-15 19:33:25 UTC
x11-drivers/ati-drivers has been removed, per bug 582406.