Bug 2317847

Summary: RPM-specific flags embedded in sipconfig
Product: [Fedora] Fedora Reporter: Scott K Logan <logans>
Component: sipAssignee: Than Ngo <than>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: kde-sig, rkieley, than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
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:
Bug Depends On:    
Bug Blocks: 1225692    
Attachments:
Description Flags
Patch to drop -specs= from captured flags
none
Patch to drop -specs= from captured flags none

Description Scott K Logan 2024-10-10 14:32:46 UTC
Hello -

We're facing an issue where non-RPM builds using sip fail because RPM-specific compiler and linker flags are embedded in sipconfig.py. This is probably not a problem for downstream RPM builds which use sip because the necessary environment variables are defined.

Specifically, we see the following compilation failure message:
```
g++: fatal error: environment variable ‘RPM_ARCH’ not defined
```

This seems to be caused by the inclusion of one or more RPM-specific `-specs=...` flags in the captured compile flags in sipconfig.py. I don't have a full understanding of why these flags need to be captured and used when compiling downstream code using sip, but I don't think these flags should be present.

We were able to work around the problem by specifically removing the `-specs=...` flags from the captured flags during sip's build. I've attached a patch which does this, which I hope can be used to arrive at an acceptable solution.

Reproducible: Always

Comment 1 Scott K Logan 2024-10-10 14:33:36 UTC
Created attachment 2051403 [details]
Patch to drop -specs= from captured flags

Comment 2 Scott K Logan 2024-10-10 14:38:13 UTC
Created attachment 2051405 [details]
Patch to drop -specs= from captured flags

Comment 3 Aoife Moloney 2025-02-26 13:12:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.