Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247246 - [patch] ~sys-kernel/genkernel-3.4.10 pass invalid make menuconfig command when cross-compile (--arch-override=XXX)
Summary: [patch] ~sys-kernel/genkernel-3.4.10 pass invalid make menuconfig command whe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: Inclusion, InVCS
: 358041 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-17 19:12 UTC by Phattanon Duangdara
Modified: 2011-07-03 22:44 UTC (History)
3 users (show)

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


Attachments
Patch to gen_compile.sh (gen_compile.diff,756 bytes, text/plain)
2008-11-17 19:18 UTC, Phattanon Duangdara
Details
Patch to genkernel -- invalid (genkernel.diff,1.08 KB, text/plain)
2008-11-17 19:57 UTC, Phattanon Duangdara
Details
Patch to genkernel (genkernel.diff,1.93 KB, patch)
2008-11-17 22:10 UTC, Phattanon Duangdara
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phattanon Duangdara 2008-11-17 19:12:20 UTC
Genkernel pass invalid make menuconfig command when cross compile with --arch-override=XXX


Reproducible: Always

Steps to Reproduce:
1. Use ~sys-apps/genkernel-3.4.10
2. Use genkernel with --menuconfig and --arch-override=XXX with different ARCH from compiling machine (i.e. x86 from amd64 machine)

Actual Results:  
Genkernel run menuconfig without cross-compile arguments (not pass ARCH=xxx to make menuconfig) and kernel show menuconfig with wrong ARCH

If users does not notice invalid arch. Kernel compile will failes when do 'MAKE prepare'


Expected Results:  
Genkernel run menuconfig with correct cross-compile arguments (pass ARCH=xxx to make menuconfig)


gen_configkernel.sh pass runtask arguments to compile_generic() in gen_compile.sh 
but compile_generic() check not to pass kernel_compile_args to MAKE command

gen_compile.sh should pass kernel_compile_args on runtask as well.

This fixed gen_compile.sh works for me ...

--- gen_compile.sh	2008-11-18 02:05:09.595193000 +0700
+++ gen_compile.sh.new	2008-11-18 02:04:52.287204590 +0700
@@ -231,9 +231,9 @@
 		MAKE=${UTILS_MAKE}
 	fi
 	case "${argstype}" in
-		kernel) ARGS="`compile_kernel_args`" ;;
+		kernel|runtask) ARGS="`compile_kernel_args`" ;;
 		utils) ARGS="`compile_utils_args`" ;;
-		*) ARGS="" ;; # includes runtask
+		*) ARGS="" ;;
 	esac
 	shift 2

*** error when use genkernel with --arch-override=x86 on amd64 machine
(chroot) raptor-gentoo genkernel # genkernel --loglevel=5 --arch-override=x86 --menuconfig --save-config --lvm --disklabel --install all
* CMD_LOGLEVEL: 5
* CMD_ARCHOVERRIDE: x86
* CMD_MENUCONFIG: 1
* CMD_SAVE_CONFIG: 1
* CMD_LVM: 1
* CMD_DISKLABEL: 1
* CMD_NOINSTALL: 0
* Gentoo Linux Genkernel; Version 3.4.10
* Running with options: --loglevel=5 --arch-override=x86 --menuconfig --save-config --lvm --disklabel --install all

* Resolving config file, command line, and arch default settings.
*   DEBUGFILE not set.
*   KERNEL_DIR defaulted to "/usr/src/linux".
*   NO_KERNEL_SOURCES not set.
*   KNAME defaulted to "genkernel".
*   MAKEOPTS defaulted to "-j2".
*   KERNEL_MAKE defaulted to "make".
*   UTILS_MAKE defaulted to "make".
*   KERNEL_CC defaulted to "gcc".
*   KERNEL_LD defaulted to "ld".
*   KERNEL_AS defaulted to "as".
*   UTILS_CC defaulted to "gcc".
*   UTILS_LD defaulted to "ld".
*   UTILS_AS defaulted to "as".
*   KERNEL_CROSS_COMPILE not set.
*   UTILS_CROSS_COMPILE not set.
*   BOOTDIR defaulted to "/boot".
*   SPLASH not set.
*   POSTCLEAR not set.
*   MRPROPER set in config file to "yes".
*   MENUCONFIG overridden on command line to "1".
*   CLEAN set in config file to "yes".
*   MINKERNPACKAGE not set.
*   MODULESPACKAGE not set.
*   KERNCACHE not set.
*   NOINITRDMODULES not set.
*   ALLINITRDMODULES not set.
*   INITRAMFS_OVERLAY not set.
*   MOUNTBOOT set in config file to "yes".
*   BUILD_STATIC not set.
*   SAVE_CONFIG overridden on command line to "1".
*   SYMLINK not set.
*   INSTALL_MOD_PATH not set.
*   OLDCONFIG set in config file to "yes".
*   LVM set on command line to "1".
*   EVMS not set.
*   DMRAID not set.
*   BUSYBOX defaulted to "yes".
*   DISKLABEL set on command line to "1".
*   LUKS not set.
*   MDADM not set.
*   FIRMWARE not set.
*   FIRMWARE_DIR defaulted to "/lib/firmware".
*   FIRMWARE_FILES not set.
*   INTEGRATED_INITRAMFS not set.
*   GENZIMAGE not set.
*   KEYMAP defaulted to "yes".
*   DOKEYMAPAUTO not set.
* KERNEL_ARCH=x86
* Linux Kernel 2.6.27-gentoo-r2 for x86...
mount: special device LABEL=eeesd_boot does not exist
* WARNING: Failed to mount /boot!

* kernel: >> Running mrproper...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86" mrproper 
  CLEAN   arch/x86/boot/compressed
  CLEAN   /usr/src/linux-2.6.27-gentoo-r2
  CLEAN   arch/x86/boot
  CLEAN   arch/x86/kernel/acpi/realmode
  CLEAN   arch/x86/kernel
  CLEAN   arch/x86/vdso
  CLEAN   drivers/char
  CLEAN   drivers/md
  CLEAN   init
  CLEAN   kernel
  CLEAN   lib
  CLEAN   drivers/video/logo
  CLEAN   usr
  CLEAN   scripts/basic
  CLEAN   scripts/genksyms
  CLEAN   scripts/kconfig
  CLEAN   scripts/mod
  CLEAN   scripts
  CLEAN   .tmp_versions
  CLEAN   vmlinux System.map .tmp_kallsyms1.S .tmp_kallsyms1.o .tmp_kallsyms2.S .tmp_kallsyms2.o .tmp_vmlinux1 .tmp_vmlinux2 .tmp_System.map
  CLEAN   include/config
  CLEAN   .config .config.old include/asm .version include/linux/autoconf.h include/linux/version.h include/linux/utsrelease.h include/linux/bounds.h include/asm-x86/asm-offsets.h include/asm/asm-offsets.h Module.symvers
* config: Using config from /etc/kernels/kernel-config-x86-2.6.27-gentoo-r2
*         Previous config backed up to .config.bak
*         >> Running oldconfig...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86" oldconfig 
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -o arch/x86/Kconfig
#
# configuration written to .config
#
* kernel: >> Cleaning...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86" clean 
* config: >> Invoking menuconfig...
COMMAND: make j1  menuconfig 
#
# configuration written to .config
#


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

COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86" prepare 
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
kernel/bounds.c:1: error: code model 'kernel' not supported in the 32 bit mode
kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
* ERROR: Failed to compile the "prepare" target...

* -- Grepping log... --

*   KEYMAP defaulted to "yes".
*   DOKEYMAPAUTO not set.
* KERNEL_ARCH=x86

* Linux Kernel 2.6.27-gentoo-r2 for x86...
* WARNING: Failed to mount /boot!
--
  UPD     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
kernel/bounds.c:1: error: code model 'kernel' not supported in the 32 bit mode
kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
--
*   GENZIMAGE not set.
*   KEYMAP defaulted to "yes".
*   DOKEYMAPAUTO not set.
* KERNEL_ARCH=x86

* ERROR: Failed to compile the "prepare" 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!
* 

*** emerge --info inside x86 build chroot from amd64
 
(chroot) raptor-gentoo genkernel # emerge --info
WARNING: repository at /usr/local/portage is missing a repo_name entry
Portage 2.2_rc14 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r2-x86_64-AMD_Phenom-tm-_9550_Quad-Core_Processor-with-glibc2.0
Timestamp of tree: Sun, 16 Nov 2008 18:35:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe -march=prescott"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -pipe -march=prescott"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.in.th http://masterdistfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox flag fortran fuse gdbm gif glitz gnome gpm gstreamer gtk hal iconv ipod ipv6 isdnlog jpeg libnotify mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora tiff truetype unicode usb vorbis win32codecs x264 x86 xcb xcomposite xfce4 xinerama xml xorg xosd xulrunner xv zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard ellan mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev i810 intel vesa vga vmware v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Phattanon Duangdara 2008-11-17 19:18:32 UTC
Created attachment 172108 [details]
Patch to gen_compile.sh

Found - missing on debug info (j1 instead of -j1)
Comment 2 Phattanon Duangdara 2008-11-17 19:46:11 UTC
Comment on attachment 172108 [details]
Patch to gen_compile.sh

Runtask seems not only used by kernel menuconfig. Move changes to gen_configkernel.sh
Comment 3 Phattanon Duangdara 2008-11-17 19:50:47 UTC
Move changes to gen_configkernel.sh and fix typo on gen_compile.sh

I am not sure that make -jN pass to make menuconfig are causing problems or not.
But it works for me.

--- gen_configkernel.sh.orig	2008-11-18 02:44:30.275194535 +0700
+++ gen_configkernel.sh	2008-11-18 02:44:44.675204649 +0700
@@ -60,7 +60,7 @@
 	if isTrue ${MENUCONFIG}
 	then
 		print_info 1 'config: >> Invoking menuconfig...'
-		compile_generic menuconfig runtask
+		compile_generic menuconfig kernel
 		[ "$?" ] || gen_die 'Error: menuconfig failed!'
 	elif isTrue ${CMD_GCONFIG}
 	then

--- gen_compile.sh.orig	2008-11-18 02:47:21.447192671 +0700
+++ gen_compile.sh	2008-11-18 02:47:42.231192741 +0700
@@ -242,7 +242,7 @@
 	# ARGS='CC="ccache gcc"'
 	if [ "${argstype}" == 'runtask' ]
 	then
-		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${target} $*" 1 0 1
+		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/-j1} ${ARGS} ${target} $*" 1 0 1
 		eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${target} $*
 		RET=$?
 	elif [ "${LOGLEVEL}" -gt "1" ]
Comment 4 Phattanon Duangdara 2008-11-17 19:57:57 UTC
Created attachment 172121 [details]
Patch to genkernel -- invalid

Oops!
Package name is sys-kernel/genkernel, sorry.
Comment 5 Phattanon Duangdara 2008-11-17 22:10:13 UTC
Created attachment 172130 [details, diff]
Patch to genkernel

