Skip to content

Build failure: rocmPackages.llvm.llvm (staging-next) #565696

Closed

Description

@anund

Nixpkgs version

  • Unstable (26.11)

Steps to reproduce

On staging run nix-build . -A pkgs.pkgsRocm.rocmPackages.llvm.llvm

Can Hydra reproduce this build failure?

Yes: https://hydra.nixos.org/build/346731561

Relevant log output

applying patch /nix/store/ziwd6393qaw0pcn1w7izk900dbgv3hs9-backport-minimal-arm64e_x1-support.patch
patching file include/llvm/BinaryFormat/MachO.h
Hunk #1 succeeded at 1643 (offset -72 lines).
patching file include/llvm/TargetParser/Triple.h
Hunk #1 succeeded at 151 with fuzz 2 (offset -6 lines).
Hunk #2 succeeded at 1131 (offset -90 lines).
patching file include/llvm/TextAPI/Architecture.def
Hunk #1 succeeded at 37 (offset -2 lines).
patching file lib/BinaryFormat/MachO.cpp
Hunk #1 succeeded at 60 (offset -6 lines).
patching file lib/Object/MachOObjectFile.cpp
Hunk #1 succeeded at 2806 (offset -113 lines).
patching file lib/TargetParser/Triple.cpp
Hunk #1 FAILED at 191.
Hunk #2 FAILED at 612.
Hunk #3 succeeded at 823 (offset 84 lines).
2 out of 3 hunks FAILED -- saving rejects to file lib/TargetParser/Triple.cpp.rej
patching file test/tools/llvm-readobj/MachO/file-headers-arm64.test
patching file tools/llvm-objdump/MachODump.cpp
Hunk #1 succeeded at 2320 (offset -24 lines).
Hunk #2 succeeded at 8342 (offset -134 lines).
patching file tools/llvm-readobj/MachODumper.cpp
Hunk #1 succeeded at 170 with fuzz 2 (offset -20 lines).
patching file unittests/BinaryFormat/MachOTest.cpp
Hunk #2 succeeded at 108 with fuzz 2.
patching file test/MachO/arm64-x1.s
patching file test/tools/llvm-readobj/macho-arm64e_x1.test
error: build of '/nix/store/0d87rvl5fh5fl20p4fabd0nf439xazw8-llvm-22.0.0-rocm.drv' on 'ssh-ng://framework-builder' failed: Cannot build '/nix/store/0d87rvl5fh5fl20p4fabd0nf439xazw8-llvm-22.0.0-rocm.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/9dybhl8a4qmm0r28cdmipry2qmhcmkaw-llvm-22.0.0-rocm-lib
         /nix/store/dr5l1v8sizkidfyikb5hxyi81gd05zl8-llvm-22.0.0-rocm-dev
         /nix/store/iiam6yf4kqfj6cq7415cnpcnd7y81v7r-llvm-22.0.0-rocm
         /nix/store/z2a2wbfarjlmyfjfsa84i0gq0nw8a5jy-llvm-22.0.0-rocm-python
       Last 25 log lines:
       > Hunk #1 succeeded at 1643 (offset -72 lines).
       > patching file include/llvm/TargetParser/Triple.h
       > Hunk #1 succeeded at 151 with fuzz 2 (offset -6 lines).
       > Hunk #2 succeeded at 1131 (offset -90 lines).
       > patching file include/llvm/TextAPI/Architecture.def
       > Hunk #1 succeeded at 37 (offset -2 lines).
       > patching file lib/BinaryFormat/MachO.cpp
       > Hunk #1 succeeded at 60 (offset -6 lines).
       > patching file lib/Object/MachOObjectFile.cpp
       > Hunk #1 succeeded at 2806 (offset -113 lines).
       > patching file lib/TargetParser/Triple.cpp
       > Hunk #1 FAILED at 191.
       > Hunk #2 FAILED at 612.
       > Hunk #3 succeeded at 823 (offset 84 lines).
       > 2 out of 3 hunks FAILED -- saving rejects to file lib/TargetParser/Triple.cpp.rej
       > patching file test/tools/llvm-readobj/MachO/file-headers-arm64.test
       > patching file tools/llvm-objdump/MachODump.cpp
       > Hunk #1 succeeded at 2320 (offset -24 lines).
       > Hunk #2 succeeded at 8342 (offset -134 lines).
       > patching file tools/llvm-readobj/MachODumper.cpp
       > Hunk #1 succeeded at 170 with fuzz 2 (offset -20 lines).
       > patching file unittests/BinaryFormat/MachOTest.cpp
       > Hunk #2 succeeded at 108 with fuzz 2.
       > patching file test/MachO/arm64-x1.s
       > patching file test/tools/llvm-readobj/macho-arm64e_x1.test
       For full logs, run:
         nix log /nix/store/0d87rvl5fh5fl20p4fabd0nf439xazw8-llvm-22.0.0-rocm.drv
