Bug 2046246

Summary: R needs to filter out -Wl,-dT,/builddir/build/BUILD/R-4.1.2/.package_note-R-4.1.2-2.fc36.x86_64.ld from linker flags
Product: [Fedora] Fedora Reporter: Mattias Ellert <mattias.ellert>
Component: RAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: i.ucar86, spotrh
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-02-03 16:15:58 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:
Bug Depends On: 2043092    
Bug Blocks:    

Description Mattias Ellert 2022-01-26 13:18:25 UTC
Description of problem:

Building R modules using the latest R built in rawhide fails because the saved linking flags from the R build contains -Wl,-dT,/builddir/build/BUILD/R-4.1.2/.package_note-R-4.1.2-2.fc36.x86_64.ld. This file existed during the build of them main R package, but not when building R modules against it.

Version-Release number of selected component (if applicable):

R-core-devel-4.1.2-2.fc36

How reproducible:

Always

Steps to Reproduce:
1. Build an R rmodule that compiles code against the latest R in rawhide.

Actual results:

/usr/bin/ld: cannot open linker script file /builddir/build/BUILD/R-4.1.2/.package_note-R-4.1.2-2.fc36.x86_64.ld: No such file or directory
collect2: error: ld returned 1 exit status

Expected results:

No error.

Additional info:

Seen by failing builds in koschei, e.g.

https://koji.fedoraproject.org/koji/taskinfo?taskID=81931021

Comment 1 Iñaki Ucar 2022-01-26 13:40:09 UTC
Where does this package_note come from? Is this part of a change for F36?

Comment 2 Mattias Ellert 2022-01-26 14:14:09 UTC
It comes from redhat-rpm-config. It is a new feature in F36. It causes problems for other packages that keeps track of build flags too for building modules, like ruby and python. You can check what was donr there.

Comment 3 Tom "spot" Callaway 2022-01-26 15:30:00 UTC
Applying the same "fix" that ruby uses. Build going now.

Comment 4 Iñaki Ucar 2022-01-26 16:43:25 UTC
If they are EPEL-compatible, a possible solution would be to use %{extension_*flags} [1]. Reading the devel thread and related bugs, I understood that this is what Python uses and it's Miro's proposal for Ruby too.

[1] https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/buildflags.md#support-for-extension-builders

Comment 5 Tom "spot" Callaway 2022-02-03 16:15:58 UTC
R-4.1.2-3.fc36 should no longer have this issue.