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
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.
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
You are right it will not, not even with older kernels. I will try something else
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.
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
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.
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
The last patch seems fine, no more errors at runtime. Thanks!
Thank you very much for the test! This I just uploaded the patch to the X11 overlay. Cheers
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?
Fixed in CVS.