[Pkg-iscsi-maintainers] Bug#659560: iscsitarget-dkms fails to build with Linux 3.2.0 kernel

Leo Testard leo.testard at gmail.com
Sun Feb 12 02:43:23 UTC 2012


Package: iscsitarget-dkms
Version: 1.4.20.2-7
Severity: important
Tags: patch

After upgrading a Debian installation to Wheezy, I noticed iSCSI kernel module failed to build with the new kernel headers.
It produces the following output :

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.2.0-1-686-pae -C /lib/modules/3.2.0-1-686-pae/build M=/var/lib/dkms/iscsitarget/1.4.20.2/build........(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.2.0-1-686-pae (i686)
Consult /var/lib/dkms/iscsitarget/1.4.20.2/build/make.log for more information.

tail /var/lib/dkms/iscsitarget/1.4.20.2/build/make.log gives the following : 

  CC [M]  /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/nthread.o
  CC [M]  /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/wthread.o
  CC [M]  /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/config.o
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/config.c:358:12: error: ‘THIS_MODULE’ undeclared here (not in a function)
make[4]: *** [/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/config.o] Erreur 1
make[3]: *** [/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel] Erreur 2
make[2]: *** [_module_/var/lib/dkms/iscsitarget/1.4.20.2/build] Erreur 2
make[1]: *** [sub-make] Erreur 2
make: *** [all] Erreur 2
make: quittant le répertoire « /usr/src/linux-headers-3.2.0-1-686-pae »

After Googling, I figured out it was due to missing <linux/export.h> and <linux/modules.h> includes in few files.
The following patch fixes it :



-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages iscsitarget-dkms depends on:
ii  dkms  2.2.0.3-1
ii  make  3.81-8.1

Versions of packages iscsitarget-dkms recommends:
ii  linux-headers-3.2.0-1-686-pae [linux-headers]  3.2.4-1

iscsitarget-dkms suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iscsitarget-dkms-3.2.0-1.patch
Type: text/x-diff
Size: 2717 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20120212/ddaa5a2c/attachment.patch>


More information about the Pkg-iscsi-maintainers mailing list