Bug 2259004

Summary: s390x-only failure on gcc14 with LTO
Product: [Fedora] Fedora Reporter: Gwyn Ciesla <gwync>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmalcolm, fweimer, jakub, jlaw, jwakely, mcermak, mpolacek, msebor, nickc, nixuser, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-14.0.1-0.3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-13 11:57:15 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:

Description Gwyn Ciesla 2024-01-18 15:14:45 UTC
Libreooffice fails on s390x with gcc14. It succeeds when LTO is disabled.

Failure log: https://kojipkgs.fedoraproject.org//work/tasks/493/111890493/build.log

[build LNK] Executable/localize
S=/builddir/build/BUILD/libreoffice-24.2.0.2 && I=$S/instdir && W=$S/workdir &&  g++ -pthread    -Wl,-z,origin '-Wl,-rpath,$ORIGIN/../Library' -Wl,-rpath-link,$I/program  -Wl,-z,defs -fstack-protector-strong -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc  -Wl,--hash-style=gnu  -Wl,-Bsymbolic-functions -L$W/LinkTarget/StaticLibrary -L$I/sdk/lib  -L$I/program  -L$I/program  -L$W/LinkTarget/Library -Wl,-z,relro -Wl,--as-needed   -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes      $W/CxxObject/l10ntools/source/localize.o       -Wl,--start-group $W/LinkTarget/StaticLibrary/libtransex.a -lxml2  -Wl,--end-group -Wl,--no-as-needed -luno_sal  -o $W/LinkTarget/Executable/localize  
[build LNK] Executable/pocheck
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_START          | annobin: Generate per-function annotations
PLUGIN_ALL_PASSES_END            | annobin: Register per-function end symbols
during RTL pass: final
/builddir/build/BUILD/libreoffice-24.2.0.2/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c: In function ‘Java_com_sun_star_lib_connections_pipe_PipeConnection_closeJNI’:
/builddir/build/BUILD/libreoffice-24.2.0.2/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c:339:1: internal compiler error: in add_AT_die_ref, at dwarf2out.cc:4913
  339 | }
      | ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [/tmp/ccZU0QcO.mk:2: /tmp/ccP57jXl.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [/builddir/build/BUILD/libreoffice-24.2.0.2/jurt/Library_jpipe.mk:10: /builddir/build/BUILD/libreoffice-24.2.0.2/instdir/program/libjpipe.so] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/builddir/build/BUILD/libreoffice-24.2.0.2'
make: *** [Makefile:289: build] Error 2

Comment 1 Gwyn Ciesla 2024-01-19 17:20:29 UTC
Interestingly, I have another issue involving LTO on s390x. Duplicity 2.1.5 builds fine on f39 all arches with LTO. On f40 it only builds on s390x if LTO is off. If not, there's a test failure.

https://kojipkgs.fedoraproject.org//work/tasks/1506/111981506/build.log

Comment 2 Jakub Jelinek 2024-01-19 17:28:09 UTC
(In reply to Gwyn Ciesla from comment #1)
> Interestingly, I have another issue involving LTO on s390x. Duplicity 2.1.5
> builds fine on f39 all arches with LTO. On f40 it only builds on s390x if
> LTO is off. If not, there's a test failure.
> 
> https://kojipkgs.fedoraproject.org//work/tasks/1506/111981506/build.log

That has nothging to do with this bug (which is BTW already fixed upstream), so please file it separately.

Comment 3 Gwyn Ciesla 2024-01-19 17:33:23 UTC
Will do, thanks! Do you know when that bugfix  might hit a gcc release?