Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191313 - sys-block/iscsitarget-0.4.15 fails to compile on kernel 2.6.22+
Summary: sys-block/iscsitarget-0.4.15 fails to compile on kernel 2.6.22+
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 205701 211115 212468 (view as bug list)
Depends on:
Blocks: kernel-2.6.22
  Show dependency tree
 
Reported: 2007-09-04 23:14 UTC by Benjamin Tauer
Modified: 2008-03-06 09:42 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
iscsitarget-0.4.15-2.6.22.patch (iscsitarget-0.4.15-2.6.22.patch,392 bytes, patch)
2007-10-23 14:51 UTC, Natanael Copa
Details | Diff
patch for kernel 2.6.23 (iscsitarget-0.4.15-kernel.2.6.23.patch,1.29 KB, patch)
2007-12-04 20:56 UTC, Frido Ferdinand
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Tauer 2007-09-04 23:14:21 UTC
Emerge fails to compile sys-block/iscsitarget 0.4.15 on kernel 2.6.22.  I recently emerged it on a system with kernel 2.6.20-gentoo-r8 and had no problems.  This is a fresh install from 2007.0 minimal install with the latest stage3 and portage as of several days ago.  I've also tried to emerge --sync and it still fails. 

Reproducible: Always

Steps to Reproduce:
1. emerge sys-block/iscsitarget
2.
3.

Actual Results:  
  CC [M] /var/tmp/portage/sys-block/iscsitarget-0.4.15/work/iscsitarget-0.4.15/kernel/event.o/var/tmp/portage/sys-block/iscsitarget-0.4.15/work/iscsitarget-0.4.15/kernel/event.c: In function 'event_init':
