Bug 146 - Kernel module will not build on OpenSuSe 11.4 with kernel 2.6.39
Summary: Kernel module will not build on OpenSuSe 11.4 with kernel 2.6.39
Status: CLOSED WONTFIX
Alias: None
Product: AMD Catalyst™Proprietary Display Driver
Classification: Unclassified
Component: Kernel Module (show other bugs)
Version: .archived
Hardware: Radeon HD 5000 Series Linux
: low major
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2011-05-27 10:05 CDT by Mark
Modified: 2011-11-24 13:16 CST (History)
2 users (show)



Attachments
ATI Config Report (325.99 KB, text/plain)
2011-05-27 10:07 CDT, Mark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2011-05-27 10:05:27 CDT
Description of problem:
When I try to build the kernel module the compile fails because smp_lock.h and smplock.h are no longer required for kernel 2.6.39 but the ATI code still looks for the now redundant modules

Steps to reproduce:
1. Download 11-5 catalyst package 
2. Build distribution specific package for OpenSuSe 11.4
3. Try to zypper in rpm built by installer package

Actual result: 
tiger:/home/mark/Downloads # zypper in fglrx64_xpic_SUSE114-8.85-1.x86_64.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  fglrx64_xpic_SUSE114 patch 

2 new packages to install.
Overall download size: 34.0 MiB. After the operation, additional 140.7 MiB will be used.
Continue? [y/n/?] (y): y
Retrieving package patch-2.6.1.81-5.1.x86_64 (1/2), 79.0 KiB (151.0 KiB unpacked)
Retrieving: patch-2.6.1.81-5.1.x86_64.rpm [done]
Retrieving package fglrx64_xpic_SUSE114-8.85-1.x86_64 (2/2), 33.9 MiB (140.5 MiB unpacked)
Installing: patch-2.6.1.81-5.1 [done]
Retrieving package fglrx64_xpic_SUSE114-8.85-1.x86_64 (1/2), 33.9 MiB (140.5 MiB unpacked)
Installing: fglrx64_xpic_SUSE114-8.85-1 [done]
Additional rpm output:
Updating /etc/sysconfig/fglrxconfig...
/usr/src/kernel-modules/fglrx /
Apply some patches ...
ati-CONFIG_SMP.patch applied successfully.
ati-2.6.27-build-fix-1.patch applied successfully.
ati-2.6.36-compat_alloc_user_space.patch applied successfully.
/

Used CPUs/Cores for compilation  =>  [ 4 ]


********************************************************************************
*                                                                              *
*   Kernel:    2.6.39-30-default                                               *
*   Source:    /lib/modules/2.6.39-30-default/build                            *
*   Include:   /lib/modules/2.6.39-30-default/source/include                   *
*                                                                              *
********************************************************************************



file /lib/modules/2.6.39-30-default/source/include/../arch/x86/include/asm/compat.h says:COMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space
/usr/src/kernel-modules/fglrx/2.6.x /
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make: Entering directory `/usr/src/linux-2.6.39-30-obj/x86_64/default'
/usr/bin/make -C ../../../linux-2.6.39-30 O=/usr/src/linux-2.6.39-30-obj/x86_64/default/. 
  LD      /usr/src/kernel-modules/fglrx/2.6.x/built-in.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/firegl_public.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_acpi.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_agp.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_debug.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_ioctl.o
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:117:28: fatal error: linux/smp_lock.h: No such file or directory
compilation terminated.
make[3]: *** [/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [_module_/usr/src/kernel-modules/fglrx/2.6.x] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-2.6.39-30-obj/x86_64/default'

******************************
Build of kernel module failed!
******************************

rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
/
Calling 'depmod -a 2.6.39-30-default' this may take a while...



********************************************************************************
*                                                                              *
*   Kernel:    2.6.39-30-desktop                                               *
*   Source:    /lib/modules/2.6.39-30-desktop/build                            *
*   Include:   /lib/modules/2.6.39-30-desktop/source/include                   *
*                                                                              *
********************************************************************************



file /lib/modules/2.6.39-30-desktop/source/include/../arch/x86/include/asm/compat.h says:COMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space
/usr/src/kernel-modules/fglrx/2.6.x /
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make: Entering directory `/usr/src/linux-2.6.39-30-obj/x86_64/desktop'
/usr/bin/make -C ../../../linux-2.6.39-30 O=/usr/src/linux-2.6.39-30-obj/x86_64/desktop/. 
  LD      /usr/src/kernel-modules/fglrx/2.6.x/built-in.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/firegl_public.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_acpi.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_agp.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_debug.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_ioctl.o
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:117:28: fatal error: linux/smp_lock.h: No such file or directory
compilation terminated.
make[3]: *** [/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [_module_/usr/src/kernel-modules/fglrx/2.6.x] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-2.6.39-30-obj/x86_64/desktop'

******************************
Build of kernel module failed!
******************************

rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
/
Calling 'depmod -a 2.6.39-30-desktop' this may take a while...


Summary report:
================================================================================

   Kernel     => 2.6.39-30-default
   Detected   => RPM package
   Build      => [ FAILURE ]
   Install    => [ FAILURE ]

   Kernel     => 2.6.39-30-desktop
   Detected   => RPM package
   Build      => [ FAILURE ]
   Install    => [ FAILURE ]

**************************************************************
Building/installation of fglrx kernel module failed! Try again
by calling "/usr/bin/fglrx-kernel-build.sh" manually.
**************************************************************


*************************************************************
Please read "/usr/share/doc/packages/fglrx/README.SuSE" for
configuration details when using SaX2.
*************************************************************

Check: Found fglrx section.
Create symlink to fglrx-libglx.so
Create symlink to fglrx-libGL.so.1.2


tiger:/home/mark/Downloads # 



Expected result:
Kernel module should build and driver should install.
Comment 1 Mark 2011-05-27 10:07:23 CDT
Created attachment 133 [details]
ATI Config Report
Comment 2 nandinga 2011-06-30 07:15:41 CDT
Similar (same?) problem here:

Trying to get the drivers to work on AVLinux. SGFXI script failed so I tried manually.

The kernel is 2.6.39 32bit and the driver is 11-6 (x86_64, but it should work also in 32bit with 32bit libs right?)

lspci gives:
===============================================================================
01:00.0 VGA compatible controller: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series]
===============================================================================

fglrx-install.log says:
===============================================================================
Uninstalling any previously installed drivers.

Creating symlink /var/lib/dkms/fglrx/8.861/source ->
                 /usr/src/fglrx-8.861

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
cd /var/lib/dkms/fglrx/8.861/build; sh make.sh --nohints --uname_r=2.6.39.1.avl.1 --norootcheck....(bad exit status: 1)
0
0
[Error] Kernel Module : Failed to build fglrx-8.861 with DKMS
[Error] Kernel Module : Removing fglrx-8.861 from DKMS

------------------------------
Deleting module version: 8.861
completely from the DKMS tree.
------------------------------
Done.
[Reboot] Kernel Module : update-initramfs
===============================================================================

So I ran
sh make.sh --nohints --uname_r=2.6.39.1.avl.1 --norootcheck
myself to see what was happening, and got:
===============================================================================
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/2.6.39.1.avl.1/build SUBDIRS=/usr/src/sgfxi-downloads/fglrx-install-11-6/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.39.1.avl.1'
  CC [M]  /usr/src/sgfxi-downloads/fglrx-install-11-6/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/usr/src/sgfxi-downloads/fglrx-install-11-6/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:117:28: fatal error: linux/smp_lock.h: No such file or directory
compilation terminated.
make[2]: *** [/usr/src/sgfxi-downloads/fglrx-install-11-6/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/usr/src/sgfxi-downloads/fglrx-install-11-6/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.39.1.avl.1'
make: *** [kmod_build] Error 2
build failed with return value 2
===============================================================================

Trulan (AVLinux kernel dev) found this post for me
http://www.mindwerks.net/2011/04/ubuntu-11-04-natty-with-fglrx-and-2-6-39/
where they patch the driver, if I don't understand wrongly,simply removing any references to the big kernel lock, but tried building again and got:
===============================================================================
=====================================================================
 ATI Technologies Catalyst(TM) Proprietary Driver Installer/Packager 
=====================================================================
Generating package: Debian/sid
cp: cannot stat `/root/Downloads/ati/x710/*': No such file or directory
Package build failed!
Package build utility output:
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): 

...

dh_installman: Compatibility levels before 5 are deprecated.
# amd64 needs some library redirection
dh_install -pfglrx-driver "usr/X11R6/lib/*.so*"           "usr/lib"
dh_install: Compatibility levels before 5 are deprecated.
dh_install -pfglrx-driver "usr/X11R6/lib/modules/dri"     "usr/lib"
dh_install: Compatibility levels before 5 are deprecated.
dh_install -pfglrx-driver "usr/X11R6/lib/modules/linux"   "usr/lib/xorg/modules"
dh_install: Compatibility levels before 5 are deprecated.
cp: cannot stat `./usr/X11R6/lib/modules/linux': No such file or directory
dh_install: cp -a ./usr/X11R6/lib/modules/linux debian/fglrx-driver/usr/lib/xorg/modules/ returned exit code 1
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2
===============================================================================

That's where we got stuck.
Comment 3 nandinga 2011-06-30 07:21:59 CDT
My story in full:
http://www.remastersys.com/forums/index.php?topic=1511.15

Another similar story:
http://techpatterns.com/forums/about1864.html

Thanks in advance!
Comment 4 nandinga 2011-06-30 07:23:54 CDT
Ah sorry I've mixed my story with driver 11-6 with this (11-5). But well, I think it's probably the same issue. Had the same problem using 11-4.
Comment 5 cdesewell 2011-07-25 09:09:50 CDT
Hello I am also experiancing the same problem you need to make the kernel module compileable without/independant from BigLock (smplock.h) as it is no longer included in kernel 2.6.39. This change has affected several other propiatery drivers I hope you can fix this soon before my graphics card overheats.

Thankyou
Comment 6 Michael Cronenworth 2011-11-17 18:37:08 CST
This message is a reminder that your bug is marked as Catalyst 11.5.

The current Catalyst version is 11.11.

Approximately 7 days from now the Bugzilla administrator will be removing the
11.5 version. At that time your bug will be CLOSED as WONTFIX.

Bug Reporter: Thank you for reporting this issue. However, the Bugzilla
administrator provides this as a unofficial, free service to AMD customers, and
I like to keep my systems neat and tidy. If you would like to keep your bug
from being closed, please try a new Catalyst version and update the 'version'
field if the issue still occurs.

If you are unable to update the version, please make a comment and someone will
change it for you.
Comment 7 Michael Cronenworth 2011-11-24 13:15:03 CST
This bug is being closed due to the 'version' being 11.5 after 7 days of the
previous closure notice.

Thank you for your bug report.