Skip to content

llvm_{12,13,14,15}: fix build with Python 3.13#412548

Merged
mweinelt merged 1 commit intoNixOS:staging-nextfrom
mdaniels5757:fix-llvm-builds
Jun 1, 2025
Merged

llvm_{12,13,14,15}: fix build with Python 3.13#412548
mweinelt merged 1 commit intoNixOS:staging-nextfrom
mdaniels5757:fix-llvm-builds

Conversation

@mdaniels5757
Copy link
Member

Python 3.13 removed the "pipes" module, which LLVM used through v16.

So we need a patch. It's only used once though!

A similar patch was used by Arch: https://gitlab.archlinux.org/archlinux/packaging/packages/llvm15/-/blob/main/nopipes.diff?ref_type=heads

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label May 31, 2025
@mdaniels5757 mdaniels5757 mentioned this pull request May 31, 2025
1 task
Python 3.13 removed the "pipes" module, which LLVM used through v16.

So we need a patch. It's only used once though!

A similar patch was used by Arch: https://gitlab.archlinux.org/archlinux/packaging/packages/llvm15/-/blob/main/nopipes.diff?ref_type=heads
@github-actions github-actions bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels May 31, 2025
@mdaniels5757
Copy link
Member Author

This currently builds on GitHub Actions (for llvm_{12,13,14,15}) on x86_64-linux, aarch64-linux, and aarch64-darwin, but NOT x86_64-darwin, due to some (seemingly flakey?) libuv test failures. Trying to rebuild now.

@alyssais
Copy link
Member

Looks fine. An alternative might be just disabling the tests for older LLVM versions and not needing a patch. Interested in the thoughts of my co-maintainers.

@mdaniels5757
Copy link
Member Author

Finally done building: builds of llvm_12, llvm_13, llvm_14, and llvm_15 succeed on all supported platforms.

@mweinelt mweinelt merged commit 14604e0 into NixOS:staging-next Jun 1, 2025
16 of 17 checks passed
@mdaniels5757 mdaniels5757 deleted the fix-llvm-builds branch June 1, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants