RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1566297 - Compilation error with kernel-3.10.0-867, CONFIG_RETPOLINE=y, but not supported by the compiler
Summary: Compilation error with kernel-3.10.0-867, CONFIG_RETPOLINE=y, but not support...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-12 01:53 UTC by xhe@redhat.com
Modified: 2022-06-28 13:25 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-10 13:16:52 UTC
Target Upstream Version:
Embargoed:
xhe: needinfo-


Attachments (Terms of Use)

Description xhe@redhat.com 2018-04-12 01:53:32 UTC
Description of problem:
Compilation error with kernel-3.10.0-867, CONFIG_RETPOLINE=y, but not supported by the compiler

Version-Release number of selected component (if applicable):
kernel-3.10.0-867
RHEL-7.4

How reproducible:
often

Steps to Reproduce:
1. 
2.
3.

Actual results:
************* snip ************
Create a temporary build directory: /mnt/tests/kernel/storage/fcoe-sw/libfc_test/build
INFO: [2018-04-11 10:58:26] Running: 'rpm -ql kernel-kernel-storage-fcoe-sw-libfc_test|grep libfc_test.c'...
/mnt/tests/kernel/storage/fcoe-sw/libfc_test/libfc_test.c
Copy libfc_test.c to the bild directory: /mnt/tests/kernel/storage/fcoe-sw/libfc_test/build
Copy Makefile to the bild directory: /mnt/tests/kernel/storage/fcoe-sw/libfc_test/build
INFO: [2018-04-11 10:58:26] Running: 'make -C /lib/modules/`uname -r`/build M=/mnt/tests/kernel/storage/fcoe-sw/libfc_test/build modules'...
make[1]: Entering directory `/usr/src/kernels/3.10.0-867.el7.x86_64'
make[1]: Leaving directory `/usr/src/kernels/3.10.0-867.el7.x86_64'
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..  Stop.
FAIL - Unable to build module of libfc_test!
INFO: [2018-04-11 10:58:27] Running: 'cd /mnt/tests/kernel/storage/fcoe-sw/libfc_test/build && modinfo libfc_test.ko'...
modinfo: ERROR: Module libfc_test.ko not found.
INFO: [2018-04-11 10:58:27] Running: 'lsmod|grep libfc_test'...

Delete the temporary build directory: /mnt/tests/kernel/storage/fcoe-sw/libfc_test/build
Test failed
INFO: log_submit() - /tmp/fc_fcoe_libfc_test.py_20180411105759.log uploaded successfully
*******************************
this is the full console file 
http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2018/04/24201/2420112/5027798/70522078/TESTOUT.log

Expected results:
No error occurs when I build the mobile with make

Additional info:

Comment 2 Michael Petlan 2018-04-12 13:42:42 UTC
Which compiler?

Comment 3 xhe@redhat.com 2018-04-13 01:33:58 UTC
[root@storageqe-16 libfc_test]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)

Comment 4 xhe@redhat.com 2018-04-13 01:57:40 UTC
on gcc 4.8.5-28.el7 (kernel-3.10.0-862.el7) it works, here is the PASSed result in my beaker job http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2018/04/24055/2405555/4997438/70142193/TESTOUT.log
the beaker job is https://beaker.engineering.redhat.com/recipes/4997438#task70142188

Comment 7 Marek Polacek 2018-04-13 13:11:27 UTC
You have to use gcc-4.8.5-28.el7 or newer; older gccs don't support -mindirect-branch= yet.  Not a bug.

Comment 8 Michael Petlan 2018-04-13 13:49:43 UTC
Indeed.

Retpolines are supported in latest RHEL-7.5 gcc:
gcc-4.8.5-28.el7

And in the following z-streams:
gcc-4.8.5-16.el7_4.2
gcc-4.8.5-11.el7_3.1
gcc-4.8.5-4.el7_2.1

Btw. rather than `gcc -v` do `rpm -q gcc` which will show the z-stream suffix too.
You should be able to rebuild the kernel with 4.8.5-16 too, but you need to have
the latest z-stream update.

