[Pkg-fglrx-devel] Bug#604881: fglrx-source: does not compile against custom kernel 2.6.36 on amd64

Michael Prokop mika at debian.org
Thu Nov 25 01:36:03 UTC 2010


Package: fglrx-source
Version: 1:10-11-1
Severity: normal


Compiling fglrx-source 1:10-11-1 against kernel 2.6.36 fails on
amd64 (but works on i386):

  % m-a -k /home/mika/kernel/linux-2.6.36 -k 2.6.36-grml64 build fglrx
  [...]
  make[2]: Entering directory `/home/mika/kernel/linux-2.6.36'
  grep: /lib/modules/2.6.36-grml64/build/Module.symvers: No such file or directory
    CC [M]  /usr/src/modules/fglrx/firegl_public.o
  /usr/src/modules/fglrx/firegl_public.c:417: warning: initialization from incompatible pointer type
    CC [M]  /usr/src/modules/fglrx/kcl_acpi.o
    CC [M]  /usr/src/modules/fglrx/kcl_agp.o
    CC [M]  /usr/src/modules/fglrx/kcl_debug.o
  /usr/src/modules/fglrx/kcl_debug.c:51: warning: ‘struct tty_struct’ declared inside parameter list
  /usr/src/modules/fglrx/kcl_debug.c:51: warning: its scope is only this definition or declaration, which is probably not what you want
  /usr/src/modules/fglrx/kcl_debug.c:60: warning: ‘struct tty_struct’ declared inside parameter list
  /usr/src/modules/fglrx/kcl_debug.c:67: warning: initialization from incompatible pointer type
  /usr/src/modules/fglrx/kcl_debug.c:74: warning: initialization from incompatible pointer type
    CC [M]  /usr/src/modules/fglrx/kcl_ioctl.o
  /usr/src/modules/fglrx/kcl_ioctl.c: In function ‘KCL_IOCTL_AllocUserSpace32’:
  /usr/src/modules/fglrx/kcl_ioctl.c:196: error: implicit declaration of function ‘compat_alloc_user_space’
  /usr/src/modules/fglrx/kcl_ioctl.c:196: warning: initialization makes pointer from integer without a cast
  make[3]: *** [/usr/src/modules/fglrx/kcl_ioctl.o] Error 1

Looking at 02-dkms-arch_compat.diff I see the source of the problem:

  +                -DCOMPAT_ALLOC_USER_SPACE=$(shell if grep -q compat_alloc_user_space /lib/modules/$(KERNELRELEASE)/build/Module.symvers ; then echo arch_compat_alloc_user_space ; else echo compat_alloc_user_space ; fi) \

This patch assumes that
/lib/modules/$(KERNELRELEASE)/build/Module.symvers exists, though
I'm explicitely requesting to build against a given kernel tree
and Module.symvers exists there
("/home/mika/kernel/linux-2.6.36/Module.symvers" in the above
mentioned example).

Instead of hardcoding /lib/modules/... I'd suggest using the
existing and supported $(KSRC) variable (see in
debian/module/rules).

Replacing the "/lib/modules/$(KERNELRELEASE)/build/Module.symvers"
with "$(KSRC)/Module.symvers" works for me.

regards,
-mika-





More information about the Pkg-fglrx-devel mailing list