Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420751 - x11-drivers/ati-drivers-12.4 fails to build against kernel 3.5-rc1
Summary: x11-drivers/ati-drivers-12.4 fails to build against kernel 3.5-rc1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks:
 
Reported: 2012-06-11 22:49 UTC by Fabio Rossi
Modified: 2012-07-21 21:45 UTC (History)
1 user (show)

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


Attachments
New patch to fix do_mmap removal (ati-drivers-do_mmap.patch,1.40 KB, patch)
2012-06-17 15:58 UTC, Enrico Tagliavini
Details | Diff
New patch to fix do_mmap removal (ati-drivers-do_mmap.patch,1.39 KB, patch)
2012-06-20 17:19 UTC, Enrico Tagliavini
Details | Diff
New patch to fix do_mmap removal (ati-drivers-do_mmap.patch,1.37 KB, patch)
2012-06-20 17:28 UTC, Enrico Tagliavini
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2012-06-11 22:49:28 UTC
Here is the error:

make[1]: Entering directory `/usr/src/wireless-testing'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_io.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_str.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_iommu.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o
/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_AllocLinearAddrInterval’:
/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2122:5: error: implicit declaration of function ‘do_mmap’
/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2122:13: warning: cast to pointer from integer of different size
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-12.4/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-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/wireless-testing'
make: *** [kmod_build] Error 2
 * ERROR: x11-drivers/ati-drivers-12.4 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =x11-drivers/ati-drivers-12.4',
 * the complete build log and the output of 'emerge -pqv =x11-drivers/ati-drivers-12.4'.
 * The complete build log is located at '/var/log/portage/x11-drivers:ati-drivers-12.4:20120611-205256.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-12.4/temp/environment'.
 * S: '/var/tmp/portage/x11-drivers/ati-drivers-12.4/work'


I can't test a newer ati-drivers release because 12.4 is the last version supporting my video card :-(

A similar problem for virtualbox-modules has been solved in #419361
Comment 1 Enrico Tagliavini 2012-06-15 17:24:40 UTC
Thank you for pointing this out and sorry for the late. I uploaded an updated version of ati-drivers-12.4 in the X11 overlay. I didn't tested it at runtime, but I'm able to compile the module with a fix inspired by bug #419361 as Fabio suggested.

If you will test it please report if it working for you. Thank you again.
Comment 2 Fabio Rossi 2012-06-15 23:26:28 UTC
Thanks for the patch! Now it compiles but at the end of the merge process I get

WARNING: //lib/modules/3.5.0-rc1-wl/video/fglrx.ko needs unknown symbol do_munmap

so I guess it will not work at runtime
Comment 3 Enrico Tagliavini 2012-06-17 13:39:30 UTC
You are right it will not, not even with older kernels. I will try something else
Comment 4 Enrico Tagliavini 2012-06-17 15:58:36 UTC
Created attachment 315599 [details, diff]
New patch to fix do_mmap removal

Fabio can you try this patch please. I'm not 100% sure it will link correctly, but it is worth a try at least. Additionally this patch should be complete except the linking stage. I don't understand very well how kernel symbols are exposed.
Comment 5 Fabio Rossi 2012-06-19 06:41:06 UTC
The warning is disappeared but at runtime, even if I'm able to start X, I get the following errors:

[fglrx:__create_mapping] *ERROR* Can not get virtual address
[fglrx:__mc_heap_map_virtual_space] *ERROR* Failed to map the virtual space                                          
[fglrx:mc_heap_map_virtual_space] *ERROR* Can not get virtual address                                                
[fglrx:MCIL_GetVirtualAddressInDescriptor] *ERROR* Can not get the virtual address
Comment 6 Enrico Tagliavini 2012-06-20 17:19:23 UTC
Created attachment 315871 [details, diff]
New patch to fix do_mmap removal

Mhm, carefully reading the code is worth sometimes. It seems the >> PAGE_SHIFT is already done internally. I wonder if this can solve the issue. But I'm worried it will not since there is also some call to up_read and down_read and I have no idea what those call do. It seems so hard to find kernel documentation without reading half of the kernel source code....

Anyway, Fabio please test this, and thank you very much again.
Comment 7 Enrico Tagliavini 2012-06-20 17:28:26 UTC
Created attachment 315873 [details, diff]
New patch to fix do_mmap removal

Of course I missed one change..... I'm so tired... Please ignore the previous one, try this one and forgive me
Comment 8 Fabio Rossi 2012-06-22 07:28:00 UTC
The last patch seems fine, no more errors at runtime. Thanks!
Comment 9 Enrico Tagliavini 2012-06-23 14:59:26 UTC
Thank you very much for the test! This I just uploaded the patch to the X11 overlay.

Cheers
Comment 10 Lukas Elsner 2012-07-09 17:11:51 UTC
i applied this patch against 12.6 amd-driver. using git-sources-3.5-rc6. seems to be working fine.

you can test this with luman overlay. maybe we can add this patch to official ati-drivers ebuild?
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-07-21 21:45:59 UTC
Fixed in CVS.