Bug 2044523
| Summary: | OpenBLAS build error with gcc toolset10 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | rajis | ||||||||||||
| Component: | binutils | Assignee: | Nick Clifton <nickc> | ||||||||||||
| binutils sub component: | gcc-toolset-10 | QA Contact: | Miloš Prchlík <mprchlik> | ||||||||||||
| Status: | CLOSED ERRATA | Docs Contact: | |||||||||||||
| Severity: | medium | ||||||||||||||
| Priority: | unspecified | CC: | bergner, dsmith, fweimer, lkuprova, mcermak, mnewsome, mpolacek, mprchlik, ohudlick, sipoyare | ||||||||||||
| Version: | 8.5 | Keywords: | Bugfix, Triaged | ||||||||||||
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
||||||||||||
| Target Release: | 8.5 | ||||||||||||||
| Hardware: | ppc64le | ||||||||||||||
| OS: | Linux | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Fixed In Version: | gcc-toolset-10-binutils-2.35-11.el8 | Doc Type: | No Doc Update | ||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||
| Clone Of: | |||||||||||||||
| : | 2044948 (view as bug list) | Environment: | |||||||||||||
| Last Closed: | 2022-05-10 14:04:30 UTC | Type: | Bug | ||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||
| Documentation: | --- | CRM: | |||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||
| Embargoed: | |||||||||||||||
| Bug Depends On: | |||||||||||||||
| Bug Blocks: | 2044948 | ||||||||||||||
| Attachments: |
|
||||||||||||||
This is a binutils problem; I've run into this before.
This happens when using newer binutils; with newer binutils we generate
dcbt 0,9,16
when building a file in libbacktrace; with older binutils:
dcbt 0,9
So clearly gas doesn't grok the first. I suspect that it's because
gcc-toolset-10-gas doesn't have this patch?
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=97bf40d859ffe44892b3ad2c62f011fd26fca699
In my previous comment I mentioned libbacktrace, but I just verified this is the same issue: # gcc -S q.C -o- .file "q.C" .machine power8 .abiversion 2 .section ".text" .align 2 .globl main .type main, @function main: .LFB0: .cfi_startproc std 31,-8(1) stdu 1,-64(1) .cfi_def_cfa_offset 64 .cfi_offset 31, -8 mr 31,1 .cfi_def_cfa_register 31 ld 9,32(31) dcbt 0,9,16 <= here [...] OK, I will import the patch to GTS-10. GTS-11 also needs a fix, so I will clone this BZ for that. Fixed in gcc-toolset-10-binutils-2.35-10.el8 Reproducer shown in description fails even with gcc-toolset-10-binutils-2.35-10.el8:
$ scl enable gcc-toolset-10 bash
$
$ cat t.c
#include <stdio.h>
int main() {
float *a;
__builtin_prefetch(a, 0, 0);
return 0;
}
[root@ibm-p9z-23-lp8 ~]# gcc -S -c t.c -o-
.file "t.c"
.machine power8
.abiversion 2
.section ".text"
.align 2
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
std 31,-8(1)
stdu 1,-64(1)
.cfi_def_cfa_offset 64
.cfi_offset 31, -8
mr 31,1
.cfi_def_cfa_register 31
ld 9,32(31)
dcbt 0,9,16
li 9,0
mr 3,9
addi 1,31,64
.cfi_def_cfa 1, 0
ld 31,-8(1)
blr
.long 0
.byte 0,0,0,0,128,1,0,1
.cfi_endproc
.LFE0:
.size main,.-main
.ident "GCC: (GNU) 10.3.1 20210422 (Red Hat 10.3.1-1)"
.section .note.GNU-stack,"",@progbits
$
$
$ type gcc
gcc is hashed (/opt/rh/gcc-toolset-10/root/usr/bin/gcc)
$ type as
as is /opt/rh/gcc-toolset-10/root/usr/bin/as
$ rpm -qf /opt/rh/gcc-toolset-10/root/usr/bin/as
gcc-toolset-10-binutils-2.35-10.el8.ppc64le
$ rpm -qf /opt/rh/gcc-toolset-10/root/usr/bin/gcc
gcc-toolset-10-gcc-10.3.1-1.2.el8_5.ppc64le
$
$
$ gcc -v -c t.c
Using built-in specs.
COLLECT_GCC=gcc
Target: ppc64le-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/gcc-toolset-10/root/usr --mandir=/opt/rh/gcc-toolset-10/root/usr/share/man --infodir=/opt/rh/gcc-toolset-10/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-targets=powerpcle-linux --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-10.3.1-20210422/obj-ppc64le-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --enable-secureplt --with-long-double-128 --with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 --build=ppc64le-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.3.1 20210422 (Red Hat 10.3.1-1) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=power8' '-mcpu=power8'
/opt/rh/gcc-toolset-10/root/usr/libexec/gcc/ppc64le-redhat-linux/10/cc1 -quiet -v t.c -msecure-plt -quiet -dumpbase t.c -mtune=power8 -mcpu=power8 -auxbase t -version -o /tmp/ccYMLfrH.s
GNU C17 (GCC) version 10.3.1 20210422 (Red Hat 10.3.1-1) (ppc64le-redhat-linux)
compiled by GNU C version 10.3.1 20210422 (Red Hat 10.3.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.16.1-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/opt/rh/gcc-toolset-10/root/usr/lib/gcc/ppc64le-redhat-linux/10/include-fixed"
ignoring nonexistent directory "/opt/rh/gcc-toolset-10/root/usr/lib/gcc/ppc64le-redhat-linux/10/../../../../ppc64le-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/ppc64le-redhat-linux/10/include
/usr/local/include
/opt/rh/gcc-toolset-10/root/usr/include
/usr/include
End of search list.
GNU C17 (GCC) version 10.3.1 20210422 (Red Hat 10.3.1-1) (ppc64le-redhat-linux)
compiled by GNU C version 10.3.1 20210422 (Red Hat 10.3.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.16.1-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f8a6b71d6ea91bb71d6a1ba9c03b64ad
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=power8' '-mcpu=power8'
as -v -a64 -mpower8 -many -mlittle -o t.o /tmp/ccYMLfrH.s
GNU assembler version 2.35 (ppc64le-redhat-linux) using BFD version version 2.35-10.el8
/tmp/ccYMLfrH.s: Assembler messages:
/tmp/ccYMLfrH.s:18: Error: junk at end of line: `16'
$
Also, rebuild of openblas-0.3.12-1.el8.src.rpm with gcc-toolset-10 enabled fails, I suppose this is also expected:
[[ "../kernel/power/../arm/znrm2.c" == *.S ]] && CFLAGS="-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 -mcpu=power8 -mtune=power8 -funwind-tables -fstack-clash-protection -fPIC -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=128 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.12\" -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=cnrm2_k -DASMFNAME=cnrm2_k_ -DNAME=cnrm2_k_ -DCNAME=cnrm2_k -DCHAR_NAME=\"cnrm2_k_\" -DCHAR_CNAME=\"cnrm2_k\" -DNO_AFFINITY -I.. -UDOUBLE -DCOMPLEX -Wa,--generate-missing-build-notes=yes" || CFLAGS="-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 -mcpu=power8 -mtune=power8 -funwind-tables -fstack-clash-protection -fPIC -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=128 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.12\" -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=cnrm2_k -DASMFNAME=cnrm2_k_ -DNAME=cnrm2_k_ -DCNAME=cnrm2_k -DCHAR_NAME=\"cnrm2_k_\" -DCHAR_CNAME=\"cnrm2_k\" -DNO_AFFINITY -I.. -UDOUBLE -DCOMPLEX"; \
gcc $CFLAGS -DCOMPLEX -c -UDOUBLE ../kernel/power/../arm/znrm2.c -o cnrm2_k.o
{standard input}: Assembler messages:
{standard input}:1232: Error: junk at end of line: `16'
{standard input}:1234: Error: junk at end of line: `16'
{standard input}:1242: Error: junk at end of line: `16'
{standard input}:1247: Error: junk at end of line: `16'
Found it. A second patch is needed: https://sourceware.org/bugzilla/show_bug.cgi?id=26513 Testing now... (In reply to Nick Clifton from comment #10) > Found it. A second patch is needed: > > https://sourceware.org/bugzilla/show_bug.cgi?id=26513 > > Testing now... Good news, both the reproducer and OpenBLAS rebuild are now happy \o/ Verified with gcc-toolset-10-binutils-2.35-11.el8 Is this package gcc-toolset-10-binutils-2.35-11.el8 available anywhere for testing? You should find it here: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1873912 (In reply to Nick Clifton from comment #15) > You should find it here: > > https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1873912 I am not able to access this link. (In reply to rajis from comment #16) > > https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1873912 > > I am not able to access this link. Strange - it works for me. Which rpm(s) do you need ? (In reply to Nick Clifton from comment #17) > (In reply to rajis from comment #16) > > > > https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1873912 > > > > I am not able to access this link. > > Strange - it works for me. Which rpm(s) do you need gcc-toolset-10-binutils (In reply to rajis from comment #18) > > Which rpm(s) do you need > > gcc-toolset-10-binutils Sorry - I meant: do you need to the -devel and/or -debuginfo rpms as well as the ordinary rpms ? I have uploaded the ordinary rpms to this BZ. I hope that you will be able to download them from here. I don't see any attachments in this BZ, Can you share the attachment link? (In reply to rajis from comment #26) > I don't see any attachments in this BZ, Can you share the attachment link? I think that the problem was that the "private" flag was set on the attachments. Please could you try checking to see if they are now visible to you ? (In reply to Nick Clifton from comment #27) > (In reply to rajis from comment #26) > > I don't see any attachments in this BZ, Can you share the attachment link? > > I think that the problem was that the "private" flag was set on the > attachments. Please could you try checking to see if they are now visible > to you ? Yes. It works now. Able to compile OpenBLAS with this Binutils version on POWER. Thanks. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (gcc-toolset-10-binutils bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1872 |
Description of problem: Version-Release number of selected component (if applicable): gcc-toolset-10 on RHEL 8.5 How reproducible: #include <stdio.h> int main() { float *a; __builtin_prefetch(a, 0, 0); return 0; } $ /opt/rh/gcc-toolset-10/root/usr/bin/cc -c t.c /tmp/ccDsRow1.s: Assembler messages: /tmp/ccDsRow1.s:18: Error: junk at end of line: `16' This affects openblas build.