Skip to content

Conversation

@ppisar
Copy link
Contributor

@ppisar ppisar commented Jul 23, 2025

Fedora is going to move from cmake with make to cmake with ninja https://fedoraproject.org/wiki/Changes/CMake_ninja_default. That would break building an RPM package from our spec file because the new %cmake macro won't produce Makefiles:

+ make -j8 'RPM_OPT_FLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer' make: *** No targets specified and no makefile found.  Stop.

The fix is to use CMake RPM macros for everything, especially not executing make manually.

I tested this fix with old (make-based) and new (ninja-based) cmake-rpm-macros package successfully.

Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=2380983

Fedora is going to move from cmake with make to cmake with ninja
<https://fedoraproject.org/wiki/Changes/CMake_ninja_default>.
That would break building an RPM package from our spec file because
the new %cmake macro won't produce Makefiles:

    + make -j8 'RPM_OPT_FLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'
    make: *** No targets specified and no makefile found.  Stop.

The fix is to use CMake RPM macros for everything, especially not
executing make manually.

I tested this fix with old (make-based) and new (ninja-based)
cmake-rpm-macros package successfully.

Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=2380983
@ppisar ppisar requested a review from pkratoch July 23, 2025 08:58
@kontura
Copy link
Contributor

kontura commented Jul 24, 2025

Thanks

@kontura kontura merged commit c673138 into rpm-software-management:master Jul 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants