Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281673 - <sys-block/iscsitarget-1.4.19: kernel modules build fails in some cases
Summary: <sys-block/iscsitarget-1.4.19: kernel modules build fails in some cases
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-16 13:14 UTC by Vitaly V. Bursov
Modified: 2010-10-11 02:33 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly V. Bursov 2009-08-16 13:14:53 UTC
If the current running kernel version differs from what sys-block/iscsitarget is built against build fails.

Reproducible: Always

Steps to Reproduce:
# running kernel version is different from /usr/src/linux (or $KERNEL_DIR)
$ uname -r
2.6.18-028stab062-2
$ stat /usr/src/linux
  File: `/usr/src/linux' -> `linux-2.6.18-openvz-028.064.4'

# emerge sys-block/iscsitarget

Actual Results:  
build fails with:
>>> Compiling source in /var/tmp/portage/sys-block/iscsitarget-0.4.17/work/iscsitarget-0.4.17 ...
make -j3 usr 
Applying Patch compat-2.6.22-2.6.23.patch
patching file kernel/block-io.c
Hunk #1 succeeded at 36 (offset 7 lines).
Hunk #2 succeeded at 55 (offset 7 lines).
patching file kernel/config.c
Hunk #1 succeeded at 41 with fuzz 1 (offset 1 line).
patching file kernel/digest.c
patching file kernel/event.c
Applying Patch compat-2.6.19-2.6.21.patch
patching file kernel/event.c
patching file kernel/iscsi.c
patching file kernel/tio.c
Applying Patch compat-2.6.14-2.6.18.patch
patching file kernel/iscsi.h
patching file kernel/digest.c
patching file kernel/file-io.c
patching file kernel/iscsi.c
patching file kernel/tio.c
make -C usr
make[1]: Entering directory `/var/tmp/portage/sys-block/iscsitarget-0.4.17/work/iscsitarget-0.4.17/usr'
...
make[1]: Leaving directory `/var/tmp/portage/sys-block/iscsitarget-0.4.17/work/iscsitarget-0.4.17/usr'
...
make -j3 KSRC=/usr/src/linux kernel 
make[1]: Entering directory `/var/tmp/portage/sys-block/iscsitarget-0.4.17/work/iscsitarget-0.4.17'
Reversing patch compat-2.6.14-2.6.18.patch
patching file kernel/iscsi.h
patching file kernel/digest.c
patching file kernel/file-io.c
patching file kernel/iscsi.c
patching file kernel/tio.c
Reversing patch compat-2.6.19-2.6.21.patch
patching file kernel/event.c
patching file kernel/iscsi.c
patching file kernel/tio.c
Reversing patch compat-2.6.22-2.6.23.patch
patching file kernel/block-io.c
Hunk #1 succeeded at 36 (offset 7 lines).
Hunk #2 succeeded at 50 (offset 7 lines).
patching file kernel/config.c
Hunk #1 succeeded at 41 with fuzz 1 (offset 1 line).
patching file kernel/digest.c
patching file kernel/event.c
...
make/gcc errors, etc

Expected Results:  
successful build

Fixed with:

 src_compile() {
-        emake usr || die "failed to build userspace"
+        emake KSRC="${KERNEL_DIR}" usr || die "failed to build userspace"
Comment 1 Stefan Behte (RETIRED) gentoo-dev Security 2010-10-11 02:33:19 UTC
Patch in 1.4.19.