Bug 2214195

Summary: Built-in cmake test for fedora fails in Koji
Product: [Fedora] Fedora Reporter: Cristian Le <fedora>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: dmalcolm, fweimer, jakub, jlaw, jwakely, mcermak, mpolacek, msebor, nickc, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://koji.fedoraproject.org/koji/buildinfo?buildID=2211320
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cristian Le 2023-06-12 09:30:18 UTC
I am not sure where this issue originates, but I cannot reproduce this locally in mock or copr, and I am instructed that this might be an issue on the `gcc-gfortran` side. If not please redirect it.

I have linked to an example koji build [1] that demonstrates the issue. Basically running `cmake` fails at its built-in fortran test compilation. The relevant issue might be:
```
    [4/4] : && /usr/bin/f95 -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1    -Wl,--dependency-file,CMakeFiles/cmTC_38ce7.dir/link.d -O2 -g -march=x86-64-v4 -I/usr/lib/gfortran/modules CMakeFiles/cmTC_38ce7.dir/testFortranCompiler.f.o -o cmTC_38ce7   && :
    FAILED: cmTC_38ce7 
    : && /usr/bin/f95 -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1    -Wl,--dependency-file,CMakeFiles/cmTC_38ce7.dir/link.d -O2 -g -march=x86-64-v4 -I/usr/lib/gfortran/modules CMakeFiles/cmTC_38ce7.dir/testFortranCompiler.f.o -o cmTC_38ce7   && :
    /usr/bin/ld: CMakeFiles/cmTC_38ce7.dir/testFortranCompiler.f.o: relocation R_X86_64_32S against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: failed to set dynamic section sizes: bad value
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
```
with the relevant part being: `recompile with -fPIE`


[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2211320

Reproducible: Always

Steps to Reproduce:
Koji build of `python-scikit-build-0.17.6` on `rawhide`

Comment 1 Florian Weimer 2023-06-12 09:39:24 UTC
Possible near-duplicate of bug 2167430? In the sense that we need to add another stanza, this time for Fortran?

Comment 2 Fedora Release Engineering 2023-08-16 08:10:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.