nix icon indicating copy to clipboard operation
nix copied to clipboard

functional tests fail when building in binfmt qemu

Open raboof opened this issue 8 months ago • 3 comments

Describe the bug

When I build the aarch64 nix on a x86 machine, the nix-functional-tests fail.

Steps To Reproduce

On an x86 machine, nix build github:nixos/nix#packages.aarch64-linux.nix. This produces a build failure in the installCheckPhase:

       >
       > Summary of Failures:
       >
       >   6/192 nix-functional-tests:main / remote-store                            FAIL           11.99s   exit status 1
       >  13/192 nix-functional-tests:main / fetchurl                                FAIL            7.61s   exit status 1
       >  28/192 nix-functional-tests:main / secure-drv-outputs                      FAIL           11.01s   exit status 1
       >  31/192 nix-functional-tests:main / check                                   FAIL           39.62s   exit status 1
       > 101/192 nix-functional-tests:main / repl                                    FAIL           93.40s   exit status 2
       > 106/192 nix-functional-tests:main / impure-env                              FAIL            9.25s   exit status 1
       > 119/192 nix-functional-tests:main / impure-derivations                      FAIL           46.96s   exit status 1
       > 156/192 nix-functional-tests:ca / repl                                      FAIL           94.83s   exit status 2
       >
       > Ok:                 152
       > Expected Fail:      0
       > Fail:               8
       > Unexpected Pass:    0
       > Skipped:            32
       > Timeout:            0

nix-cross-build-logs.txt

Expected behavior

The build to succeed

Metadata

nix-env (Nix) 2.24.14

Additional context

Checklist


Add :+1: to issues you find important.

raboof avatar Apr 17 '25 20:04 raboof

packages.aarch64-linux.nix is not a true cross build. Is this with qemu-user and binfmt_misc, or with a NixOS builder VM?

roberth avatar Apr 17 '25 20:04 roberth

packages.aarch64-linux.nix is not a true cross build.

Right

Is this with qemu-user and binfmt_misc

Yes, this is on an x86 machine with boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv6l-linux" ]; configured, indeed. I don't use qemu-user explicitly but I assume that's what happens under the hood.

or with a NixOS builder VM?

No, I haven't tried that yet.

raboof avatar Apr 17 '25 20:04 raboof

(I didn't manage to set up a NixOS builder VM, ran into kvm errors)

raboof avatar Jun 18 '25 12:06 raboof