/var/tmp/portage/sys-block/iscsitarget-0.4.15/work/iscsitarget-0.4.15/kernel/event.c:98: warning: passing argument 4 of 'netlink_kernel_create' from incompatible pointer type
/var/tmp/portage/sys-block/iscsitarget-0.4.15/work/iscsitarget-0.4.15/kernel/event.c:98: error: too few arguments to function 'netlink_kernel_create'
make[2]: *** [/var/tmp/portage/sys-block/iscsitarget-0.4.15/work/iscsitarget-0.4.15/kernel/event.o] Error 1
make[1]: *** [_module_/var/tmp/portage/sys-block/iscsitarget-0.4.15/work/iscsitarget-0.4.15/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r5'
make: *** [kernel] Error 2

!!! ERROR: sys-block/iscsitarget-0.4.15 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_compile
  ebuild.sh, line 985:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  iscsitarget-0.4.15.ebuild, line 36:   Called die

!!! failed to build module

Expected Results:  
Successful emerge...
Comment 1 Benjamin Tauer 2007-09-04 23:19:11 UTC
Portage 2.1.2.12 (default-linux/x86/2007.0, gcc-4.1.1, glibc-2.5-r0, 2.6.22-gentoo-r5 i686)
=================================================================
System uname: 2.6.22-gentoo-r5 i686 AMD Sempron(tm)   2500+
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 04 Sep 2007 22:00:01 +0000
app-shells/bash:     3.1_p17
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61
sys-devel/automake:  1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Stefan Behte (RETIRED) gentoo-dev Security 2007-10-13 11:19:36 UTC
It's an upstream bug in kernel/event.c 

after "int event_init(void)"
it says:
nl = netlink_kernel_create(NETLINK_IET, 1, event_recv, THIS_MODULE);

there is one argument missung, the following compiles fine:
nl = netlink_kernel_create(NETLINK_IET, 1, event_recv, NULL, THIS_MODULE);

That's because of a patch:
http://www.linuxhq.com/kernel/v2.6/22/net/netlink/af_netlink.c

I've already contacted the developers via iscsitarget-devel@lists.sourceforge.net

We'll see what happens next.
Comment 3 Natanael Copa 2007-10-23 14:33:55 UTC
Seems like this is fixed in upstream svn trunk:
https://lists.berlios.de/pipermail/iscsitarget-svn/2007-July/000037.html

we need a backport for iscsitarget-0.4.15.
Comment 4 Natanael Copa 2007-10-23 14:51:05 UTC
Created attachment 134176 [details, diff]
iscsitarget-0.4.15-2.6.22.patch

should be applied if kernel >= 2.6.22
Comment 5 Stefan de Konink 2007-10-26 14:03:00 UTC
2.6.23 has other problems. I suggest to make a -svn version.
Comment 6 Frido Ferdinand 2007-12-04 20:56:39 UTC
Created attachment 137741 [details, diff]
patch for kernel 2.6.23
Comment 7 Natanael Copa 2008-01-04 08:28:03 UTC
(In reply to comment #6)
> Created an attachment (id=137741) [edit]
> patch for kernel 2.6.23
> 

No, use KMEM_CACHE() instead or it will break on 2.6.22 kernels. (just tested)
https://lists.berlios.de/pipermail/iscsitarget-svn/2007-September/000050.html
Comment 8 Erik Logtenberg 2008-01-13 16:14:20 UTC
iscsitarget-0.4.15-r1 failed to build for me against a 2.6.22-gentoo-r9 kernel.

I applied the fix that I found here:

http://www.codewarrior.nl/index.php?type=entry&mainlogid=604

Now it compiles fine.

This seems to apply to the same line of code in kernel.c, but the change is a bit different. No idea which one is better though, I just thought: maybe this is of any use to you -- if not, please ignore :)
Comment 9 Stefan Behte (RETIRED) gentoo-dev Security 2008-02-02 14:33:18 UTC
Can't we get this into portage? :(
Comment 10 Erik Logtenberg 2008-02-11 18:36:34 UTC
Please note that the patch that I referred to on 2008-01-13 16:14:20 only works for 2.6.22. For 2.6.23 and above you do need the patch that Natanael Copa suggested:

https://lists.berlios.de/pipermail/iscsitarget-svn/2007-September/000050.html

This works fine, please put it into portage, because the current iscsi-target in portage simply won't compile on 2.6.22 or 2.6.23. so this package is effectively broken.
Comment 11 Stefan Behte (RETIRED) gentoo-dev Security 2008-02-21 19:52:31 UTC
Can someone please, please, please put the patch into portage? :(
Comment 12 SpanKY gentoo-dev 2008-02-22 03:34:10 UTC
*** Bug 205701 has been marked as a duplicate of this bug. ***
Comment 14 CGretski 2008-02-22 12:19:46 UTC
Shouldn't be "FIXED" until "A fix for this bug is checked into the tree and tested."
Suggest Resolved/Later
Comment 15 Natanael Copa 2008-02-22 12:28:13 UTC
it fails to compile on 2.6.22 and 2.6.24 due to undefined inet_net.

The scatter patch could be applied only when kernel is 2.6.24 or higher. (from comment it looks like its supposed to fix compilation for 2.6.24)

Comment 16 Jakub Moc (RETIRED) gentoo-dev 2008-02-22 14:58:51 UTC
*** Bug 211115 has been marked as a duplicate of this bug. ***
Comment 17 Natanael Copa 2008-02-22 15:52:43 UTC
(In reply to comment #15)
> it fails to compile on 2.6.22 and 2.6.24 due to undefined inet_net.

I ment 2.6.22 and 2.6.23 sorry.

Can this bug please be reopened?
Comment 18 SpanKY gentoo-dev 2008-02-22 21:46:01 UTC
CGretski: no, you're confusing the purpose of resolution with state

if you want to verify something, you change it from "RESOLVED" to "VERIFIED"/"CLOSED"

Natanael: sorry, but only latest kernel is supported.  upstream provided backwards compat via external patches, but their latest source does not support anything old either.
Comment 19 Stefan Behte (RETIRED) gentoo-dev Security 2008-02-23 01:18:30 UTC
Thanks!
Comment 20 CGretski 2008-02-24 10:30:13 UTC
Thanks SpanKY - It has successfully compiled/installed under 2.6.24-gentoo-r2 (~x86)
Comment 21 Stefan Behte (RETIRED) gentoo-dev Security 2008-03-05 22:11:16 UTC
Just for the archives: 
Kingtaco is in away status.
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2008-03-06 09:42:20 UTC
*** Bug 212468 has been marked as a duplicate of this bug. ***