Bug 2059488

Summary: /usr/bin/ld: cannot open linker script file
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: redhat-rpm-configAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: ajax, aoliva, carl, dmalcolm, ffesti, fweimer, igor.raits, jakub, jonathan, j, jwakely, law, mhroncok, mpolacek, msebor, ngompa13, nickc, pmatilai, sipoyare, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-29 08:27:59 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 Remi Collet 2022-03-01 07:20:54 UTC
redis is now FTBFS because of gcc failure

This seems a regression as build during F36 mass rebuild was ok (12.0.1-0.2.fc36)
https://koji.fedoraproject.org/koji/buildinfo?buildID=1898010

Here is a scratch build using 12.0.1-0.9.fc37
https://koji.fedoraproject.org/koji/taskinfo?taskID=83500436

In build.log
checking for gcc... gcc
checking whether the C compiler works... no
make[2]: Leaving directory '/builddir/build/BUILD/redis-6.2.6/deps'
configure: error: in `/builddir/build/BUILD/redis-6.2.6/deps/jemalloc':
configure: error: C compiler cannot create executables
See `config.log' for more details


In config.log
configure:3049: checking whether the C compiler works
configure:3071: gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIO
NS -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 -O2 -fl
to=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-stron
g -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redha
t-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/.package_note-redis-6.2.6-3.fc36.remi.x86_64.ld conftest.c  >&5
/usr/bin/ld: cannot open linker script file /builddir/build/BUILD/.package_note-redis-6.2.6-3.fc36.remi.x86_64.ld: No such file or directory
collect2: error: ld returned 1 exit status



Notices:

/builddir/build/BUILD/.package_note-redis-6.2.6-3.fc36.remi.x86_64.ld is missing
/builddir/build/BUILD/redis-6.2.6/.package_note-redis-6.2.6-3.fc36.remi.x86_64.ld exists

12.0.1-0.8.fc37 is also broken

Comment 1 Nick Clifton 2022-03-01 11:32:01 UTC
I am changing the Component of this BZ to redhat-rpm-config since that is the package that is responsible for inserting the problematic option into the linker command line.

Note for Remi: you can work around the problem by adding this line to your spec file:

  %undefine _package_note_file

Not that this is necessarily a good idea in the long run, but if failing to build is blocking you from completing some task then this may help.

Comment 2 Remi Collet 2022-03-01 15:38:07 UTC
(In reply to Nick Clifton from comment #1)

>   %undefine _package_note_file
> 
> Not that this is necessarily a good idea in the long run, but if failing to
> build is blocking you from completing some task then this may help.

Thanks, the workaround allows me to build redis 7.0RC2 on F36

Comment 3 Zbigniew Jędrzejewski-Szmek 2022-03-29 08:27:59 UTC
I pushed a change to how the macros are called that resolves the issue directly to rawhide and f36 branches
in dist-git. Package builds fine in mock now.