Skip to content

llvmPackages_{20,21}.libclc: reenable#436446

Merged
alyssais merged 2 commits intoNixOS:stagingfrom
kilyanni:fix/llvm-libclc
Aug 29, 2025
Merged

llvmPackages_{20,21}.libclc: reenable#436446
alyssais merged 2 commits intoNixOS:stagingfrom
kilyanni:fix/llvm-libclc

Conversation

@kilyanni
Copy link
Contributor

@kilyanni kilyanni commented Aug 24, 2025

#429382 dropped the libclc attribute of llvmPackages for LLVM 20/21 because there was no appropriate SPIRV-LLVM-Translator version. #432015 introduced the required versions. This PR reintroduces libclc and adjusts patches as some were applied upstream.

llvmPackages_20.libclc builds properly.

On LLVM 21 it's broken for now, as SPIRV-LLVM-Translator needs nightly SPIRV Headers (see here). After manually forcing spirv-headers and spirv-tools onto nightly versions, llvmPackages_21.libclc also builds properly. Right now, it will evaluate as broken as spirv-llvm-translator is marked as broken for LLVM 21 with current SPIRV version.

#429382 was to fix OfBorg eval issues - is evaling as broken an issue, or only if it fails to eval at all?

Things done

  • 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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels Aug 24, 2025
@kilyanni
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 436446
Commit: 1fcaa3f5f0b0d3cfb0aab2c16bb6adc0792ba715


x86_64-linux

✅ 2 packages built:
  • llvmPackages_20.libclc
  • llvmPackages_20.libclc.dev

@kilyanni kilyanni marked this pull request as ready for review August 24, 2025 11:57
@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 24, 2025
@alyssais
Copy link
Member

Evaling as broken should be fine.

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 24, 2025
@RossComputerGuy
Copy link
Member

#407738 already does this, it also had the bump before #432015 was even made.

@kilyanni
Copy link
Contributor Author

Closing in favor of #407738

@kilyanni kilyanni closed this Aug 25, 2025
@alyssais
Copy link
Member

Just because we're not ready to update the default yet doesn't mean we have to wait to have working libclc…

@kilyanni
Copy link
Contributor Author

Might've jumped the gun there ^^'

@kilyanni kilyanni reopened this Aug 28, 2025
@kilyanni kilyanni force-pushed the fix/llvm-libclc branch 2 times, most recently from 49ee4fe to 98b13bf Compare August 28, 2025 19:19
Comment on lines 96 to 99
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seemed like a typo to me, it caused buildInputs to eval as [..., [...]]. Kinda surprised that mkDerivation didn't complain about that

@nixpkgs-ci nixpkgs-ci bot removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 28, 2025
@nixpkgs-ci nixpkgs-ci bot added the 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. label Aug 28, 2025
@ofborg ofborg bot added the ofborg-internal-error Ofborg encountered an error label Aug 29, 2025
@alyssais
Copy link
Member

Don't we need to update the version check introduced in #429382?

@kilyanni
Copy link
Contributor Author

Do you mean

lib.versionAtLeast metadata.release_version "16" && lib.versionOlder metadata.release_version "20"

Right now I updated it to go up to version 21 only, as there's no version of spirv-llvm-translator for LLVM 22/llvmPackages_git yet. Maybe there's unstable versions of spirv-llvm-translator that work with it, but #432015 only introduced stable versions.

@alyssais alyssais merged commit f86a07a into NixOS:staging Aug 29, 2025
27 checks passed
@kilyanni
Copy link
Contributor Author

Thanks!

@kilyanni kilyanni deleted the fix/llvm-libclc branch August 30, 2025 21:23
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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. ofborg-internal-error Ofborg encountered an error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants