View previous topic :: View next topic |
Author |
Message |
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 4:22 am Post subject: gentoo kernel compiling "genkernel all" failed |
|
|
Hello everybody,
while I was installing my kernel compiling step failed. When I use the command
then I got this
cat /var/log/genkernel.log | grep -i error
Enable recovery from hardware memory errors (MEMORY_FAILURE) [N/y/?] n
Hardware Error Device (ACPI_HED) [N/m/y/?] n
ACPI Platform Error Interface (APEI) (ACPI_APEI) [N/y/?] n
Extended Error Log support (ACPI_EXTLOG) [N/m/y/?] (NEW)
Root Port Advanced Error Reporting support (PCIEAER) [Y/n/?] y
PCIe AER error injector support (PCIEAER_INJECT) [N/m/y/?] n
Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [N/y/?] n
Verbose ATA error reporting (ATA_VERBOSE_ERROR) [Y/n/?] y
Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [N/y/?] n
Verbose ATA error reporting (ATA_VERBOSE_ERROR) [Y/n/?] y
* EDAC (Error Detection And Correction) reporting
EDAC (Error Detection And Correction) reporting (EDAC) [N/y/?] n
Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] (NEW)
make[2]: *** [kernel/time/timeconst.h] Error 127
make[1]: *** [kernel/time] Error 2
make: *** [kernel] Error 2
* ERROR: Failed to compile the "bzImage" target...
* errors that were reported above.
I searched but honestly nothing made sense to me. Any ideas or guesses?
Thanks,
PC, |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Thu Jun 04, 2015 7:00 am Post subject: |
|
|
Did you configure? I often use this command, which starts with config of running kernel:
genkernel --menuconfig --install --integrated-initramfs --kernel-config=/proc/config.gz all |
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 7:33 am Post subject: |
|
|
But I dont want to configure the kernel manually, I just wanna do genkernel. thats all. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3137
|
Posted: Thu Jun 04, 2015 10:21 am Post subject: |
|
|
that line is a fine start, if you don't want any manual steps skip `--menuconfig` part |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jun 04, 2015 2:15 pm Post subject: |
|
|
Code: | emerge -1av bc
genkernel all |
_________________ Defund the FCC. |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Thu Jun 04, 2015 2:56 pm Post subject: |
|
|
bc was removed from the system set, but it's a dependency in at least the recent gentoo-sources.
Can you in fact get to a kernel building sitiuation without building bc?
Will |
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 4:07 pm Post subject: |
|
|
I tried
Code: | genkernel --menuconfig --install --integrated-initramfs --kernel-config=/proc/config.gz all |
I got below
Code: | * Gentoo Linux Genkernel; Version 3.4.49.2
* Running with options: --install --integrated-initramfs --kernel-config=/proc/config.gz all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
* Linux Kernel 3.18.12-gentoo for x86_64...
* .. with config file /proc/config.gz
* kernel: Using config from /proc/config.gz
* Previous config backed up to .config--2015-06-04--07-49-22.bak
* kernel: >> Running mrproper...
* >> Running oldconfig...
* kernel: >> Cleaning...
* >> Compiling 3.18.12-gentoo bzImage...
* ERROR: Failed to compile the "bzImage" target...
*
* -- Grepping log... --
*
*Allow for memory compaction (COMPACTION) [Y/?] y
* Page migration (MIGRATION) [Y/?] y
*Enable bounce buffers (BOUNCE) [Y/n/?] y
*Enable KSM for page merging (KSM) [Y/n/?] y
*Low address space to protect from user allocation (DEFAULT_MMAP_MIN_ADDR) [65536] 65536
*Enable recovery from hardware memory errors (MEMORY_FAILURE) [Y/n/?] y
*--
* *
* round-robin scheduling (IP_VS_RR) [M/n/?] m
* weighted round-robin scheduling (IP_VS_WRR) [M/n/?] m
* least-connection scheduling (IP_VS_LC) [M/n/?] m
* weighted least-connection scheduling (IP_VS_WLC) [M/n/?] m
* weighted failover scheduling (IP_VS_FO) [N/m/?] (NEW)
*--
*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) [Y/n/m/?] y
*SCSI media changer support (CHR_DEV_SCH) [M/n/y/?] m
*SCSI Enclosure Support (SCSI_ENCLOSURE) [M/n/?] m
*Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [Y/n/?] y
*--
* VUB300 USB to SDIO/SD/MMC Host Controller support (MMC_VUB300) [M/n/?] m
* USB SD Host Controller (USHC) support (MMC_USHC) [M/n/?] m
* Renesas USDHI6ROL0 SD/SDIO Host Controller support (MMC_USDHI6ROL0) [N/m/?] (NEW)
* Realtek PCI-E SD/MMC Card Interface Driver (MMC_REALTEK_PCI) [M/n/?] m
*
* EDAC (Error Detection And Correction) reporting
*
*EDAC (Error Detection And Correction) reporting (EDAC) [Y/n/?] y
* EDAC legacy sysfs (EDAC_LEGACY_SYSFS) [Y/n/?] y
* Debugging (EDAC_DEBUG) [N/y/?] n
* Decode MCEs in human-readable form (only on AMD for now) (EDAC_DECODE_MCE) [M/n/y/?] m
* Simple MCE injection interface over /sysfs (EDAC_MCE_INJ) [M/n/?] m
* Main Memory EDAC (Error Detection And Correction) reporting (EDAC_MM_EDAC) [M/n/y/?] m
* AMD64 (Opteron, Athlon64) K8, F10h (EDAC_AMD64) [M/n/?] m
* Sysfs HW Error injection facilities (EDAC_AMD64_ERROR_INJECTION) [N/y/?] n
*--
* JFS statistics (JFS_STATISTICS) [N/y/?] n
*XFS filesystem support (XFS_FS) [Y/n/m/?] y
* XFS Quota support (XFS_QUOTA) [Y/n/?] y
* XFS POSIX ACL support (XFS_POSIX_ACL) [Y/n/?] y
* XFS Realtime subvolume support (XFS_RT) [Y/n/?] y
* XFS Verbose Warnings (XFS_WARN) [N/y/?] n
*--
*Inotify support for userspace (INOTIFY_USER) [Y/n/?] y
*Filesystem wide access notification (FANOTIFY) [Y/n/?] y
* fanotify permissions checking (FANOTIFY_ACCESS_PERMISSIONS) [Y/n/?] y
*Quota support (QUOTA) [Y/?] y
*Report quota messages through netlink interface (QUOTA_NETLINK_INTERFACE) [Y/n/?] y
*Print quota warnings to console (OBSOLETE) (PRINT_QUOTA_WARNING) [N/y/?] n
*--
*torture tests for RCU (RCU_TORTURE_TEST) [N/m/y/?] n
*RCU CPU stall timeout in seconds (RCU_CPU_STALL_TIMEOUT) [60] 60
*Print additional diagnostics on RCU CPU stall (RCU_CPU_STALL_INFO) [N/y/?] n
*Enable tracing for RCU (RCU_TRACE) [N/y/?] n
*Force extended block device numbers and spread them (DEBUG_BLOCK_EXT_DEVT) [N/y/?] n
*Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] n
*--
* HOSTCC scripts/asn1_compiler
* CALL scripts/checksyscalls.sh
* CC init/main.o
* HOSTCC usr/gen_init_cpio
* ./scripts/gen_initramfs_list.sh: Cannot open '/var/tmp/genkernel/initramfs-3.14.43-std453-amd64.cpio'
*usr/Makefile:73: recipe for target 'usr/initramfs_data.cpio.gz' failed
*make[1]: *** [usr/initramfs_data.cpio.gz] Error 1
*Makefile:937: recipe for target 'usr' failed
*make: *** [usr] Error 2
*--
* Running with options: --install --integrated-initramfs --kernel-config=/proc/config.gz all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: Failed to compile the "bzImage" 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!
|
I am trying now the other one.
Thanks,
PC, |
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 4:09 pm Post subject: |
|
|
Now when I use the command
Code: |
emerge -lav bc
genkernel all
|
then the compilation finishes in short time.
Code: |
* Gentoo Linux Genkernel; Version 3.4.49.2
* Running with options: all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
* Linux Kernel 3.18.12-gentoo for x86_64...
* .. with config file /etc/kernels/kernel-config-x86_64-3.18.12-gentoo
* kernel: Using config from /etc/kernels/kernel-config-x86_64-3.18.12-gentoo
* Previous config backed up to .config--2015-06-04--07-21-50.bak
* kernel: >> Running mrproper...
* >> Running oldconfig...
* kernel: >> Cleaning...
* >> Compiling 3.18.12-gentoo bzImage...
* >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)...
* >> Compiling 3.18.12-gentoo modules...
* >> Generating module dependency data...
* Copying config for successful build to /etc/kernels/kernel-config-x86_64-3.18.12-gentoo
* busybox: >> Using cache
* initramfs: >> Initializing...
* >> Appending base_layout cpio data...
* >> Appending auxilary cpio data...
* >> Copying keymaps
* >> Appending busybox cpio data...
* >> Appending modules cpio data...
* >> Appending blkid cpio data...
* >> Appending modprobed cpio data...
* >> Appending linker cpio data...
* >> Finalizing cpio...
* >> Compressing cpio data (.xz)...
*
* Kernel compiled successfully!
*
* Required Kernel Parameters:
* root=/dev/$ROOT
*
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab
*
* If you require Genkernel's hardware detection features; you MUST
* tell your bootloader to use the provided INITRAMFS file.
* WARNING... WARNING... WARNING...
* Additional kernel cmdline arguments that *may* be required to boot properly...
* With support for several ext* filesystems available, it may be needed to
* add "rootfstype=ext3" or "rootfstype=ext4" to the list of boot parameters.
* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.
|
Thanks,
PC, |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jun 04, 2015 5:08 pm Post subject: |
|
|
@cwr
Quote: | bc was removed from the system set, but it's a dependency in at least the recent gentoo-sources. | Agreed
Quote: | Can you in fact get to a kernel building sitiuation without building bc? | Apparently you can; I have no idea what peculiar confluence of events is required. _________________ Defund the FCC. |
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 6:28 pm Post subject: |
|
|
I really dont understand, I mean I really followed every single step of the handbook and it is supposed to work. I am not doing anything different than the tutorials. Is is possible there is a bug of genkernel?
PC, |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jun 04, 2015 6:56 pm Post subject: |
|
|
Your last genkernel compile reported success. Are you still having problems? If so, what are they?
ls -l /boot should show a new kernel, initrd/initramfs, and system.map made in the last few hours.
My conclusion is not that there is a bug in genkernel. Instead it appears that bc was removed from your system and portage thought it was still installed. _________________ Defund the FCC. |
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 7:08 pm Post subject: |
|
|
I thought that compilation takes hours it was just 5 minutes. the total time for the three commands
Code: |
emerge --ask sys-kernel/gentoo-sources
emerger genkernel
genkernel all
|
was under 15 min. and my computer is not even that fast and good (i5 core duo).
That seemed to me weird. (Doesnt it look little bit suspicious?) I feel like something is not right.
By the way I didnt understand the part you are saying "removing bc". What is "bc" for?
PC, |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 7:47 pm Post subject: |
|
|
I see the kernel and other stuff under the /boot. I guess I need to search on it on my own little bit. (steep learning curve)
Thank you so much everybody for your kind answers though. I really appreciate.
Best wishes,
PC, |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jun 04, 2015 8:44 pm Post subject: |
|
|
Quote: | I see the kernel and other stuff under the /boot. | And were the times for them within the last few hours? Appropriate to the time you ran genkernel last?
if you ran e Code: | merge -1av bc
genkernel all | I'd expect it to take about 20 minutres. If you then ran: Code: | emerge --ask sys-kernel/gentoo-sources
emerge genkernel
genkernel all | I'd expect the second run to be much quicker. _________________ Defund the FCC. |
|
Back to top |
|
|
chiqui.paula n00b
Joined: 27 May 2015 Posts: 29
|
Posted: Thu Jun 04, 2015 9:41 pm Post subject: |
|
|
as I said I tried both different methods (perse`), both took less than 15 min even close to 10 min. However when I read the tutorials, handbooks etc., it is been told that it generally takes hours, that is why i deleted, everything and try to reload again. I am not sure that will solve the problem but again it just didnt make sense to me.
Thanks,
PC, |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Fri Jun 05, 2015 1:48 pm Post subject: |
|
|
It sounds as if you now have a working kernel, probably built before your last build attempt.
Five minutes seems about right for a kernel rebuild with no, or minor, changes. If you want
to know how long a full kernel rebuild run "cd /usr/src/linux ; make clean" to remove all your
old kernel build, and then run genkernel again. The script I use is:
Code: |
#!/bin/sh
# Build a Gentoo kernel.
# Clear the screen.
reset
# Note the start and finish times.
mv -f Build.time Build.time.last 2>/dev/null
echo Build started `date` >Build.time
# Use --no-install to stop the new kernel being copied to boot.
export TERM=xterm ; genkernel --no-clean --save-config --menuconfig all
echo Build ended `date` >>Build.time
# eof
|
I tend to have two kernels built - one working kernel, the first entry (default boot) in grub.conf
and the second a test kernel. You can distinguish between kernels by adding eg "-1" or "-2" to
their names with the CONFIG_LOCAL_VERSION configuration setting. The current configuration
is in /usr/src/linux/.config. so if you copy that to another file you can save a known-good configuration
for future use, and experiment with the test configuration without worrying about getting an unbootable
machine.
If you want to know what a program does, the first stop is manpages; "man whatever" should get
you at least some information on "whatever". "man man" explains the use of man, apropos and whatis,
related utilities. The next stop is the info pages, which I find hard to read - if you are running Gnome,
though, "yelp info:whatever" makes them useable.
Will |
|
Back to top |
|
|
archenroot Apprentice
Joined: 13 Dec 2011 Posts: 218 Location: Lake Macha, Czech republic
|
Posted: Sat Oct 28, 2017 7:20 pm Post subject: |
|
|
This nasty shit error happen when you have set-up CONFIG_INITRAMFS_SOURCE to some value && asking genkernel to pack initramfs to the kernel (aka making kernel selfbootable in UEFI mode)
In my case I had:
Code: | andromeda /usr/src/linux # cat .config |grep CONFIG_INITRAMFS_SOURCE
CONFIG_INITRAMFS_SOURCE="/var/tmp/genkernel/initramfs-4.12.4-gentoo.cpio" |
And this error occured as following:
Code: | andromeda /usr/src/linux # genkernel --menuconfig --install --integrated-initramfs --kernel-config=/proc/config.gz all
* Gentoo Linux Genkernel; Version 3.5.2.1
* Running with options: --menuconfig --install --integrated-initramfs --kernel-config=/proc/config.gz all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
* Linux Kernel 4.12.4-gentoo for x86_64...
* .. with config file /proc/config.gz
* kernel: Using config from /usr/src/linux/.config
* kernel: --mrproper is disabled; not running 'make mrproper'.
* >> Running oldconfig...
* kernel: >> Cleaning...
* kernel: >> Invoking menuconfig...
* >> Compiling 4.12.4-gentoo bzImage...
* ERROR: Failed to compile the "bzImage" target...
*
* -- Grepping log... --
*
* AS arch/x86/crypto/aes-x86_64-asm_64.o
* AS arch/x86/realmode/rm/wakeup_asm.o
* CC arch/x86/entry/vsyscall/vsyscall_gtod.o
* CC arch/x86/platform/efi/efi.o
* ./scripts/gen_initramfs_list.sh: Cannot open '/var/tmp/genkernel/initramfs-4.12.4-gentoo.cpio'
*make[1]: *** [usr/Makefile:55: usr/initramfs_data.cpio] Error 1
*make: *** [Makefile:1019: usr] Error 2
*--
* Running with options: --menuconfig --install --integrated-initramfs --kernel-config=/proc/config.gz all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: Failed to compile the "bzImage" 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!
*
|
setting the variable to:
Code: | CONFIG_INITRAMFS_SOURCE="" |
makes the kernel again compilable via:
_________________ Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force |
|
Back to top |
|
|
|