Seems kernel and runtask is both not suitable
Added kerneltask to handle menuconfig
Comment 6 Phattanon Duangdara 2008-12-08 14:58:03 UTC
This broke --menuconfig on cross-compile (--arch-override), please fix.
Comment 7 David Abrahams 2009-01-24 01:00:07 UTC
(In reply to comment #3)
> Move changes to gen_configkernel.sh and fix typo on gen_compile.sh
> 
<snip patches>

I'm getting exactly the same symptoms from
# ls -FGg /etc/make.profile
lrwxrwxrwx 1 49 Jan 23 17:49 /etc/make.profile -> ../usr/portage/profiles/hardened/linux/x86/2008.0/
# echo sys-kernel/gentoo-sources >> /etc/portage/package.keywords
# emerge -av gentoo-sources
# emerge genkernel
# genkernel all

But likewise, I have the problem without using genkernel:

# echo sys-kernel/gentoo-sources >> /etc/portage/package.keywords
# emerge -av gentoo-sources
# make menuconfig  # <== set up processor type
# make
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
kernel/bounds.c:1: error: code model `kernel' not supported in the 32 bit mode
kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

So maybe this has something to do with the hardened profile?
Comment 8 Davide Carnovale 2009-02-01 17:16:48 UTC
(In reply to comment #7)
> (In reply to comment #3)
> > Move changes to gen_configkernel.sh and fix typo on gen_compile.sh
> > 
> <snip patches>
> 
> I'm getting exactly the same symptoms from
> # ls -FGg /etc/make.profile
> lrwxrwxrwx 1 49 Jan 23 17:49 /etc/make.profile ->
> ../usr/portage/profiles/hardened/linux/x86/2008.0/
> # echo sys-kernel/gentoo-sources >> /etc/portage/package.keywords
> # emerge -av gentoo-sources
> # emerge genkernel
> # genkernel all
> 
> But likewise, I have the problem without using genkernel:
> 
> # echo sys-kernel/gentoo-sources >> /etc/portage/package.keywords
> # emerge -av gentoo-sources
> # make menuconfig  # <== set up processor type
> # make
> scripts/kconfig/conf -s arch/x86/Kconfig
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-x86
>   CC      kernel/bounds.s
> kernel/bounds.c:1: error: code model `kernel' not supported in the 32 bit mode
> kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in
> make[1]: *** [kernel/bounds.s] Error 1
> make: *** [prepare0] Error 2
> 
> So maybe this has something to do with the hardened profile?
> 

I'm unsure if this can be of any help...
i'm compiling a x86 system from and amd64 install manually (without genkernel) and i get the same error.
Using "make ARCH=i386" fixes the problem for me.
Sorry if this post is inappropriate here...
Comment 9 Phattanon Duangdara 2009-02-26 21:15:05 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #3)
> > > Move changes to gen_configkernel.sh and fix typo on gen_compile.sh
> > > 
> > <snip patches>
> > 
> > I'm getting exactly the same symptoms from
> > # ls -FGg /etc/make.profile
> > lrwxrwxrwx 1 49 Jan 23 17:49 /etc/make.profile ->
> > ../usr/portage/profiles/hardened/linux/x86/2008.0/
> > # echo sys-kernel/gentoo-sources >> /etc/portage/package.keywords
> > # emerge -av gentoo-sources
> > # emerge genkernel
> > # genkernel all
> > 
> > But likewise, I have the problem without using genkernel:
> > 
> > # echo sys-kernel/gentoo-sources >> /etc/portage/package.keywords
> > # emerge -av gentoo-sources
> > # make menuconfig  # <== set up processor type
> > # make
> > scripts/kconfig/conf -s arch/x86/Kconfig
> >   CHK     include/linux/version.h
> >   CHK     include/linux/utsrelease.h
> >   SYMLINK include/asm -> include/asm-x86
> >   CC      kernel/bounds.s
> > kernel/bounds.c:1: error: code model `kernel' not supported in the 32 bit mode
> > kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in
> > make[1]: *** [kernel/bounds.s] Error 1
> > make: *** [prepare0] Error 2
> > 
> > So maybe this has something to do with the hardened profile?
> > 
> 
> I'm unsure if this can be of any help...
> i'm compiling a x86 system from and amd64 install manually (without genkernel)
> and i get the same error.
> Using "make ARCH=i386" fixes the problem for me.
> Sorry if this post is inappropriate here...
> 

You always need to pass ARCH=xxx when cross compiling. Choosing processor from menuconfig is  only set appropriate optimization, not arch.

(bugged) genkernel pass ARCH=xxx when cross compiling, but not only for menuconfig which also needed.
Comment 10 Venu Gogineni 2010-03-02 13:16:59 UTC
Hi All,

I was trying to compile kernel on x86_64 bit machine( 'emerge gentoo-sources' downloaded linux-2.6.31-gentoo-r10 kernel source). I am getting the following errors when I ran the command 'genkernel all'. I even tried to compile the kernel manually and ran into same errors. This bug is not updated since '2009-02-26'. Is this a bug with genkernel tool or kernel source code? 

==============================================================================
(chroot) livecd src # genkernel all
* Gentoo Linux Genkernel; Version 3.4.10.906
* Running with options: all

* Linux Kernel 2.6.31-gentoo-r10 for x86_64...
* kernel: >> Running mrproper...
* config: Using config from /usr/share/genkernel/arch/x86_64/kernel-config
*         Previous config backed up to .config.bak
*         >> Running oldconfig...
* kernel: >> Cleaning...
* ERROR: Failed to compile the "prepare" target...

* -- Grepping log... --

  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function 'conf_askvalue':
scripts/kconfig/conf.c:105: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function 'conf_choice':
scripts/kconfig/conf.c:307: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
--
  SHIPPED scripts/kconfig/lex.zconf.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2486:
scripts/kconfig/confdata.c: In function 'conf_write':
scripts/kconfig/confdata.c:508: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/confdata.c: In function 'conf_write_autoconf':
scripts/kconfig/confdata.c:745: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/confdata.c:746: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
In file included from scripts/kconfig/zconf.tab.c:2487:
scripts/kconfig/expr.c: In function 'expr_print_file_helper':
scripts/kconfig/expr.c:1090: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -o arch/x86/Kconfig
.config:262:warning: symbol value 'm' invalid for ACPI_DOCK
.config:411:warning: symbol value 'm' invalid for INET_LRO
.config:778:warning: symbol value 'm' invalid for RFKILL_INPUT
.config:1219:warning: symbol value 'm' invalid for FIXED_PHY
.config:1378:warning: symbol value 'm' invalid for IWL4965
.config:1533:warning: symbol value 'm' invalid for ISDN
.config:2727:warning: symbol value 'm' invalid for GFS2_FS_LOCKING_DLM
--
*
PCI support (PCI) [Y/n/?] y
  Support mmconfig PCI config space access (PCI_MMCONFIG) [Y/n] y
Support for DMA Remapping Devices (EXPERIMENTAL) (DMAR) [Y/n/?] y
  Enable DMA Remapping Devices by default (DMAR_DEFAULT_ON) [Y/n/?] (NEW)   Workaround broken graphics drivers (going away soon) (DMAR_BROKEN_GFX_WA) [N/y/?] (NEW) Support for Interrupt Remapping (EXPERIMENTAL) (INTR_REMAP) [N/y/?] (NEW) PCI Express support (PCIEPORTBUS) [Y/n/?] y
  Root Port Advanced Error Reporting support (PCIEAER) [Y/n/?] y
    PCI Express ECRC settings control (PCIE_ECRC) [N/y/?] (NEW)     PCIE AER error injector support (PCIEAER_INJECT) [N/m/y/?] (NEW)   PCI Express ASPM support(Experimental) (PCIEASPM) [N/y/?] (NEW) Message Signaled Interrupts (MSI and MSI-X) (PCI_MSI) [Y/n/?] y
--
  *
  Support for SATA (deprecated; conflicts with libata SATA driver) (BLK_DEV_IDE_SATA) [N/y/?] n
  generic ATA/ATAPI disk support (IDE_GD) [Y/n/m/?] (NEW)     ATA disk support (IDE_GD_ATA) [Y/n/?] (NEW)     ATAPI floppy support (IDE_GD_ATAPI) [N/y/?] (NEW)   PCMCIA IDE support (BLK_DEV_IDECS) [M/n/?] m
  Cardbus IDE support (Delkin/ASKA/Workbit) (BLK_DEV_DELKIN) [M/n/y/?] m
  Include IDE/ATAPI CDROM support (BLK_DEV_IDECD) [Y/n/m/?] y
    Verbose error logging for IDE/ATAPI CDROM driver (BLK_DEV_IDECD_VERBOSE_ERRORS) [Y/n/?] (NEW)   Include IDE/ATAPI TAPE support (BLK_DEV_IDETAPE) [M/n/y/?] m
--
    Decode registers during diagnostics (AIC79XX_REG_PRETTY_PRINT) [N/y/?] n
  Adaptec AIC94xx SAS/SATA support (SCSI_AIC94XX) [M/n/y/?] m
    Compile in debug mode (AIC94XX_DEBUG) [N/y/?] n
  Marvell 88SE64XX/88SE94XX SAS/SATA support (SCSI_MVSAS) [N/m/y/?] (NEW)   Adaptec I2O RAID support  (SCSI_DPT_I2O) [N/m/y/?] (NEW)   AdvanSys SCSI support (SCSI_ADVANSYS) [M/n/y/?] m
  ARECA (ARC11xx/12xx/13xx/16xx) SATA/SAS RAID Host Adapter (SCSI_ARCMSR) [M/n/y/?] m
    Enable PCI Error Recovery Capability in Areca Driver(ARCMSR) (SCSI_ARCMSR_AER) [N/y/?] n
--
SCSI CDROM support (BLK_DEV_SR) [Y/n/m/?] y
  Enable vendor-specific extensions (for SCSI CDROM) (BLK_DEV_SR_VENDOR) [Y/n/?] y
SCSI generic support (CHR_DEV_SG) [M/n/y/?] m
SCSI media changer support (CHR_DEV_SCH) [M/n/y/?] m
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
--
  OCFS2 expensive checks (OCFS2_DEBUG_FS) [N/y/?] n
  OCFS2 POSIX Access Control Lists (OCFS2_FS_POSIX_ACL) [N/y/?] (NEW) Btrfs filesystem (EXPERIMENTAL) Unstable disk format (BTRFS_FS) [N/m/y/?] (NEW) Enable POSIX file locking API (FILE_LOCKING) [Y/n/?] (NEW) Dnotify support (DNOTIFY) [Y/n/?] y
Inotify file change notification support (INOTIFY) [Y/?] y
Inotify support for userspace (INOTIFY_USER) [Y/n/?] y
Quota support (QUOTA) [Y/?] y
  Report quota messages through netlink interface (QUOTA_NETLINK_INTERFACE) [N/y/?] (NEW)   Print quota warnings to console (OBSOLETE) (PRINT_QUOTA_WARNING) [Y/n/?] (NEW) Old quota format support (QFMT_V1) [N/m/y/?] (NEW) Quota format v2 support (QFMT_V2) [N/m/y/?] (NEW) Kernel automounter support (AUTOFS_FS) [N/m/y/?] n
--
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function 'conf_askvalue':
scripts/kconfig/conf.c:105: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function 'conf_choice':
scripts/kconfig/conf.c:307: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2486:
scripts/kconfig/confdata.c: In function 'conf_write':
scripts/kconfig/confdata.c:508: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/confdata.c: In function 'conf_write_autoconf':
scripts/kconfig/confdata.c:745: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/confdata.c:746: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
In file included from scripts/kconfig/zconf.tab.c:2487:
scripts/kconfig/expr.c: In function 'expr_print_file_helper':
scripts/kconfig/expr.c:1090: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
--
  UPD     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
kernel/bounds.c:1: error: code model 'kernel' not supported in the 32 bit mode
kernel/bounds.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
* Gentoo Linux Genkernel; Version 3.4.10.906
* Running with options: all

* ERROR: Failed to compile the "prepare" 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!
*
(chroot) livecd src #
==============================================================================

Thanks,
Venu.
Comment 11 Phattanon Duangdara 2010-03-03 00:41:04 UTC
Make sure you use 64bit live cd to compile 64bit kernel.

This bug is related to Genkernel only when cross compile kernel using genkernel.

BTW, Current Genkernel still have this 2 years old bug, even I filled it as major severity.
Comment 12 Venu Gogineni 2010-03-03 06:14:52 UTC
(In reply to comment #11)
> Make sure you use 64bit live cd to compile 64bit kernel.

Yes. I am using 64 bit live cd to compile 64bit kernel. I downloaded livedvd-x86-amd64-32ul-10.1.iso from gentoo site. It is mentioned that same iso can be used to install gentoo on 32 bit as well as 64 bit. The following is the output of uname -m.

livecd / # uname -m
x86_64

> This bug is related to Genkernel only when cross compile kernel using
> genkernel.
I got same errors even when I tried to compile the kernel manually as mentioned in the following link.
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7

Comment 13 Sebastian Pipping gentoo-dev 2011-01-05 22:43:17 UTC
PS: Adding keyword "Inclusion" and "[patch] " prefix to better show this bugs nature in searches...
Comment 14 Arne Babenhauserheide 2011-03-16 05:58:24 UTC
*** Bug 358041 has been marked as a duplicate of this bug. ***
Comment 15 Sorin Panca 2011-06-22 09:22:57 UTC
I still experience the same problem with genkernel-3.4.16.
Comment 16 Xake 2011-06-22 10:16:14 UTC
Looking at this patch got me question one thing: is there a special reason why we do "make -j1 *config", i.e. blocks parallel building of the config targets? I have never seen it break, and IIRC the upstream kernel should be fully parallel compilation safe as long as your configuration file is not broken.
Comment 17 Sebastian Pipping gentoo-dev 2011-06-22 17:05:15 UTC
(In reply to comment #16)
> Looking at this patch got me question one thing: is there a special reason why
> we do "make -j1 *config", i.e. blocks parallel building of the config targets?

Not sure.  Two thoughts:
- Even without -j1 we need a distinct case due to -s passed as well
- I doubt we would gain much from removing -j1 there
- In contrast, default in Gentoo seems to be: restrict to -j1 only if broken
You decide.


I have applied a modified patch in Git now:
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=4a7ccf8b0873d75996e4582de5f1db326f20bc45

Please give genkernel-9999 a spin and feed back if the issue is fixed.
Comment 18 Sorin Panca 2011-06-23 06:57:32 UTC
Does this bug have anything to do with parallel making of config? I thought it was reported it doesn't recognize the ARCH_OVERRIDE genkernel.conf option... Was I missinterpreting anything?

Regards,
Sorin.
Comment 19 Xake 2011-06-23 10:04:13 UTC
(In reply to comment #18)
> Does this bug have anything to do with parallel making of config? I thought it
> was reported it doesn't recognize the ARCH_OVERRIDE genkernel.conf option...
> Was I missinterpreting anything?
> 

Nope, that is unrelated, however I just tried to parse the following snippet in comment #3:
> I am not sure that make -jN pass to make menuconfig are causing problems or
> not.
> But it works for me.

However I see nothing holding this back, and neither seems Sebastian since he commited it.

(In reply to comment #17)
> Not sure.  Two thoughts:
> - Even without -j1 we need a distinct case due to -s passed as well
Yeah, but still...;)

> - I doubt we would gain much from removing -j1 there

That depend on architecture, number of cores and speed of those cores. But I can try to make numbers.;)

> - In contrast, default in Gentoo seems to be: restrict to -j1 only if broken
> You decide.

I like that approach, so maybe I will file a new bug for this.