Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionEdjunior Barbosa Machado
2020-07-27 13:59:38 UTC
Created attachment 1702540[details]
full rpmbuild output on s390x
Description of problem:
rpmbuild kernel-4.18.0-221.el8.src.rpm on s390x fails with the following errors:
(...)
+ make 'HOSTCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' -s ARCH=s390 oldnoconfig
+ make 'HOSTCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' -s ARCH=s390 V=1 -j2 KCFLAGS= WITH_GCOV=0 bzImage
./arch/s390/include/asm/jump_label.h: Assembler messages:
./arch/s390/include/asm/jump_label.h:22: Error: junk at end of line, first unrecognized character is `('
make[2]: *** [scripts/Makefile.build:315: init/main.o] Error 1
make[1]: *** [Makefile:1072: init] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from ././include/linux/compiler_types.h:58,
from <command-line>:
arch/s390/pci/pci.c: In function 'pci_iounmap':
./include/linux/compiler-gcc.h:305:38: error: invalid 'asm': invalid expression - try using an output modifier
305 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
./arch/s390/include/asm/jump_label.h:33:2: note: in expansion of macro 'asm_volatile_goto'
33 | asm_volatile_goto("0: brcl 15, %l[label]\n"
| ^~~~~~~~~~~~~~~~~
./include/linux/compiler-gcc.h:305:38: error: invalid 'asm': invalid expression - try using an output modifier
305 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
./arch/s390/include/asm/jump_label.h:33:2: note: in expansion of macro 'asm_volatile_goto'
33 | asm_volatile_goto("0: brcl 15, %l[label]\n"
| ^~~~~~~~~~~~~~~~~
./arch/s390/include/asm/jump_label.h: Assembler messages:
./arch/s390/include/asm/jump_label.h:36: Warning: zero assumed for missing expression
./arch/s390/include/asm/jump_label.h:36: Warning: zero assumed for missing expression
make[3]: *** [scripts/Makefile.build:315: arch/s390/pci/pci.o] Error 1
make[2]: *** [scripts/Makefile.build:556: arch/s390/pci] Error 2
make[2]: *** Waiting for unfinished jobs....
arch/s390/kernel/ftrace.c: In function 'prepare_ftrace_return':
arch/s390/kernel/ftrace.c:188:43: error: taking address of packed member of 'struct ftrace_graph_ent' may result in an unaligned pointer value [-Werror=address-of-packed-member]
188 | if (ftrace_push_return_trace(parent, ip, &trace.depth, 0,
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:315: arch/s390/kernel/ftrace.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:556: arch/s390/kernel] Error 2
make[1]: *** [Makefile:1072: arch/s390] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7fn2LE (%build)
Version-Release number of selected component (if applicable):
gcc-toolset-10-binutils-2.35-3.el8.s390x
gcc-toolset-10-gcc-10.1.1-1.1.el8.s390x
RHEL-8.3.0-20200701.2
Steps to Reproduce:
1. rpm -ivh kernel-4.18.0-221.el8.src.rpm
2. yum-builddep -y --nobest rpmbuild/SPECS/kernel.spec
3. CC=/opt/rh/gcc-toolset-10/root/usr/bin/gcc rpmbuild -bb --target=s390x --clean rpmbuild/SPECS/kernel.spec
Comment 3Edjunior Barbosa Machado
2020-07-27 14:04:02 UTC
FWIW, an error similar to "taking address of packed member of 'struct ftrace_graph_ent' may result in an unaligned pointer value" was also seen when building rhel-8.3 kernel on x86_64 (bug #1860933).
Comment 4Edjunior Barbosa Machado
2020-07-27 14:28:14 UTC
(In reply to Edjunior Barbosa Machado from comment #0)
> Steps to Reproduce:
> 1. rpm -ivh kernel-4.18.0-221.el8.src.rpm
> 2. yum-builddep -y --nobest rpmbuild/SPECS/kernel.spec
> 3. CC=/opt/rh/gcc-toolset-10/root/usr/bin/gcc rpmbuild -bb --target=s390x
> --clean rpmbuild/SPECS/kernel.spec
Forgot to mention that you should have gcc-toolset-10 enabled beforehand with:
# scl enable gcc-toolset-10 bash
error: taking address of packed member of... is a kernel bug as in bug #1860933.
./arch/s390/include/asm/jump_label.h:22: Error: junk at end of line, first unrecognized character is `('
didn't work with GCC 9, either. I believe we'd need this kernel patch to fix it:
commit 146448524bddbf6dfc62de31957e428de001cbda
Author: Ilya Leoshkevich <iii.com>
Date: Wed Feb 6 12:35:58 2019 +0100
s390/jump_label: Use "jdd" constraint on gcc9
[heiko.carstens.com]:
-----
Laura Abbott reported that the kernel doesn't build anymore with gcc 9,
due to the "X" constraint. Ilya provided the gcc 9 patch "S/390:
Introduce jdd constraint" which introduces the new "jdd" constraint
which fixes this.
-----
The support for section anchors on S/390 introduced in gcc9 has changed
the behavior of "X" constraint, which can now produce register
references. Since existing constraints, in particular, "i", do not fit
the intended use case on S/390, the new machine-specific "jdd"
constraint was introduced. This patch makes jump labels use "jdd"
constraint when building with gcc9.
Reported-by: Laura Abbott <labbott>
Signed-off-by: Ilya Leoshkevich <iii.com>
Signed-off-by: Heiko Carstens <heiko.carstens.com>
Signed-off-by: Martin Schwidefsky <schwidefsky.com>
Not a gcc bug though.
Created attachment 1702540 [details] full rpmbuild output on s390x Description of problem: rpmbuild kernel-4.18.0-221.el8.src.rpm on s390x fails with the following errors: (...) + make 'HOSTCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' -s ARCH=s390 oldnoconfig + make 'HOSTCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' -s ARCH=s390 V=1 -j2 KCFLAGS= WITH_GCOV=0 bzImage ./arch/s390/include/asm/jump_label.h: Assembler messages: ./arch/s390/include/asm/jump_label.h:22: Error: junk at end of line, first unrecognized character is `(' make[2]: *** [scripts/Makefile.build:315: init/main.o] Error 1 make[1]: *** [Makefile:1072: init] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from ././include/linux/compiler_types.h:58, from <command-line>: arch/s390/pci/pci.c: In function 'pci_iounmap': ./include/linux/compiler-gcc.h:305:38: error: invalid 'asm': invalid expression - try using an output modifier 305 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ^~~ ./arch/s390/include/asm/jump_label.h:33:2: note: in expansion of macro 'asm_volatile_goto' 33 | asm_volatile_goto("0: brcl 15, %l[label]\n" | ^~~~~~~~~~~~~~~~~ ./include/linux/compiler-gcc.h:305:38: error: invalid 'asm': invalid expression - try using an output modifier 305 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ^~~ ./arch/s390/include/asm/jump_label.h:33:2: note: in expansion of macro 'asm_volatile_goto' 33 | asm_volatile_goto("0: brcl 15, %l[label]\n" | ^~~~~~~~~~~~~~~~~ ./arch/s390/include/asm/jump_label.h: Assembler messages: ./arch/s390/include/asm/jump_label.h:36: Warning: zero assumed for missing expression ./arch/s390/include/asm/jump_label.h:36: Warning: zero assumed for missing expression make[3]: *** [scripts/Makefile.build:315: arch/s390/pci/pci.o] Error 1 make[2]: *** [scripts/Makefile.build:556: arch/s390/pci] Error 2 make[2]: *** Waiting for unfinished jobs.... arch/s390/kernel/ftrace.c: In function 'prepare_ftrace_return': arch/s390/kernel/ftrace.c:188:43: error: taking address of packed member of 'struct ftrace_graph_ent' may result in an unaligned pointer value [-Werror=address-of-packed-member] 188 | if (ftrace_push_return_trace(parent, ip, &trace.depth, 0, | ^~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [scripts/Makefile.build:315: arch/s390/kernel/ftrace.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:556: arch/s390/kernel] Error 2 make[1]: *** [Makefile:1072: arch/s390] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.7fn2LE (%build) Version-Release number of selected component (if applicable): gcc-toolset-10-binutils-2.35-3.el8.s390x gcc-toolset-10-gcc-10.1.1-1.1.el8.s390x RHEL-8.3.0-20200701.2 Steps to Reproduce: 1. rpm -ivh kernel-4.18.0-221.el8.src.rpm 2. yum-builddep -y --nobest rpmbuild/SPECS/kernel.spec 3. CC=/opt/rh/gcc-toolset-10/root/usr/bin/gcc rpmbuild -bb --target=s390x --clean rpmbuild/SPECS/kernel.spec