Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145415 - hardended-sources fails to build with --dmraid option to genkernel
Summary: hardended-sources fails to build with --dmraid option to genkernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-28 15:20 UTC by Alan Hourihane
Modified: 2007-11-07 19:46 UTC (History)
2 users (show)

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 Alan Hourihane 2006-08-28 15:20:42 UTC
Building hardened-sources 2.6.16-hardened-r11 with the options....

--dmraid --slowusb --disklabel --no-clean all

to genkernel produces the following output and fails to build.

/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../libselinux.a(load_policy.o): In function `selinux_mkload_policy':
: undefined reference to `sepol_genbools_array'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../libselinux.a(load_policy.o): In function `selinux_mkload_policy':
: undefined reference to `sepol_genbools'
collect2: ld returned 1 exit status
make[2]: *** [dmsetup.static] Error 1
make[2]: Leaving directory `/var/tmp/genkernel/22546.18171.31666.1827/device-mapper.1.00.17/dmsetup'
make[1]: *** [dmsetup] Error 2
make[1]: Leaving directory `/var/tmp/genkernel/22546.18171.31666.1827/device-mapper.1.00.17'
* Gentoo Linux Genkernel; Version 3.4.0
* Running with options: --dmraid --slowusb --disklabel --no-clean all

* ERROR: Failed to compile the "" target...

* -- End log... --
Comment 1 Ian Stakenvicius 2006-09-01 23:48:50 UTC
..try emerging the latest dmraid ebuild (-rc12) with the selinux use flag.  It'll give you einfo on how to use it w/ genkernel..  Not sure if it'll help, but its worth a shot.
Comment 2 Alan Hourihane 2006-09-04 02:01:30 UTC
Unfortunately. The same problem occurs.
Comment 3 Alan Hourihane 2006-12-15 00:36:04 UTC
Still happens with genkernel 3.4.4 and hardened sources 2.6.18
Comment 4 Christian Heim (RETIRED) gentoo-dev 2007-04-10 14:46:12 UTC
(In reply to comment #3)
> Still happens with genkernel 3.4.4 and hardened sources 2.6.18

Please try that with 3.4.6 and 2.6.19; at least 3.4.6 and 2.6.20 works for me here.
Comment 5 Alan Hourihane 2007-04-12 09:18:16 UTC
Different. Now I get this....



* Gentoo Linux Genkernel; Version 3.4.6
* Running with options: --dmraid --slowusb --disklabel --no-clean all

* Linux Kernel 2.6.18-hardened-r6 for x86...
* WARNING: Failed to mount /boot!
--
make[1]: Entering directory `/usr/src/linux-2.6.18-hardened-r6'
  CHK     include/linux/utsrelease.h
  CHK     include/linux/version.h
  Building modules, stage 2.
  MODPOST
WARNING: drivers/acpi/processor.o - Section mismatch: reference to .init.data: from .text between 'acpi_processor_power_init' (at offset 0x1519) and 'acpi_processor_power_exit'
WARNING: drivers/net/sis900.o - Section mismatch: reference to .init.text:sis900_mii_probe from .text between 'sis900_probe' (at offset 0x49f) and 'sis900_default_phy'
--
  CC coreutils/ln.o
  CC coreutils/ls.o
  CC coreutils/mkdir.o
  CC coreutils/mknod.o
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/coreutils/ls.c: In function `ls_main':
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/coreutils/ls.c:1178: warning: implicit declaration of function `dfree'
--
  CC util-linux/dmesg.o
  CC util-linux/freeramdisk.o
  CC util-linux/losetup.o
  CC util-linux/mdStart.o
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/util-linux/mdStart.c: In function `mdstart_main':
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/util-linux/mdStart.c:36: warning: implicit declaration of function `bb_show_usage'
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/util-linux/mdStart.c:41: warning: implicit declaration of function `sscanf'
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/util-linux/mdStart.c:48: warning: implicit declaration of function `close'
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/util-linux/mdStart.c:51: warning: implicit declaration of function `printf'
--
  CC libbb/printf.o
  CC libbb/process_escape_sequence.o
  CC libbb/procps.o
/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/libbb/procps.c:15:22: asm/page.h: No such file or directory
  CC libbb/qmodule.o
make[2]: *** [/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo/libbb/procps.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/genkernel/27166.3227.19625.14728/busybox-1.1.3+gentoo'
* Gentoo Linux Genkernel; Version 3.4.6
* Running with options: --dmraid --slowusb --disklabel --no-clean all

* ERROR: Failed to compile the "all" target...

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
* 
* Please do *not* report compilation failures as genkernel bugs!
* 
make: *** [/usr/src/log/sys-kernel/hardened-sources] Error 1
Comment 6 Alan Hourihane 2007-04-12 09:19:24 UTC
Just noticed that 2.6.19 isn't stable yet in hardened. So that's why it ended up with 2.6.18.
Comment 7 Christian Heim (RETIRED) gentoo-dev 2007-04-29 15:34:52 UTC
(In reply to comment #6)
> Just noticed that 2.6.19 isn't stable yet in hardened. So that's why it ended
> up with 2.6.18.

Please try it w/ hardened-sources-2.6.20-r2, at least that worked for me.
Comment 8 Alan Hourihane 2007-05-07 13:33:08 UTC
Just tried this now and I get this with 2.6.20-hardened-r2....

gcc -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE  -L/var/tmp/genkernel/20319.21059.19300.12725/device-mapper/lib  tools/dmraid.c   -o tools/dmraid
tools/dmraid.c:12:27: dmraid/dmraid.h: No such file or directory
In file included from tools/dmraid.c:13:
tools/commands.h:11:32: dmraid/lib_context.h: No such file or directory
In file included from tools/dmraid.c:13:
tools/commands.h:74: warning: "struct lib_context" declared inside parameter list
tools/commands.h:74: warning: its scope is only this definition or declaration, which is probably not what you want
tools/commands.h:106: warning: "struct lib_context" declared inside parameter list
tools/commands.h:109: warning: "struct lib_context" declared inside parameter list
tools/commands.h:110: warning: "struct lib_context" declared inside parameter list
In file included from tools/dmraid.c:14:
tools/toollib.h:13: warning: "struct lib_context" declared inside parameter list
tools/toollib.h:14: warning: "struct lib_context" declared inside parameter list
tools/toollib.h:15: warning: "struct lib_context" declared inside parameter list
tools/toollib.h:18: error: syntax error before "size_t"
tools/toollib.h:19: warning: "struct lib_context" declared inside parameter list
tools/dmraid.c: In function `main':
tools/dmraid.c:23: warning: implicit declaration of function `libdmraid_init'
tools/dmraid.c:23: warning: assignment makes pointer from integer without a cast
tools/dmraid.c:35: warning: implicit declaration of function `init_locking'
tools/dmraid.c:39: warning: implicit declaration of function `libdmraid_exit'
tools/dmraid.c:43: warning: implicit declaration of function `exit'
tools/dmraid.c:43: error: `EXIT_SUCCESS' undeclared (first use in this function)
tools/dmraid.c:43: error: (Each undeclared identifier is reported only once
tools/dmraid.c:43: error: for each function it appears in.)
tools/dmraid.c:43: error: `EXIT_FAILURE' undeclared (first use in this function)
make[1]: *** [tools/dmraid] Error 1
--
        gcc -c -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/ataraid/asr.c -o format/ataraid/asr.o
gcc -MM -MF format/ataraid/hpt37x.d -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/ataraid/hpt37x.c; \
        gcc -c -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/ataraid/hpt37x.c -o format/ataraid/hpt37x.o
gcc -MM -MF format/ataraid/hpt45x.d -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/ataraid/hpt45x.c; \
        gcc -c -I. -I../include -I../lib -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/ataraid/hpt45x.c -o format/ataraid/hpt45x.o
format/ataraid/asr.c:516: warning: 'find_spare' defined but not used
--
make[2]: Leaving directory `/var/tmp/genkernel/20319.21059.19300.12725/dmraid/1.0.0.rc13/lib'
make[1]: Leaving directory `/var/tmp/genkernel/20319.21059.19300.12725/dmraid/1.0.0.rc13'
* Gentoo Linux Genkernel; Version 3.4.6
* Running with options: --dmraid --slowusb --disklabel --no-clean all

* ERROR: Failed to compile the "" target...

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
* 
* Please do *not* report compilation failures as genkernel bugs!
Comment 9 Christian Heim (RETIRED) gentoo-dev 2007-05-07 15:16:30 UTC
Looks pretty much like bug 164572 to me now ... *ugh*

*** This bug has been marked as a duplicate of bug 164572 ***
Comment 10 Alan Hourihane 2007-05-07 15:22:00 UTC
Unfortunately not.

I'm not using any MAKEOPTS flags at all.
Comment 11 Ian Stakenvicius 2007-06-13 05:57:51 UTC
If no MAKEOPTS flags are specified, then '-j2' is used by default, which can give you a parallelization bug.

There's a version-bump of dmraid in Sunrise, which I've successfully tested on current stable AMD64, as well as when using an ~amd64 version of sys-fs/device-mapper.  I _have not_ tested it with a hardened system, but I don't htink this error is hardened-specific.  The new ebuild should be commited to portage soon, but in the meantime it can be accessed here:

http://overlays.gentoo.org/proj/sunrise/browser/portage-review/sys-fs/dmraid
Comment 12 Alan Hourihane 2007-06-27 08:59:34 UTC
I've just put MAKEOPTS="-j1" into my make.conf and tried again, the error is pretty much the same.

Does genkernel override MAKEOPTS ??

What's the best way to patch genkernel to try rc14 ??
Comment 13 Ian Stakenvicius 2007-06-27 13:40:52 UTC
OH -- I didn't realize you were using genkernel for this -- i guess I should pay closer attention.  Genkernel doesn't use sys-fs/dmraid, they integrate dmraid into their package.

If you emerge sys-fs/dmraid, it gives instructions at the end of the ebuild for what to do to get genkernel to use this version.  (essentially you just have to edit /etc/genkernel.conf)

As for MAKEOPTS with genkernel, i'm not sure, but it would make sense that it is using its own value..
Comment 14 Alan Hourihane 2007-06-27 15:35:03 UTC
So I've emerged dmraid and modified genkernel.conf and it now works.
Comment 15 Alan Hourihane 2007-06-27 15:36:06 UTC
I guess the genkernel folk need to bump to rc14 ??
Comment 16 Alan Hourihane 2007-06-27 15:39:45 UTC
Mmm. I've just reverted the genkernel.conf fix back to rc13, but left sys-fs/dmraid installed and it's also worked.

So it sounds like genkernel isn't referencing it's own dmraid headers properly and has to have sys-fs/dmraid installed to compile correctly.
Comment 17 Ian Stakenvicius 2007-06-28 13:55:05 UTC
Adding genkernel to the CC list
Comment 18 Chris Gianelloni (RETIRED) gentoo-dev 2007-07-05 17:05:05 UTC
Well, genkernel built with --dmraid on several architectures for 2007.0's release.

I'm sure we could use a bump, anyway, but it'll be in the next genkernel version.
Comment 19 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-07 19:46:53 UTC
This is fixed in 3.4.9_pre6, which is now stable.