Bug 2083296 - redhat/macros: embedded tab character causing configuration failures
Summary: redhat/macros: embedded tab character causing configuration failures
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 36
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2084009
TreeView+ depends on / blocked
 
Reported: 2022-05-09 15:42 UTC by Jerry James
Modified: 2022-06-01 01:24 UTC (History)
15 users (show)

Fixed In Version: redhat-rpm-config-219-2.fc37 redhat-rpm-config-220-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-01 01:24:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2022-05-09 15:42:13 UTC
Description of problem:
A handful of my packages have stopped building successfully in Rawhide.  See the z3 package for one example.  The cause is this commit:

commit 0e07c905671739a43018d9195f7cfc43dfecce93 (origin/f36)
Author: Tom Stellard <tstellar>
Date:   Thu Mar 24 17:26:18 2022 +0000

    Add -fno-openmp-implicit-rpath when building with clang
    
    This prevents clang from adding RUNPATH for libomp.so to binaries built
    with -fopenmp.
    
    https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild

That commit added a tab character in the definition of %__global_compiler_flags.  Find %{_legacy_options} in the value.  That is followed by a space character, then a tab character.

The issue is that some packages break up the flags at spaces, in order to look for specific flags or to add flags of their own.  The z3 package, for example, has some python code that does this:

def exec_cmd(cmd):
    if isinstance(cmd, str):
        cmd = cmd.split(' ')
    ...

The result is one of the commands in the list consists of a single tab character.  When that is passed to the compiler, the compiler does not like it at all.

Please remove that tab character.

Version-Release number of selected component (if applicable):
redhat-rpm-config-218-1.fc37.noarch

How reproducible:
Always

Steps to Reproduce:
1. fedpkg clone z3
2. cd z3
3. fedpkg srpm
4. fedpkg mockbuild

Actual results:
The build fails, complaining that it cannot find a working C++ compiler, even though g++ is installed.

Expected results:
The build should succeed.

Additional info:

Comment 2 Fedora Update System 2022-05-17 09:43:15 UTC
FEDORA-2022-5626b7ebea has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5626b7ebea

Comment 3 Fedora Update System 2022-05-17 09:55:42 UTC
FEDORA-2022-5626b7ebea has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Michael Catanzaro 2022-05-24 18:50:33 UTC
Hi Miro, thanks for fixing rawhide. Can you also fix F36 as well, please? I can't build WebKitGTK there due to this issue: the tab in CFLAGS is confusing g-ir-scanner.

Comment 5 Miro Hrončok 2022-05-24 19:00:11 UTC
Sure. I wasn't aware that this regression was backported.

Comment 6 Milan Crha 2022-05-27 08:19:45 UTC
(In reply to Miro Hrončok from comment #5)
> Sure. I wasn't aware that this regression was backported.

Ping.

The 219-1 is broken, but there is no f36 build in koji yet, only 201-1.fc35, which breaks the upgrade path, if I understand the rules properly. Apart of this, I cannot build my packages due to this (gtk-doc is also confused by the args [1]).

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=87538966

Comment 7 Milan Crha 2022-05-27 08:21:16 UTC
(In reply to Milan Crha from comment #6)
> only 201-1.fc35, which breaks the upgrade path, if I understand the rules properly.

Err, the quoted part is nonsense, I'm sorry, I need to learn read... :-/

Comment 8 Tom Stellard 2022-05-27 17:33:32 UTC
f36 PR with the fixes: https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/201

Comment 9 Fedora Update System 2022-05-28 07:24:28 UTC
FEDORA-2022-1708a23bac has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1708a23bac

Comment 10 Fedora Update System 2022-05-29 02:39:53 UTC
FEDORA-2022-1708a23bac has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-1708a23bac`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-1708a23bac

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

Comment 11 Fedora Update System 2022-06-01 01:24:31 UTC
FEDORA-2022-1708a23bac has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.