# genkernel failed to compile 4.20.4 kernel

## drudox

Fixed post title was genkernel failed to compile 4.20.1 kernel

genkernel says 4.20.4 -- NeddySeagoon

Hi all I have problem with genkernel .. after having set the menuconfig parameter it give me a lot of error :

```

 * Gentoo Linux Genkernel; Version 69

* Running with options: all --menuconfig

* 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.20.4-gentoo for x86_64...

* .. with config file /usr/share/genkernel/arch/x86_64/kernel-config

* kernel: Using config from /usr/share/genkernel/arch/x86_64/kernel-config

*         Previous config backed up to .config--2019-02-03--15-28-08.bak

* kernel: >> Running mrproper...

*         >> Running oldconfig...

* kernel: >> Cleaning...

* kernel: >> Invoking menuconfig...

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

* 

* -- Grepping log... --

* 

*  YACC    scripts/kconfig/zconf.tab.c

*  LEX     scripts/kconfig/zconf.lex.c

*  HOSTCC  scripts/kconfig/zconf.tab.o

*  HOSTLD  scripts/kconfig/conf

*scripts/kconfig/conf  --oldconfig Kconfig

*.config:307:warning: symbol value 'm' invalid for MICROCODE

*.config:407:warning: symbol value 'm' invalid for ACPI_CONTAINER

*.config:419:warning: symbol value 'm' invalid for CPU_FREQ_STAT

*.config:608:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP

*.config:609:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE

*.config:715:warning: symbol value 'm' invalid for NF_NAT_PROTO_UDPLITE

*.config:716:warning: symbol value 'm' invalid for NF_NAT_PROTO_SCTP

*.config:941:warning: symbol value 'm' invalid for RXKAD

*.config:2863:warning: symbol value 'm' invalid for RTC_LIB

*.config:2864:warning: symbol value 'm' invalid for RTC_CLASS

*--

*  Allow upgrading ACPI tables via initrd (ACPI_TABLE_UPGRADE) [Y/n/?] (NEW) 

*  Debug Statements (ACPI_DEBUG) [N/y/?] n

*  PCI slot detection driver (ACPI_PCI_SLOT) [N/y/?] n

*  Container and Module Devices (ACPI_CONTAINER) [Y/?] (NEW) y

*  Smart Battery System (ACPI_SBS) [N/m/y/?] n

*  Hardware Error Device (ACPI_HED) [N/m/y/?] n

*  Allow ACPI methods to be inserted/replaced at run time (ACPI_CUSTOM_METHOD) [N/m/y/?] (NEW) 

*  Boottime Graphics Resource Table support (ACPI_BGRT) [N/y/?] (NEW) 

*  ACPI NVDIMM Firmware Interface Table (NFIT) (ACPI_NFIT) [N/m/y/?] (NEW) 

*  ACPI Platform Error Interface (APEI) (ACPI_APEI) [N/y/?] n

*--

* Bus options (PCI etc.)

*

*PCI support (PCI) [Y/n/?] y

*  Support mmconfig PCI config space access (PCI_MMCONFIG) [Y/n/?] y

*PCI Express Port Bus support (PCIEPORTBUS) [Y/n/?] y

*  PCI Express Advanced Error Reporting support (PCIEAER) [Y/n/?] y

*    PCI Express error injection support (PCIEAER_INJECT) [N/m/y/?] n

*--

*Allow for memory compaction (COMPACTION) [Y/n/?] (NEW) 

*  Page migration (MIGRATION) [Y/?] (NEW) y

*Enable bounce buffers (BOUNCE) [Y/n/?] y

*Enable KSM for page merging (KSM) [N/y/?] n

*Low address space to protect from user allocation (DEFAULT_MMAP_MIN_ADDR) [4096] 4096

*Enable recovery from hardware memory errors (MEMORY_FAILURE) [N/y/?] n

*--

*  * Wireless

*  *

*  Wireless (WIRELESS) [Y/?] y

*    cfg80211 - wireless configuration API (CFG80211) [M/n/?] m

*      nl80211 testmode command (NL80211_TESTMODE) [N/y/?] n

*      enable developer warnings (CFG80211_DEVELOPER_WARNINGS) [N/y/?] n

*--

*  * Inter-FE based on IETF ForCES InterFE LFB

*  *

*  Inter-FE based on IETF ForCES InterFE LFB (NET_IFE) [N/m/y/?] (NEW) 

*  Network light weight tunnels (LWTUNNEL) [N/y/?] (NEW) 

*  Network physical/parent device Netlink interface (NET_DEVLINK) [N/m/y/?] (NEW) 

*  Generic failover module (FAILOVER) [N/m/y/?] (NEW) 

*--

*SCSI OnStream SC-x0 tape support (CHR_DEV_OSST) [M/n/y/?] m

*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

*Verbose SCSI error reporting (kernel size += 36K) (SCSI_CONSTANTS) [N/y/?] n

*--

*OSD-Initiator library (SCSI_OSD_INITIATOR) [N/m/y/?] n

*

* Serial ATA and Parallel ATA drivers (libata)

*

*Serial ATA and Parallel ATA drivers (libata) (ATA) [M/n/y/?] m

*  Verbose ATA error reporting (ATA_VERBOSE_ERROR) [Y/n/?] y

*--

*      Enable full debugging output in iwlegacy (iwl 3945/4965) drivers (IWLEGACY_DEBUG) [N/y/?] (NEW) 

*      Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)  (IWLWIFI) [M/n/?] m

*        Intel Wireless WiFi DVM Firmware support (IWLDVM) [N/m/?] (NEW) 

*        Intel Wireless WiFi MVM Firmware support (IWLMVM) [N/m/?] (NEW) 

*        *

*        * WARNING: iwlwifi is useless without IWLDVM or IWLMVM

*--

*  * Enable WiMAX (Networking options) to see the WiMAX drivers

*  *

*  VMware VMXNET3 ethernet driver (VMXNET3) [N/m/y/?] n

*  FUJITSU Extended Socket Network Device driver (FUJITSU_ES) [N/m/y/?] (NEW) 

*  Simulated networking device (NETDEVSIM) [N/m/y/?] (NEW) 

*  Failover driver (NET_FAILOVER) [N/m/y/?] (NEW) 

*--

*AMD GPU (DRM_AMDGPU) [N/m/?] (NEW) 

*Nouveau (NVIDIA) cards (DRM_NOUVEAU) [N/m/?] (NEW) 

*Intel 8xx/9xx/G3x/G4x/HD Graphics (DRM_I915) [M/n/?] m

*  Enable alpha quality support for new Intel hardware by default (DRM_I915_ALPHA_SUPPORT) [N/y/?] (NEW) 

*  Enable capturing GPU state following a hang (DRM_I915_CAPTURE_ERROR) [Y/n/?] (NEW) 

*    Compress GPU error state (DRM_I915_COMPRESS_ERROR) [Y/n/?] (NEW) 

*--

*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 online metadata check support (XFS_ONLINE_SCRUB) [N/y/?] (NEW) 

*  XFS Verbose Warnings (XFS_WARN) [N/y/?] (NEW) 

*--

*Dnotify support (DNOTIFY) [Y/n/?] y

*Inotify support for userspace (INOTIFY_USER) [Y/n/?] y

*Filesystem wide access notification (FANOTIFY) [N/y/?] (NEW) 

*Quota support (QUOTA) [Y/?] y

*Report quota messages through netlink interface (QUOTA_NETLINK_INTERFACE) [N/y/?] n

*Print quota warnings to console (OBSOLETE) (PRINT_QUOTA_WARNING) [Y/n/?] y

*--

*Enable tracing for RCU (RCU_TRACE) [N/y/?] n

*Provide debugging asserts for adding NO_HZ support to an arch (RCU_EQS_DEBUG) [N/y/?] (NEW) 

*Force round-robin CPU selection for unbound work items (DEBUG_WQ_FORCE_RR_CPU) [N/y/?] (NEW) 

*Force extended block device numbers and spread them (DEBUG_BLOCK_EXT_DEVT) [N/y/?] n

*Enable CPU hotplug state control (CPU_HOTPLUG_STATE_CONTROL) [N/y/?] (NEW) 

*Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] (NEW) 

*--

*  HOSTCC  scripts/kconfig/conf.o

*  HOSTLD  scripts/kconfig/conf

*scripts/kconfig/conf  --syncconfig Kconfig

*You are building kernel with non-retpoline compiler.

*Please update your compiler.

*make: *** [arch/x86/Makefile:304: checkbin] Error 1

*--

* Running with options: all --menuconfig

* 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 "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 bug

```

I don't have idea how to fix it

----------

## fedeliallalinea

```
*scripts/kconfig/conf  --syncconfig Kconfig

*You are building kernel with non-retpoline compiler.

*Please update your compiler. 
```

What gcc version you use to compile?

Probably a version <7.3, then or you update your gcc or you should remove CONFIG_RETPOLINE=n config.

The best solution is set gcc-7.3 as compiler

----------

## drudox

oh right i will , what do you think about the .config file ? I have to re set all the things with menuconfing or you think that the config file has been saved ?

----------

## NeddySeagoon

drudox,

The config has been save but genkernel --all wil overwrite it.

There is a genkernel option to tell it to use the existing .config file.

----------

## drudox

oh thanks 

and where is stored the config file ? /usr/src/linux/.config ? is this one ?

----------

## NeddySeagoon

drudox,

That's the config you need to save.

Your genkernel output says

```
* kernel: Using config from /usr/share/genkernel/arch/x86_64/kernel-config

*         Previous config backed up to .config--2019-02-03--15-28-08.bak 
```

Do you have a time machine ... 2019-02-03  That's February 3rd.

Your clock is in a mess.

Fix that before you do anything else. As your clock is going to take a step backwards, make is going to get very confused.

You must run make clean in the kernel tree after you fix your clock and before you try to build the kernel again.

----------

## drudox

I have fixed and run make clean ... after have change the saving time of the make files that was setting to the future :"D 

now how can i run genkernel to using the old config ?

----------

## NeddySeagoon

drudox,

Yes. 

You will need to read the genkernel man page to find out the option to use the existing config file.

----------

## drudox

I have a problem with genkernel ... now it is going to lock after running cleaning ... 

I have also tried to run simple 

```
genkernel all 
```

 but he always not compile the 4.20.4 kernel

this is the output :

```

* Gentoo Linux Genkernel; Version 69 

* Running with options: --kernel-config=/usr/src/linux-4.14.30-gentoo/.config 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.20.4-gentoo for x86_64... 

* .. with config file /usr/src/linux-4.14.30-gentoo/.config 

* kernel: Using config from /usr/src/linux-4.14.30-gentoo/.config 

*         Previous config backed up to .config--2019-01-27--12-16-41.bak 

* kernel: >> Running mrproper... 

*         >> Running oldconfig... 

* kernel: >> Cleaning... 

```

----------

## drudox

oh I'm sorry .. using new emerged gentoo-sources the kernel going to compile!

----------

