iscsitarget will not compile

Bug #208281 reported by cyberpunk71
12
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Fix Released
Undecided
Unassigned
linux-ubuntu-modules-2.6.24 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: iscsitarget

I have installed the Ubuntu 8.04 and updated all files. I installed the iscsitarget-source and when I try to compile I get an error ....

CC [M] /usr/src/modules/iscsitarget/kernel/digest.o
/usr/src/modules/iscsitarget/kernel/digest.c: In function ‘digest_header’:
/usr/src/modules/iscsitarget/kernel/digest.c:176: error: expected ‘;’ before ‘)’ token
/usr/src/modules/iscsitarget/kernel/digest.c:176: error: expected statement before ‘)’ token
/usr/src/modules/iscsitarget/kernel/digest.c:178: error: expected ‘;’ before ‘)’ token
/usr/src/modules/iscsitarget/kernel/digest.c:178: error: expected statement before ‘)’ token
make[3]: *** [/usr/src/modules/iscsitarget/kernel/digest.o] Error 1

Revision history for this message
Wido den Hollander (wido) wrote :

I can confirm the same bug.

root@storage1:~# uname -a
Linux storage1 2.6.24-14-server #1 SMP Wed Apr 2 04:16:40 UTC 2008 i686 GNU/Linux
root@storage1:~#

My system is up to date (apt-get update && apt-get upgrade)

I found that the bug also exists in Debian, see: http://groups.google.com/group/linux.debian.bugs.rc/browse_thread/thread/7abd26b18e75d7a1/3eec332d63e0100d?lnk=gst&q=iscsitarget#3eec332d63e0100d

The version shipped by Ubuntu: 0.4.15-5ubuntu2

Changed in iscsitarget:
status: New → Confirmed
Revision history for this message
Wido den Hollander (wido) wrote :

I got it working under Hardy by downloading the newest source from the IET website.

I extracted iscsitarget.tar.bz2 in /usr/src and replaced the "kernel" and "include" directory with the directories in the latest version from the IET website.

This is how i did it:

apt-get install iscsitarget-source
cd /usr/src
wget http://dfn.dl.sourceforge.net/sourceforge/iscsitarget/iscsitarget-0.4.16.tar.gz
tar -xzf iscsitarget-0.4.16.tar.gz
tar -xjf iscsitarget.tar.bz2
cd modules/iscsitarget/
rm -r include/ kernel/
cp -a /usr/src/iscsitarget-0.4.16/kernel .
cp -a /usr/src/iscsitarget-0.4.16/include .
cd /usr/src
tar -cjf iscsitarget.tar.bz2 modules
m-a a-i iscsitarget

I know this is not THE best way, since i download a new version of IET, but it fixes it for me.

FYI, i am running the Ubuntu Hardy Beta1

Revision history for this message
Wido den Hollander (wido) wrote :

Ok, this works, but the files /proc/net/iet are not created!

The iSCSI servers runs and you can discover it and log on to it and use it, but the files in /proc are not created.

I even tried the source code from Debian, it compiles, but the files in /proc are created either.

Revision history for this message
Wido den Hollander (wido) wrote :

Ok, i figured it out!

In the package "linux-ubuntu-modules-2.6.24-14-server" the iscsi_trgt.ko module is also shipped, but this one is broken.

When you remove the directory "/lib/modules/2.6.24-14-server/ubuntu/block/iscsitarget" en run "depmod -ae" you can compile the iscsi_trgt.ko module like i described above.

This will place the module in "/lib/modules/2.6.24-14-server/kernel/drivers/iscsi" after wich you can start the IET software.

Now the files "/proc/net/iet/volume" and "/proc/net/iet/session" will be created and the IET server will run as expected.

But i am wondering:
- Why is the iscsi_trgt.ko module shipped in linux-ubuntu-modules-2.6.24-14-server and also available to be compiled from source?
- For DRBD you can only install the utils, but the kernel module is already pre-compiled by Ubuntu.

Why is this done this way, a matter of miscommunication?

Revision history for this message
Chuck Short (zulcss) wrote :

Hi,

Can you try from https://edge.launchpad.net/~zulcss/+archive,

You will need to put the following in your /etc/apt/sources.list

deb http://ppa.launchpad.net/zulcss/ubuntu hardy main
deb-src http://ppa.launchpad.net/zulcss/ubuntu hardy main

And then sudo apt-get update.

Thanks
chuck

Changed in iscsitarget:
status: Confirmed → Incomplete
Revision history for this message
Wido den Hollander (wido) wrote :

Hi chuck,

That works, the targets builds correctly...

But i was wondering, why is the iscsi_trgt module also supplied in linux-ubuntu-modules? The module supplied by this package is loaded instead of the module build by iscsitarget-source, wich leaves you with a non-working iSCSI Target.

Shouldn't this be corrected?

Revision history for this message
Chuck Short (zulcss) wrote :

Ill look into it

Revision history for this message
Scott Kitterman (kitterman) wrote :

Ack from me, just make it work zul.

Changed in iscsitarget:
status: Incomplete → New
Revision history for this message
Stefan Bader (smb) wrote :

Applied Chuck's patch to iscsitarget

Changed in linux:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Wido den Hollander (wido) wrote :

Ok, but to be sure. When hardy comes out, do you need to compile the target software (kernel module) or can you use the module shipped with the kernel?

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

This bug was fixed in the package linux-ubuntu-modules-2.6.24 - 2.6.24-16.21

---------------
linux-ubuntu-modules-2.6.24 (2.6.24-16.21) hardy; urgency=low

  [Stefan Bader]

  * Fix potential lockups in ALSA snd_usb_caiaq

  [Chuck Short]

  * Update iscsitarget drive
    - LP: #208281

  [Tim Gardner]

  * Fix cx88 NULL pointer dereference

  [Steve Langasek]

  * Don't call update-initramfs on postrm purge, this is redundant and can
    cause maintainer script failures if the linux-image package has already
    been removed.
    - LP: #149836

 -- Tim Gardner <email address hidden> Tue, 08 Apr 2008 12:21:01 -0600

Changed in linux-ubuntu-modules-2.6.24:
status: Fix Committed → Fix Released
Revision history for this message
Wido den Hollander (wido) wrote :

Ok, just to be sure:

Compiling the module manually is not needed anymore when using the server edition?

Revision history for this message
The Big D (flannell) wrote :
Revision history for this message
Wido den Hollander (wido) wrote :

Hi Dan,

Please read the complete bug report. A fix has been commited and will be available soon.

Also, see: https://bugs.launchpad.net/ubuntu/+source/iscsitarget/+bug/208281/comments/5

Revision history for this message
Martin Kiklhorn (kiklhorn) wrote :

Hi,
I get the same error as on topic.

linux-ubuntu-modules-2.6.24-19-server is already the newest version.

make[2]: Entering directory `/usr/src/linux-headers-2.6.24-19-server'
  CC [M] /usr/src/modules/iscsitarget/kernel/digest.o
/usr/src/modules/iscsitarget/kernel/digest.c: In function ‘digest_header’:
/usr/src/modules/iscsitarget/kernel/digest.c:176: error: expected ‘;’ before ‘)’ token
/usr/src/modules/iscsitarget/kernel/digest.c:176: error: expected statement before ‘)’ token
/usr/src/modules/iscsitarget/kernel/digest.c:178: error: expected ‘;’ before ‘)’ token
/usr/src/modules/iscsitarget/kernel/digest.c:178: error: expected statement before ‘)’ token
make[3]: *** [/usr/src/modules/iscsitarget/kernel/digest.o] Error 1

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

Other bug subscribers

Remote bug watches

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