# iscsitarget with kernel 2.6.37

## tnt

is there any patch for portage sys-block/iscsitarget-1.4.20.2 package that allows emerging with 2.6.37 kernel?

----------

## richard.scott

what error do you get?

----------

## tnt

```
  CC [M]  /var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/tio.o                                                                                                                                             

  CC [M]  /var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/iscsi.o                                                                                                                                           

  CC [M]  /var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/nthread.o                                                                                                                                         

  CC [M]  /var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/wthread.o                                                                                                                                         

  CC [M]  /var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.o                                                                                                                                          

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c:12: warning: type defaults to 'int' in declaration of 'DECLARE_MUTEX'                                                                              

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c:12: warning: parameter names (without types) in function declaration                                                                               

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c: In function 'ioctl':                                                                                                                              

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c:261: error: 'ioctl_sem' undeclared (first use in this function)                                                                                    

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c:261: error: (Each undeclared identifier is reported only once                                                                                      

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c:261: error: for each function it appears in.)                                                                                                      

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c: In function 'release':                                                                                                                            

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.c:350: error: 'ioctl_sem' undeclared (first use in this function)                                                                                    

make[2]: *** [/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/config.o] Error 1                                                                                                                             

make[2]: *** Waiting for unfinished jobs....

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/wthread.c: In function 'worker_thread':

/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/wthread.c:75: error: implicit declaration of function 'copy_io_context'

make[2]: *** [/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel/wthread.o] Error 1

make[1]: *** [_module_/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2/kernel] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.37-gentoo'

make: *** [kernel] Error 2

emake failed

 * ERROR: sys-block/iscsitarget-1.4.20.2 failed:

 *   (no error message)

 * 

 * Call stack:

 *     ebuild.sh, line  56:  Called src_compile

 *   environment, line 3861:  Called die

 * The specific snippet of code:

 *       emake KSRC="${KERNEL_DIR}" kernel || die

 * 

 * If you need support, post the output of 'emerge --info =sys-block/iscsitarget-1.4.20.2',

 * the complete build log and the output of 'emerge -pqv =sys-block/iscsitarget-1.4.20.2'.

 * The complete build log is located at '/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/temp/environment'.

 * S: '/var/tmp/portage/sys-block/iscsitarget-1.4.20.2/work/iscsitarget-1.4.20.2'

```

guess it will be fixed in 1.5 branch of iscsitarget

http://www.google.com/search?q=iscsitarget+2.6.37&ie=utf-8&oe=utf-8&aq=t&rls=org.gentoo:en-US:unofficial&client=firefox-a

but, it seems that some patches could be found for 1.4.20, too.

unfortunately, these patches fail to apply to gentoo package 1.4.20.2

----------

## tnt

http://sourceforge.net/mailarchive/message.php?msg_id=27037274

----------

## cwall64

There is a development ebuild (iscsitarget-9999.ebuild) in bugs.gentoo.org that works great.

----------

## Phylum

I've run into this issue as well but I'd like some confirmation on installing the updated package & patch on the bug list (https://bugs.gentoo.org/show_bug.cgi?id=365735).  After quite a bit of reading & trial and error, I ended up doing the following to get it installed/compiled using the following steps.

```
echo "PORTDIR_OVERLAY=\"/usr/portage/local\"" >> /etc/make.conf

mkdir -p /usr/portage/local/sys-block/iscsitarget/files

wget https://bugs.gentoo.org/attachment.cgi?id=272021 -O /usr/portage/local/sys-block/iscsitarget/iscsitarget-9999.ebuild

wget https://bugs.gentoo.org/attachment.cgi?id=272023 -O /usr/portage/local/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags.patch

cp /usr/portage/sys-block/iscsitarget/files/ietd-* /usr/portage/local/sys-block/iscsitarget/files/

ebuild /usr/portage/local/sys-block/iscsitarget/iscsitarget-9999.ebuild manifest

emerge /usr/portage/local/sys-block/iscsitarget/iscsitarget-9999.ebuild
```

Can someone confirm whether or not this is the proper procedure or if I missed something or added something unnecessarily?

Many thanks!

----------

## cwall64

Sorry, I had lots of issues with the 9999 build, so I just went back to kernel version 2.6.36 and ran the fully tested version...

----------

## Phylum

Thanks for taking the time for comming back.

So far its running 'fine' (I suppose...?) but could you share some of the issues you ran into this way I'll know if I need to roll back as well?

Thanks again.

----------

## cwall64

I started to get a lot of tainted kernel module messages in dmesg output and general screen dumps.  Typically followed by loss of iSCSI LUNs on my VMware vSphere infrastructure.

----------

