iscsitarget-dkms fails to build on 12.04

Bug #905987 reported by Pieter De Wit
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

Distro upgraded from 11.10 to 12.04.

After countless issues with NFS4, I decided to switch to iSCSI (small home network, not a great deal of speed needed). Installing iscsitarget-dkms now fails with the following message:

# dkms autoinstall

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.2.0-5-generic -C /lib/modules/3.2.0-5-generic/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-5-generic (x86_64)
Consult /var/lib/dkms/iscsitarget/1.4.20.2/build/make.log for more information.

# cat /var/lib/dkms/iscsitarget/1.4.20.2/build/make.log
DKMS make.log for iscsitarget-1.4.20.2 for kernel 3.2.0-5-generic (x86_64)
Mon Dec 19 05:57:17 NZDT 2011
make: Entering directory `/usr/src/linux-headers-3.2.0-5-generic'
  LD /var/lib/dkms/iscsitarget/1.4.20.2/build/built-in.o
  LD /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/built-in.o
  CC [M] /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/tio.o
  CC [M] /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/iscsi.o
  CC [M] /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/nthread.o
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/nthread.c: In function âdo_recvâ:
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/nthread.c:145:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  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[2]: *** [/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/config.o] Error 1
make[1]: *** [/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel] Error 2
make: *** [_module_/var/lib/dkms/iscsitarget/1.4.20.2/build] Error 2
make: Leaving directory `/usr/src/linux-headers-3.2.0-5-generic'

# lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

# apt-cache policy iscsitarget-dkms
iscsitarget-dkms:
  Installed: 1.4.20.2-5ubuntu1
  Candidate: 1.4.20.2-5ubuntu1
  Version table:
 *** 1.4.20.2-5ubuntu1 0
        500 http://nz.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

Thanks !

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in iscsitarget (Ubuntu):
status: New → Confirmed
Revision history for this message
Kiall Mac Innes (kiall) wrote :

Looks like a few #include <linux/export.h> and #include <linux/module.h>'s are missing..

After adding export.h into every file complaining about THIS_MODULE, and module.h into the one file complaining about an implicit function declaration, the module builds successfully.

Revision history for this message
Kiall Mac Innes (kiall) wrote :

For those who have been emailing me asking for the fix, and anyone else who might need it..

These are the changes necessary - http://paste.ubuntu.com/836453/

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iscsitarget - 1.4.20.2-5ubuntu2

---------------
iscsitarget (1.4.20.2-5ubuntu2) precise; urgency=low

  * debian/patches/linux-3.2-includes.patch: Added additional includes of
    linux/export.h and a linux/module.h, resolving dkms build failures with
    > linux 3.2. Original patch courtesy of Kiall Mac Innes. (LP: #905987)
 -- Dave Walker (Daviey) <email address hidden> Fri, 10 Feb 2012 12:16:11 +0000

Changed in iscsitarget (Ubuntu Precise):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.