Bug 2121586

Summary: D builds with LDC fail when external linker flags are set
Product: [Fedora] Fedora Reporter: Otto Liljalaakso <otto.liljalaakso>
Component: mesonAssignee: Igor Raits <igor.raits>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: carl, igor.raits, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: meson-0.63.1-2.fc38 meson-0.63.2-1.fc37 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-28 15:29:17 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 Otto Liljalaakso 2022-08-25 21:17:47 UTC
Description of problem:
Meson fails for programming language D when LDFLAGS are set,
as Fedora package build does.

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

How reproducible:
Always

Steps to Reproduce:
1. fedpkg clone tilix
2. cd tilix
3. fedpkg mockbuild

Actual results:
Build fails due to the following error:

meson.build:1:0: ERROR: Unable to detect linker for compiler `ldc2 -L=--version /tmp/tmp1kgemrqf.d -Wl,-z,relro -Wl,--as-needed -Wl,--build-id=sha1 -O -g -release -wi`
stdout: 
stderr: ldc2: Unknown command line argument '-Wl,-z,relro'.  Try: 'ldc2 --help'
ldc2: Did you mean '--icp-lto'?
ldc2: Unknown command line argument '-Wl,--as-needed'.  Try: 'ldc2 --help'
ldc2: Did you mean '--extract-needand'?
ldc2: Unknown command line argument '-Wl,--build-id=sha1'.  Try: 'ldc2 --help'
ldc2: Did you mean '--x86-slh-ip=sha1'?

Expected results:
Build completes successfully

Additional info:
This problem also affects Fedora 37, where Koschei discovered it:
https://koschei.fedoraproject.org/build/13546758

Comment 1 Fedora Update System 2022-08-28 15:26:31 UTC
FEDORA-2022-eb26d5f034 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-eb26d5f034

Comment 2 Fedora Update System 2022-08-28 15:29:17 UTC
FEDORA-2022-eb26d5f034 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Fedora Update System 2022-08-28 17:05:37 UTC
FEDORA-2022-bf12dcc950 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bf12dcc950

Comment 4 Fedora Update System 2022-08-28 18:53:33 UTC
FEDORA-2022-bf12dcc950 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-bf12dcc950`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-bf12dcc950

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2022-09-03 23:44:47 UTC
FEDORA-2022-9b5d782ddc has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-9b5d782ddc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9b5d782ddc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-09-12 17:46:02 UTC
FEDORA-2022-9b5d782ddc has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.