Symptom: make[2]: Entering directory '/usr/src/kernels/5.17.1-1.el8.elrepo.x86_64' Makefile:729: target 'include/config/auto.conf' does not exist test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) Makefile:1717: target 'prepare' does not exist if [ "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)" != ""gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)"" ]; then \ echo >&2 "warning: the compiler differs from the one used to build the kernel"; \ echo >&2 " The kernel was built by: "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)""; \ echo >&2 " You are using: gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)"; \ fi /bin/sh: -c: line 0: syntax error near unexpected token `(' /bin/sh: -c: line 0: `if [ "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)" != ""gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)"" ]; then \' make[2]: *** [Makefile:1717: prepare] Error 1 make[2]: Leaving directory '/usr/src/kernels/5.17.1-1.el8.elrepo.x86_64' Note the double double-quotes in the GCC Version comparison ! This happens to me when I try to compile vmware kernel modules with mainline kernel from elrepo on AlamLinux8. Since it is coming from the Makefile of the Kernel, I suppose this is the proper upstream tracker to be used. Please advise if not. This is the potion of the Makefile that fails (line 1717..) : prepare: @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \ echo >&2 "warning: the compiler differs from the one used to build the kernel"; \ echo >&2 " The kernel was built by: $(CONFIG_CC_VERSION_TEXT)"; \ echo >&2 " You are using: $(CC_VERSION_TEXT)"; \ fi I don't know where CONFIG_CC_VERSION_TEXT is defined. Which apparently contains "...", but shouldn't.
Hi, thanks for reporting the issue. > if [ "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)" != ""gcc (GCC) 8.5.0 > 20210514 (Red Hat 8.5.0-4)"" ]; then \ > echo >&2 "warning: the compiler differs from the one used to build > the kernel"; \ > echo >&2 " The kernel was built by: "gcc (GCC) 8.5.0 20210514 (Red > Hat 8.5.0-4)""; \ > echo >&2 " You are using: gcc (GCC) 8.5.0 20210514 (Red > Hat 8.5.0-4)"; \ > fi > /bin/sh: -c: line 0: syntax error near unexpected token `(' > /bin/sh: -c: line 0: `if [ "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)" != > ""gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)"" ]; then \' > make[2]: *** [Makefile:1717: prepare] Error 1 > make[2]: Leaving directory '/usr/src/kernels/5.17.1-1.el8.elrepo.x86_64' > > > Note the double double-quotes in the GCC Version comparison ! this should not happen (since v5.17-rc2) as commit 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf", 2021-12-14) removes double quotes from `include/config/auto.conf`. Do you still hit this issue? Kind regards, Nicolas