I've been observing a mysterious build failure on i686 for a while now, just haven't had a chance to investigate enough for a proper report until now. This only occurs on i686, and the symptom is that the build bails out with this an error message about opening a file without a file name failing: > lto1: fatal error: open failed: No such file or directory > compilation terminated. > lto-wrapper: fatal error: /usr/bin/gcc returned 1 exit status > compilation terminated. I first observed this in copr in January or so, then it recently appeared to have been fixed - there was a period where this build succeeded on rawhide but failed on F42 unless this update was applied: https://bodhi.fedoraproject.org/updates/FEDORA-2025-6a12d86df4 Here's a successful build from a couple of weeks back: https://koji.fedoraproject.org/koji/buildinfo?buildID=2667874 And here's a failing build from today: https://koji.fedoraproject.org/koji/taskinfo?taskID=130937076 So with gcc-15.0.1-0.8 this succeeded, with gcc-15.0.1-0.11 it now fails on i686 again. It has to do with LTO: disabling LTO with "%global _lto_cflags %{nil}" the spec makes the build succeed. It appears entirely reproducable here, observed in koji, copr and local mock build. Reproducible: Always Steps to Reproduce: 1. mock -r fedora-rawhide-i386 https://kojipkgs.fedoraproject.org//packages/rpm/4.20.1/1.fc43/src/rpm-4.20.1-1.fc43.src.rpm Actual Results: Build fails with "lto1: fatal error: open failed: No such file or directory" Expected Results: Build succeeds.
FWIW, I've applied the following workaround to disable LTO on i686 so we're not blocked by this: https://src.fedoraproject.org/rpms/rpm/pull-request/65
I can reproduce in f43 mock with just echo 'void foo (void) {}' > a.c; gcc -O2 -flto=auto -ffat-lto-objects -fhardened -o a.o -c a.c; gcc -O2 -flto=auto -r -o a.lo a.o lto1: fatal error: open failed: No such file or directory ... The -fhardened option seems to be essential, without that it doesn't fail, and the problem is that somehow a.lo.lto.o-args.0 doesn't contain just the expected a.o, but "" a.o and the "" file (literally length zero name) can't be opened. I can't reproduce it with latest trunk and older binutils though.
Somehow gcc -O2 -flto=auto -ffat-lto-objects -fhardened -o a.s -S a.c writes .section .gnu.lto_.opts,"e",@progbits .string "'-fno-openmp' '-fno-openacc' '-fPIC' '' '-mtune=generic' '-march=i686' '-O2' '-flto=auto' '-ffat-lto-objects'" (note the '' in there).
FEDORA-2025-9bcdcfb5cd (gcc-15.1.1-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-9bcdcfb5cd
FEDORA-2025-9bcdcfb5cd has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-9bcdcfb5cd` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-9bcdcfb5cd See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-9bcdcfb5cd (gcc-15.1.1-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.
Thanks for the fix! Just rebuilt rpm on rawhide with the workaround dropped, worked fine.