error: Cannot build '/nix/store/0d87rvl5fh5fl20p4fabd0nf439xazw8-llvm-22.0.0-rocm.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/9dybhl8a4qmm0r28cdmipry2qmhcmkaw-llvm-22.0.0-rocm-lib
         /nix/store/dr5l1v8sizkidfyikb5hxyi81gd05zl8-llvm-22.0.0-rocm-dev
         /nix/store/iiam6yf4kqfj6cq7415cnpcnd7y81v7r-llvm-22.0.0-rocm
         /nix/store/z2a2wbfarjlmyfjfsa84i0gq0nw8a5jy-llvm-22.0.0-rocm-python

Additional context

Relevant PR introducing the failing patch #564039.
llvm does build but is 22.1.8 not 22.0.0 of the rocm fork

nix-build . -A pkgs.llvm_22
/nix/store/qj8brsjknmwfhiw1jqfjc112mkr77csw-llvm-22.1.8

System metadata

  • system: "x86_64-linux"
  • host os: Linux 7.2.5, NixOS, 26.11 (Zokor), 26.11.git.c7def046b9a8M
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.8
  • channels(): "home-manager"
  • channels(root): "home-manager, nixos"
  • nixpkgs: /nix/store/gk6xi32pyyyh79knk65jznnq4c4gskwx-nixos/nixos

Notify maintainers

@LunNova


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: build failure
    on Sep 22, 2026
  2. anund commented on Sep 24, 2026

    @anund
    ContributorAuthor

    Short term this patch resolves the issue:

    diff --git a/pkgs/development/rocm-modules/llvm/default.nix b/pkgs/development/rocm-modules/llvm/default.nix
    index 1ff69dea9692..983de75a35ea 100644
    --- a/pkgs/development/rocm-modules/llvm/default.nix
    +++ b/pkgs/development/rocm-modules/llvm/default.nix
    @@ -314,7 +314,8 @@ overrideLlvmPackagesRocm (s: {
             hash = "sha256-6Pj3pRESaho60YhXWwaQxEKteSuziZseeT4FbZqZANk=";
           })
         ]
    -    ++ old.patches
    +    # patch appears to require llvm > 22.0.0, introduced in https://github.com/NixOS/nixpkgs/pull/564039 against llvm 22.1.8
    +    ++ (lib.filter (p: !(lib.hasSuffix "backport-minimal-arm64e_x1-support.patch" (baseNameOf (toString p)))) old.patches)
         ++ [
           ./perf-increase-namestring-size.patch
           # v64i8 shuffle lowering inf loop on VBMI targets, hangs whisper-cpp etc
  3. changed the title [-]Build failure: rocmPackages.llvm.llvm (staging)[/-] [+]Build failure: rocmPackages.llvm.llvm (staging-next)[/+] on Sep 25, 2026
  4. vcunat commented on Sep 25, 2026

    @vcunat
    Member

    /cc @NixOS/rocm instead of a single person, I guess?

    Now that this failure is in staging-next it's easier to test, as x86_64-linux binaries are available (in the default cache.nixos.org).

  5. anund commented on Sep 26, 2026

    @anund
    ContributorAuthor

    Looks like the associated patch can't apply until rocm 10 which updates to basing on llvm 23.0.0. Broken file appears to have changes around the 22.1.0-rc1 release in llvm proper.

    Rocm 7.2.4 still bases on 22.0.0

  6. anund commented on Sep 26, 2026

    @anund
    ContributorAuthor

    @sempiternal-aurora does the arm64e_x1 support patch depend on other changes in ~22.1.0 or could it be back ported to 22.0.0? I don't have access to hardware to attempt a test.

  7. sempiternal-aurora commented on Sep 26, 2026

    @sempiternal-aurora
    Contributor

    @sempiternal-aurora does the arm64e_x1 support patch depend on other changes in ~22.1.0 or could it be back ported to 22.0.0? I don't have access to hardware to attempt a test.

    Afaik only the textapi changes, which we already apply to 21 and below. Not sure if it's already in 22.0.0, so you may need to change when that's applied.

    Edit: to be clear, nothing stopping it from being changed to apply to llvm 20.0.0, so feel free to rewrite it if needed.

  8. vcunat commented on Sep 28, 2026

    @vcunat
    Member

    Related FYI: python3Packages.torchWithRocm still regresses in the current staging-next
    https://hydra.nixos.org/build/346878974/step/2/log/tail
    (with ~500 jobs being blocked by that, apparently)

  9. anund commented on Sep 28, 2026

    @anund
    ContributorAuthor

    I'm aware of both. Torch has broken in multiple ways both on master and on staging since the initial report.

    migraphx is new but higher in the tree of dependencies than torch.

    Current goal is to get torch stable on staging, then master, then look at migraphx. (other's are free to beat me to migraphx)

  10. anund commented on Sep 28, 2026

    @anund
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions