Hi,
With updated kernel in SL7 (and I assume CentOS7 and RHEL7) 3.10.0-693.21.1.el7.x86_64 drivers (and tools on linux guest) no longer compile.
Looks like it is due to REPTOLINE kernel changes.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/3.10.0-693.21.1.el7.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j12 modules
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Toolchain update recommended.. Stop.
make: *** [vboxdrv] Error 2
I can reboot in previous kernel as a workaround.
Any other suggestions.
Thanks,
GZU
[Solved] Tools and Drivers do not compile on SL7
[Solved] Tools and Drivers do not compile on SL7
Last edited by socratis on 13. May 2018, 17:53, edited 1 time in total.
Reason: Marked as [Solved].
Reason: Marked as [Solved].
-
- Volunteer
- Posts: 1631
- Joined: 25. May 2010, 23:48
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation
Re: Tools and Drivers do not compile on SL7
If you want to add modules into a kernel that is built with retpoline support then you will need to follow the advice of the error message and update your toolchain to a version that does.
-Andy.
-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
-
- Posts: 1
- Joined: 9. Mar 2018, 13:40
Re: Tools and Drivers do not compile on SL7
I happen to have the same issue. I have just install SL7.4 I updated what came across but nothing changed.
Re: Tools and Drivers do not compile on SL7
Hi,
No Issues in SL6, there is a difference in the Makefile regarding SPECTRE.
SL6 reports issue and continues.
/lib/modules/3.10.0-693.21.1.el7.x86_64/build/arch/x86/Makefile
See commented out SL7 (at line 166) and inserted SL6, and rerun /sbin/vboxconfig.
This is a hack so on your own head be it (or use previous kernel).
GZU
No Issues in SL6, there is a difference in the Makefile regarding SPECTRE.
SL6 reports issue and continues.
/lib/modules/3.10.0-693.21.1.el7.x86_64/build/arch/x86/Makefile
See commented out SL7 (at line 166) and inserted SL6, and rerun /sbin/vboxconfig.
This is a hack so on your own head be it (or use previous kernel).
Code: Select all
# Avoid indirect branches in kernel to deal with Spectre
#ifdef CONFIG_RETPOLINE
# RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
# ifneq ($(RETPOLINE_CFLAGS),)
# KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
# else
# $(error CONFIG_RETPOLINE=y, but not supported by the compiler. Toolchain update recommended.)
# endif
#endif
# Avoid indirect branches in kernel to deal with Spectre
ifdef CONFIG_RETPOLINE
RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
ifneq ($(RETPOLINE_CFLAGS),)
KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
else
# Fail brew build, but let other users proceed with warning
RETPOLINE_MSG := CONFIG_RETPOLINE=y, but not supported by the compiler. Toolchain update recommended.
KBUILD_USER := $(shell id -un)
ifeq ($(KBUILD_USER), mockbuild)
$(error $(RETPOLINE_MSG))
else
$(warning $(RETPOLINE_MSG))
endif
endif
endif
GZU
Re: Tools and Drivers do not compile on SL7
I'm running CentOS 7.4. Host is running windows 10 pro.
After a CentOS system update (automatic), display went back to low resolution. I tried to rebuild guest addition 5.2.8 and got the same error: CONFIG_RETPOLINE=y....upgrade compiler. I first upgraded make to v4.2.1 (was v3.8.2). This didn't help much.
I then upgraded the compiler to gcc v8.1 (was v6.1) and virtual box & guest addition to 5.2.12, the problem went away. There is a post saying RETPOLINE is supported by gcc v7.3 and later.
This took me quite a while. Hope it's useful to someone.
After a CentOS system update (automatic), display went back to low resolution. I tried to rebuild guest addition 5.2.8 and got the same error: CONFIG_RETPOLINE=y....upgrade compiler. I first upgraded make to v4.2.1 (was v3.8.2). This didn't help much.
I then upgraded the compiler to gcc v8.1 (was v6.1) and virtual box & guest addition to 5.2.12, the problem went away. There is a post saying RETPOLINE is supported by gcc v7.3 and later.
This took me quite a while. Hope it's useful to someone.
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Tools and Drivers do not compile on SL7
@Jim1742
Thank you for the feedback and the solution, hope someone finds it useful in the future. Marking as [Solved].
Thank you for the feedback and the solution, hope someone finds it useful in the future. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.