Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building on CentOS 9 #2231

Merged

Conversation

evan-goode
Copy link
Member

Building from the master branch on RHEL 9/CentOS 9 has been broken since #2217. This means that our nightly Copr has been broken for el9.

CMAKE_POLICY(SET CMP0148 OLD) fails on CMake < 3.27, when CMP0148 was introduced. Centos 9 Stream is still on CMake 3.26.

Changing this to a CMAKE_POLICY(VERSION ...) command is generally recommended [1] over setting policies individually, but this change does add back a warning that "Policy CMP0148 is not set".

[1] https://cmake.org/cmake/help/latest/command/cmake_policy.html#setting-policies-by-cmake-version

@evan-goode evan-goode requested a review from a team as a code owner April 8, 2025 12:47
@evan-goode evan-goode requested review from jrohel and removed request for a team April 8, 2025 12:47
@ppisar ppisar self-assigned this Apr 8, 2025
`CMAKE_POLICY(SET CMP0148 OLD)` fails on CMake < 3.27, when CMP0148 was
introduced. Centos 9 Stream is still on CMake 3.26.

On CMake >= 3.27, this change adds back a warning that "Policy CMP0148
is not set".

[1] https://cmake.org/cmake/help/latest/command/cmake_policy.html#setting-policies-by-cmake-version
@evan-goode evan-goode force-pushed the evan-goode/fix-cmake branch from e39c865 to 7602cec Compare April 8, 2025 14:08
@evan-goode evan-goode requested a review from ppisar April 8, 2025 14:11
Copy link
Contributor

@ppisar ppisar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it warns:

  Manually-specified variables were not used by the project:

    BUILD_SHARED_LIBS
    CMAKE_CXX_FLAGS_RELEASE
    CMAKE_C_FLAGS_RELEASE
    CMAKE_Fortran_FLAGS_RELEASE
    CMAKE_INSTALL_DO_STRIP
    CMAKE_INSTALL_FULL_SBINDIR
    CMAKE_INSTALL_SBINDIR
    CMAKE_POLICY_VERSION_MINIMUM

But I believe this is harmless because this project does not compile any binary executables. I will approve this pull request after finishing at least one ci-dnf-stack task.

Copy link
Contributor

@ppisar ppisar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dnf/plugins-core/copr.feature failure on Fedora 43 is unrelated. I've already seen it before.

@ppisar ppisar merged commit 6e0718f into rpm-software-management:master Apr 8, 2025
10 of 11 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