Bug 1866012 - 'lto-wrapper failed' error when trying to compile and link on Rawhide
Summary: 'lto-wrapper failed' error when trying to compile and link on Rawhide
Keywords:
Status: CLOSED DUPLICATE of bug 1823349
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-04 16:24 UTC by Stephen Gallagher
Modified: 2020-10-05 08:32 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-22 12:46:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stephen Gallagher 2020-08-04 16:24:01 UTC
Description of problem:
While trying to debug the FTBFS for libmodulemd on Rawhide, I discovered that Meson is reporting the error 'Compiler cc can not compile programs.' Manually executing the command-line it's running gives me the output I pasted in "Additional info" below.


Version-Release number of selected component (if applicable):
gcc-10.2.1-1.fc33.x86_64
binutils-2.35-10.fc33.x86_64
redhat-rpm-config-166-1.fc33.noarch


How reproducible:
Every time

Steps to Reproduce:
1. 
2.
3.

Actual results:


Expected results:


Additional info:

sanitycheckc.c: `int main() { int class=0; return class; }`


```
gcc /builddir/x86_64-redhat-linux-gnu/meson-private/sanitycheckc.c -o /builddir/x86_64-redhat-linux-gnu/meson-private/sanitycheckc.exe -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pipe -D_FILE_OFFSET_BITS=64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
lto-wrapper: fatal error: execvp: No such file or directory
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
```


Also, just to be sure, I tried:
```
gcc /builddir/x86_64-redhat-linux-gnu/meson-private/sanitycheckc.c -o /builddir/x86_64-redhat-linux-gnu/meson-private/sanitycheckc.exe -flto=auto -ffat-lto-objects 
lto-wrapper: fatal error: execvp: No such file or directory
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
```

and without LTO flags:
```
gcc /builddir/x86_64-redhat-linux-gnu/meson-private/sanitycheckc.c -o /builddir/x86_64-redhat-linux-gnu/meson-private/sanitycheckc.exe -O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pipe -D_FILE_OFFSET_BITS=64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
```
which compiles successfully.

Comment 1 Ben Cotton 2020-08-11 15:25:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 2 Elliott Sales de Andrade 2020-09-21 20:33:50 UTC
This is a duplicate of bug 1823349.

Comment 3 Stephen Gallagher 2020-09-22 12:46:42 UTC

*** This bug has been marked as a duplicate of bug 1823349 ***


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