Lix functional tests fails on aarch64 crosscompilation #467
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#467
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
I am trying to build and deploy a NixOS aarch64 system from a NixOS x64 system.
This works fine with
nix
, but is broken if I setnix.package = pkgs.lix;
in the target configuration.Lix aarch64 cross-compilation fails with:
Steps To Reproduce
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
nix run nixpkgs/24.05#pkgsCross.aarch64-multiplatform.lix
nix run nixpkgs#pkgsCross.aarch64-multiplatform.lix
(master as of 2024/08/15) also fails.Expected behavior
Lix should build.
nix --version
outputnix (Lix, like Nix) 2.90.0
That's not cross compilation, that's qemu-user. Cross compilation (as in, using a compiler targeting aarch64, built for x86_64) does not run the tests and so will in fact work. Unfortunately qemu-user is full of bugs and is known to not successfully build lix.
I would suggest instead, if you do not want cross compilation, building on physical hardware or qemu-system-aarch64 or, easiest, using lix from nixpkgs. Otherwise you can cross compile just lix by, i think, something to the effect of importing pkgs.path with hostPlatform = "aarch64-linux", buildPlatform = "x86_64-linux", then from that nixpkgs instance, pulling out the lix.
There may be other issues on the bug tracker about the problem you're running into, search for qemu. However I don't think we consider qemu-user to be a supported configuration, at least not sufficiently to work around its specific bugs, so I'm going to close this.
The invocation we typically use to cross compile Lix is:
And this worked the last we checked, but having checked just now, it appears Nixpkgs may have broken Meson cross compilation: