Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72342 - genkernel fails (/bin/sh problems?) during compile of 2.6.9 kernels
Summary: genkernel fails (/bin/sh problems?) during compile of 2.6.9 kernels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-11-24 06:11 UTC by Benjamin Collins
Modified: 2004-11-30 11:43 UTC (History)
1 user (show)

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


Attachments
/usr/src/linux/usr/Makefile (Makefile-usr.txt,941 bytes, text/plain)
2004-11-28 10:20 UTC, Benjamin Collins
Details
/usr/src/linux-2.6.9/usr/Makefile (Makefile,1.54 KB, text/plain)
2004-11-29 10:13 UTC, David Klann
Details
2.6.9-orig Makefile (Makefile,896 bytes, text/plain)
2004-11-29 10:27 UTC, Tim Yamin (RETIRED)
Details
Patch (genkernel-72342.patch,1.04 KB, patch)
2004-11-29 10:28 UTC, Tim Yamin (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Collins 2004-11-24 06:11:27 UTC
I'm not really sure what's going on, but the kernel compiles fine by doing 'make', so I'm supposing that this is a genkernel bug.  Here is the relevant portion of my (and also the only part I saved from destruction, unfortunately) log from genkernel:

*** End of Linux kernel configuration.
*** Execute 'make' to build the kernel or try 'make help'.

*         >> Compiling 2.6.9-gentoo-r4 bzImage...
* ERROR: Failed to compile the "bzImage" target...

* -- Grepping log... --

  SCSI generic support (CHR_DEV_SG) [Y/n/m/?] y
  *
  * Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  *
  Probe all LUNs on each SCSI device (SCSI_MULTI_LUN) [N/y/?] n
  Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [N/y/?] n
--
  CC      init/main.o
/bin/sh: line 1: [: missing `]'
/bin/sh: line 1: [: missing `]'
  CPIO    usr/initramfs_data.cpio
/bin/sh: line 1: ./: is a directory
make[1]: *** [usr/initramfs_data.cpio] Error 126
make: *** [usr] Error 2
--
  CC      init/version.o
  LD      init/mounts.o
  LD      init/built-in.o
* Gentoo Linux Genkernel; Version 3.1.0a

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




Reproducible: Always
Steps to Reproduce:
1.  genkernel --bootsplash [--gensplash] [--udev] --kerneldir=/usr/src/linux-2.6.9-gentoo-r* --install --bootloader=grub
2.
3.

Actual Results:  
After getting the above error, I was able to cd to
/usr/src/linux-2.6.9-gentoo-r4, type make (and see the same /bin/sh error,
except make continues where genkernel fails), and then control-C it and then
start up genkernel again with --no-mrproper and --no-clean.
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2004-11-28 08:34:00 UTC
Mind attaching usr/Makefile from your source tree please?
Comment 2 Benjamin Collins 2004-11-28 10:20:08 UTC
Created attachment 44883 [details]
/usr/src/linux/usr/Makefile
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-11-28 10:37:15 UTC
Well, looking at that Makefile I don't see any problems ... other than the tabs getting replaced by whitespaces. Is this the same in the Makefile on your system?
Comment 4 Benjamin Collins 2004-11-28 11:25:26 UTC
No, the tabs are still there on my system.  
Comment 5 David Klann 2004-11-29 10:12:38 UTC
Here too. Although the error is slightly different. When running genkernel 3.1.0a on sys-kernel/development-sources-2.6.9, thusly:

genkernel --clean --mrproper --gconfig --no-bootsplash --bootloader=grub --install all

the process fails with the following output and error(s). I also noticed that my copy of usr/Makefile is different than that which was attached by bencollins (see next attachment as well as including the following output from genkernel):

COMMAND: make -j2 CC="gcc" LD="ld" AS="as" bzImage
  CHK     include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CC      init/main.o
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/do_mounts.o
  CC      init/do_mounts_devfs.o
/bin/sh: line 0: [: missing `]'
/bin/sh: line 0: [: missing `]'
/bin/sh: line 0: [: missing `]'
/bin/sh: line 0: [: missing `]'
/bin/sh: line 0: [: missing `]'
  CPIO    usr/initramfs_data.cpio
/bin/sh: ./: is a directory
make[1]: *** [usr/initramfs_data.cpio] Error 126
make: *** [usr] Error 2
make: *** Waiting for unfinished jobs....
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  CC      init/initramfs.o
  CC      init/version.o
  LD      init/mounts.o
  LD      init/built-in.o
* Gentoo Linux Genkernel; Version 3.1.0a

* ERROR: Failed to compile the "bzImage" target...
* -- Grepping log... --
* -- End log... --
Comment 6 David Klann 2004-11-29 10:13:59 UTC
Created attachment 44938 [details]
/usr/src/linux-2.6.9/usr/Makefile
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-11-29 10:26:47 UTC
Ok, I see the problem with David's Makefile but not Benjamin's for some reason... Can you please revert the Makefile to the one I'll attached to this bug, and apply the patch I am to attach to /usr/share/genkernel/genkernel - hopefully this should fix it, and if you could confirm that it would be very helpful. Thanks!
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-11-29 10:27:44 UTC
Created attachment 44940 [details]
2.6.9-orig Makefile
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2004-11-29 10:28:37 UTC
Created attachment 44941 [details, diff]
Patch
Comment 10 David Klann 2004-11-29 10:54:46 UTC
Tim, that seemed to fix it. The Makefile you attached appears to be identical to the first one Benjamin attached (attachment-id: 44883).

Is that usr/Makefile included in a newer gentoo-dev-sources ebuild? Maybe it's time I switched from development-sources to gentoo-dev-sources...

Thanks for the genkernel patch!

Comment 11 Tim Yamin (RETIRED) gentoo-dev 2004-11-29 11:03:29 UTC
No, the problem is genkernel running a sed incorrectly on the Makefile (which is the same in gentoo-dev-sources as development-sources) that allows gensplash to compile correctly. Issue fixed in CVS, new genkernel should be coming out shortly...
Comment 12 Tim Yamin (RETIRED) gentoo-dev 2004-11-30 11:43:30 UTC
Ok, the patch is in genkernel-3.0.2c, it should reach rsync shortly. Please reopen this bug if you have any problems. Thanks!