Comment 9 David Sommerseth 2018-07-24 11:42:49 UTC
I'm a bit at loss here, because I see exactly this issue myself on an up-to-date RHEL7.

user@host /usr/src/kernels/3.10.0-862.9.1.el7.x86_64  $ rpm -q redhat-release-server gcc
redhat-release-server-7.5-8.el7.x86_64
gcc-4.8.5-28.el7_5.1.x86_64
user@host /usr/src/kernels/3.10.0-862.9.1.el7.x86_64  $ make
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..  Stop.


I've also tried devtoolset-7:
user@host /usr/src/kernels/3.10.0-862.9.1.el7.x86_64  $ scl enable devtoolset-7
user@host /usr/src/kernels/3.10.0-862.9.1.el7.x86_64  $ rpm -q devtoolset-7-gcc
devtoolset-7-gcc-7.3.1-5.10.el7.x86_64
$ which gcc
/opt/rh/devtoolset-7/root/usr/bin/gcc
$ gcc --version | head -n1
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
/usr/src/kernels/3.10.0-862.9.1.el7.x86_64  $ make
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..  Stop.

I might do something completely wrong and stupid ... but I'm not able to see my mistake now.

Comment 10 Michael Savisko 2018-07-31 08:48:09 UTC
I have the same problem on my Red Hat Enterprise Linux Server 7.5:

[root@r-arch-host11 rshim]# rpm -q gcc
gcc-4.8.5-28.el7.x86_64

[root@r-arch-host11 rshim]# uname -r
3.10.0-862.el7.x86_64

[root@r-arch-host11 rshim]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.5 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.5"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.5 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.5:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.5
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.5"

[root@r-arch-host11 rshim]# make -C /lib/modules/`uname -r`/build M=$PWD modules_install
make: Entering directory `/usr/src/kernels/3.10.0-862.el7.x86_64'
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..  Stop.
make: Leaving directory `/usr/src/kernels/3.10.0-862.el7.x86_64'
[root@r-arch-host11 rshim]#

Comment 11 Michael Savisko 2018-07-31 09:29:00 UTC
Sorry, my latest comment is irrelevant - this was an installation issue, not compilation.

Comment 12 Michael Petlan 2018-07-31 09:36:02 UTC
(In reply to Michael Savisko from comment #10)
> I have the same problem on my Red Hat Enterprise Linux Server 7.5:
> 
> [root@r-arch-host11 rshim]# rpm -q gcc
> gcc-4.8.5-28.el7.x86_64
> 
You need the latest 7.5 z-stream update of gcc: 
gcc-4.8.5-28.el7_5.1.x86_64

Comment 13 Michael Petlan 2018-07-31 10:57:11 UTC
I am trying to rebuild kernel-3.10.0-862.9.1.el7.src.rpm with gcc-4.8.5-28.el7_5.1.el7.x86_64 and it seems to build just fine.

Comment 14 Akemi Yagi 2018-08-03 00:08:48 UTC
When I tried to build the kmod-kvdo package from the src.rpm downloaded using yum, I saw exactly the same error message:

arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..  Stop.

I'm using gcc-4.8.5-28.el7_5.1.x86_64 which is retpoline-aware.

(Note that there is no problem building the kernel.)

Comment 15 Akemi Yagi 2018-08-04 02:56:04 UTC
My issue was somewhere else. Once the build environment was adjusted, there was no error. Sorry for the noise.

Comment 16 Marek Polacek 2018-08-10 13:16:52 UTC
Closing again.

Comment 19 fei2.wang 2022-06-28 10:44:59 UTC
@Akemi Yagi @Michael Savisko

Could u please be more specific about the "build environment was adjusted" "this was an installation issue, not compilation."? We are experiencing the same failure on CentOS 7.9 and GCC version is already gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) that supports retpoline and it is the only gcc that has been installed.


Note You need to log in before you can comment on or make changes to this bug.