kernel-desktop-3.5.1-2.1: fglrx-12.6-legacy not compiling

updated from kernel-desktop-3.4.8-1.1.x86_64 to kernel-desktop-3.5.1-2.1.x86_64

amd-driver-installer-12.6-legacy-x86.x86_64.run failed with the following output

Detected a previous installation, /usr/share/ati/amd-uninstall.sh
Dryrun uninstall succeeded continuing with installation.
Check if system has the tools required for installation.
Uninstalling any previously installed drivers.
Forcing uninstall of AMD Catalyst(TM) Proprietary Driver.
No integrity verification is done.
restore of system environment completed
Uninstall fglrx driver complete.
For detailed log of uninstall, please see /etc/ati/fglrx-uninstall.log
System must be rebooted to avoid system instability and potential data loss.
/usr/share/ati/amd-uninstall.sh completed with 0
[Message] Kernel Module : Trying to install a precompiled kernel module.
[Message] Kernel Module : Precompiled kernel module version mismatched.
[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.5.1-2-desktop/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-3.5.1-2-obj/x86_64/desktop'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_AllocLinearAddrInterval’:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2152:5: error: implicit declaration of function ‘do_mmap’ -Werror=implicit-function-declaration]
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2152:13: warning: cast to pointer from integer of different size -Wint-to-pointer-cast]
cc1: some warnings being treated as errors
make[4]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[3]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-3.5.1-2-obj/x86_64/desktop'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
[Reboot] Kernel Module : mkinitrd

going back to kernel-desktop-3.4.8-1.1.x86_64, no problem installing the fglrx driver

conclusion: something missing from kernel-desktop-3.5.1-2.1.x86_64

what can be done?

Mon Aug 13 20:49:50 CEST 2012
System: Host: linux-xwnl Kernel: 3.4.8-1-desktop x86_64 (64 bit)
Desktop KDE 4.9.00 Distro: openSUSE 12.2 (x86_64) VERSION = 12.2 CODENAME = Mantis
Machine: Mobo: ASRock model: A780GM-LE Bios: American Megatrends version: P1.10 date: 02/13/2009
CPU: Quad core AMD Phenom II X4 940 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4a svm)
Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 3000.00 MHz 4: 800.00 MHz
Graphics: Card: Advanced Micro Devices [AMD] nee ATI RS780 [Radeon HD 3200]
X.Org: 1.12.3 driver: fglrx Resolution: 1920x1080@60.0hz, 1680x1050@60.0hz
GLX Renderer: ATI Radeon HD 3200 Graphics GLX Version: 3.3.11653 - CPC

On 08/13/2012 02:06 PM, keellambert wrote:
>
> updated from kernel-desktop-3.4.8-1.1.x86_64 to
> kernel-desktop-3.5.1-2.1.x86_64
>
> amd-driver-installer-12.6-legacy-x86.x86_64.run failed with the
> following output
>
>
> Code:
> --------------------
> Detected a previous installation, /usr/share/ati/amd-uninstall.sh
> Dryrun uninstall succeeded continuing with installation.
> Check if system has the tools required for installation.
> Uninstalling any previously installed drivers.
> Forcing uninstall of AMD Catalyst™ Proprietary Driver.
> No integrity verification is done.
> restore of system environment completed
> Uninstall fglrx driver complete.
> For detailed log of uninstall, please see /etc/ati/fglrx-uninstall.log
> System must be rebooted to avoid system instability and potential data loss.
> /usr/share/ati/amd-uninstall.sh completed with 0
> [Message] Kernel Module : Trying to install a precompiled kernel module.
> [Message] Kernel Module : Precompiled kernel module version mismatched.
> [Message] Kernel Module : Found kernel module build environment, generating kernel module now.
> AMD kernel module generator version 2.1
> doing Makefile based build for kernel 2.6.x and higher
> rm -rf *.c *.h *.o *.ko .a .?? *.symvers
> make -C /lib/modules/3.5.1-2-desktop/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
> make[1]: Entering directory `/usr/src/linux-3.5.1-2-obj/x86_64/desktop’

CC [M] /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MEM_AllocLinearAddrInterval’:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2152:5: error: implicit declaration of function ‘do_mmap’ -Werror=implicit-function-declaration]
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2152:13: warning: cast to pointer from integer of different size -Wint-to-pointer-cast]
cc1: some warnings being treated as errors
make[4]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[3]: *** [module/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-3.5.1-2-obj/x86_64/desktop’
> make: *** [kmod_build] Error 2
> build failed with return value 2
> [Error] Kernel Module : Failed to compile kernel module - please consult readme.
> [Reboot] Kernel Module : mkinitrd
> --------------------
>
>
> going back to kernel-desktop-3.4.8-1.1.x86_64, no problem installing
> the fglrx driver
>
> conclusion: something missing from kernel-desktop-3.5.1-2.1.x86_64
>
> what can be done?

That kernel is fine.

Get AMD to update their driver for the new APIs in kernel 3.5. When such changes
are needed, the developer making them is responsible for all in-kernel drivers;
however, out-of-kernel maintainers are responsible for their own changes.

I use the Nvidia driver on one system, thus I do the appropriate fixes, and I
supply them to the community. You need to (1) find a similar individual that
does this for your driver, (2) learn kernel hacking, or (3) wait for the
official driver to be modified.

Indeed. However… It’s a legacy driver, so any updates to it from AMD are unlikely to happen. Right now the best best is to stay with the old kernel.

Hi GreatEmeral,

have exactley the same problem: fresh Kernel 3.5.1 and the newest ATI Driver 4 Linux.

Have a look here: that works for me: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/993427 (look for Holm Dressler)

Maybe it helps you. Good luck,

Holm

Updated today from Index of /mirror/amd-fglrx-legacy/openSUSE_12.2
with fglrx64_legacy_xpic_SUSE122-8.97.100.3-2.x86_64

No problems found between kernel 5.1 and amd-fglrx-legacy with Radeon HD 3200 gfxcard

=======================================================================================

fwiw

I tried the patch from [gentoo-x86] Contents of /x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch](http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch?view=markup)
(note: line numbers are off-set) and all appeared ok but compiled driver did not work.
Boot stopped with black screen before init 5 login.
Two things indicated the compile had gone wrong at end of process,

  1. no mkinitrd
  2. no update of directory /usr/share/ati/
linux-xwnl:/lib/modules/fglrx/build_mod # sh make.sh
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.5.1-2-desktop/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-3.5.1-2-obj/x86_64/desktop'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_io.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_str.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_iommu.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o
  LD [M]  /lib/modules/fglrx/build_mod/2.6.x/fglrx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o
  LD [M]  /lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
make[1]: Leaving directory `/usr/src/linux-3.5.1-2-obj/x86_64/desktop'
build succeeded with return value 0
duplicating results into driver repository...
done.
You must change your working directory to /lib/modules/fglrx
and then call ./make_install.sh in order to install the built module.
linux-xwnl:/lib/modules/fglrx/build_mod # date
Wed Aug 15 05:05:35 CEST 2012
linux-xwnl:/lib/modules/fglrx/build_mod #  cd..
linux-xwnl:/lib/modules/fglrx # sh make_install.sh 
- recreating module dependency list
- trying a sample load of the kernel modules
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
done.
linux-xwnl:/lib/modules/fglrx # ll

Wed Aug 15 11:26:16 CEST 2012
System: Host: linux-xwnl Kernel: 3.5.1-2-desktop x86_64 (64 bit)
Desktop KDE 4.9.00 Distro: openSUSE 12.2 (x86_64) VERSION = 12.2 CODENAME = Mantis
Machine: Mobo: ASRock model: A780GM-LE Bios: American Megatrends version: P1.10 date: 02/13/2009
CPU: Quad core AMD Phenom II X4 940 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4a svm)
Clock Speeds: 1: 3000.00 MHz 2: 800.00 MHz 3: 800.00 MHz 4: 3000.00 MHz
Graphics: Card: Advanced Micro Devices [AMD] nee ATI RS780 [Radeon HD 3200]
X.Org: 1.12.3 driver: fglrx Resolution: 1920x1080@60.0hz, 1680x1050@60.0hz
GLX Renderer: ATI Radeon HD 3200 Graphics GLX Version: 3.3.11653 - CPC

With updated from Index of /mirror/amd-fglrx-legacy/openSUSE_12.2
of fglrx64_legacy_xpic_SUSE122-8.97.100.3-2.x86_64

No problems found between kernel 3.5.2-1-desktop x86_64 (64 bit)
and amd-fglrx-legacy with Radeon HD 3200 or Radeon HD 4250 gfxcards

Note: fglrx driver updated automatically on change of kernel