Skip to content

ceph: fix CMake 4.0 builds#451118

Merged
vcunat merged 2 commits intoNixOS:masterfrom
nazarewk:fix/ceph-build
Oct 18, 2025
Merged

ceph: fix CMake 4.0 builds#451118
vcunat merged 2 commits intoNixOS:masterfrom
nazarewk:fix/ceph-build

Conversation

@nazarewk
Copy link
Member

@nazarewk nazarewk commented Oct 11, 2025

Things done

  1. update's ceph's cursed arrow-cpp-19.nix with CMake 4.0 changes
  2. pull in CMake 4.0 patch for ceph's cpp_redis module

does not include #442184 (currently at staging-next)

related to #445447

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Oct 11, 2025
@emilazy
Copy link
Member

emilazy commented Oct 11, 2025

Cross‐linking #443671. (This one is presumably much easier to land.)

@nazarewk nazarewk changed the title ceph: fix arrow-cpp-19 for CMake 4.0 ceph: fix CMake 4.0 builds Oct 11, 2025
@nazarewk nazarewk marked this pull request as ready for review October 11, 2025 21:45
@nazarewk nazarewk reopened this Oct 11, 2025
@nazarewk nazarewk changed the base branch from master to staging-next October 11, 2025 21:51
@nixpkgs-ci nixpkgs-ci bot closed this Oct 11, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Oct 11, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 11, 2025

(fetchpatch2 {
name = "ceph-cmake-4.patch";
url = "https://gitlab.alpinelinux.org/ashpool/aports/-/raw/d22b70eafe33c3daabe4eea6913c5be87d9463ad/community/ceph19/cpp_redis.patch";
Copy link
Member

Choose a reason for hiding this comment

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

Fetching a patch from a foreign package repository that does nothing but replace the cmake_minimum_required parameter feels odd.

@benaryorg
Copy link
Contributor

Quick context:

  • cpp_redis had its CMake config completely reworked in ceph/cpp_redis@3bcded9
  • the above happened after ceph/ceph@7aeac65
  • the next change to the cpp_redis submodule in ceph was to remove it entirely in ceph/ceph@c6ddf86, but this only hits with ceph 20.0.0
  • therefore: no backportable ceph/ceph change we could fetchpatch, meaning we will in fact have to touch the files using either third-party or our own patches

Since those are static strings which are unlikely to change (since the next canonical change will probably be the removal of the files), using substituteInPlace --replace-fail would be functionally equivalent with some upsides (shorter than a patch, no extra files, no external dependency).

If Ceph 20 were to release right now it'd solve a lot of problems (Python 3.12/PyO3, CMake, also Arrow I think), but Tentacle is currently in an RC1 phase.

This is not a review, just context.

@vcunat
Copy link
Member

vcunat commented Oct 17, 2025

ceph won't build for me (x86_64), or more precisely the python3.11-cryptography build fails two tests and even retrying doesn't seem to help.

@limwa
Copy link
Contributor

limwa commented Oct 17, 2025

@vcunat what is the error you're getting? I managed to build ceph on x86_64-linux. Although, I should note I'm also buiding with the python3.11-tkinter fix.

@vcunat
Copy link
Member

vcunat commented Oct 17, 2025

It's some assertions in TestOpenSSLMemoryLeaks.test_x25519_pubkey_from_private_key and TestOpenSSLMemoryLeaks.test_write_pkcs12_key_and_certificates.
280i1ryj9gl098cnkrq8h75gky5jyrf1-python3.11-cryptography-40.0.1.log

@limwa
Copy link
Contributor

limwa commented Oct 17, 2025

It's some assertions in TestOpenSSLMemoryLeaks.test_x25519_pubkey_from_private_key and TestOpenSSLMemoryLeaks.test_write_pkcs12_key_and_certificates. 280i1ryj9gl098cnkrq8h75gky5jyrf1-python3.11-cryptography-40.0.1.log

If you're building on staging-next, the OpenSSL version was bumped to 3.6.0 in #447713. There are reports of memory leaks in OpenSSL 3.6.0 (see openssl/openssl#28888, openssl/openssl#28770, and openssl/openssl#28757).

That could explain why I can build it by layering the python311.tkinter fix and this PR on top of nixos-unstable (I'm still using OpenSSL 3.5.2).

Another detail is that ceph uses cryptography v40 instead of the v45 that's on nixos-unstable... This could also be the cause of the memory leak...

EDIT: I'm currently building ceph.python.pkgs.cryptography with the previously mentioned OpenSSL bump to check if I can reproduce the build failure.

@vcunat
Copy link
Member

vcunat commented Oct 17, 2025

Yes, what I tested was this PR merged to its target (staging-next).

@limwa
Copy link
Contributor

limwa commented Oct 17, 2025

I've managed to reproduce the build failure after using OpenSSL 3.6.0 to build cryptography v40.

@limwa
Copy link
Contributor

limwa commented Oct 17, 2025

I was trying to find out which version of cryptography fixed the issue and I narrowed it down to:

  • 42.0.1 - present
  • 42.0.4 - fixed

Unfortunately, bash decided to delete itself from my Nix store and now my system can't boot :)

@emilazy
Copy link
Member

emilazy commented Oct 18, 2025

pyca/cryptography@42.0.1...42.0.4

Presumably it is pyca/cryptography#10322, as backported in pyca/cryptography@0e0e46f. Just disabling the tests seems the way to go.

@vcunat vcunat changed the base branch from staging-next to master October 18, 2025 07:01
@nixpkgs-ci nixpkgs-ci bot closed this Oct 18, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Oct 18, 2025
@vcunat
Copy link
Member

vcunat commented Oct 18, 2025

I fail to see why this needs to target staging-next. But the time-wise difference is small, as staging-next should merge to master this weekend, so we need those fixes anyway even if they're not that much related.

@vcunat vcunat added this pull request to the merge queue Oct 18, 2025
@vcunat
Copy link
Member

vcunat commented Oct 18, 2025

On master this PR fixes ceph build for me.

Merged via the queue into NixOS:master with commit 699893f Oct 18, 2025
108 of 113 checks passed
@nazarewk
Copy link
Member Author

I fail to see why this needs to target staging-next. But the time-wise difference is small, as staging-next should merge to master this weekend, so we need those fixes anyway even if they're not that much related.

it was because this was still not working without the tkinter fix , which was only available on staging-next

@vcunat
Copy link
Member

vcunat commented Oct 21, 2025

OK. That one got to master a few minutes ago.

@nazarewk nazarewk deleted the fix/ceph-build branch October 21, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants