!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

572 Members
126 Servers

Load older messages


SenderMessageTime
12 Dec 2024
@k900:0upti.meK900We should probably have it not say that18:48:09
@k900:0upti.meK900Or tell you to cross-compile to the other variant of your existing target18:48:30
@k900:0upti.meK900i.e. aarch64-darwin to x86_64-darwin or vice versa18:48:39
@k900:0upti.meK900Or equivalent for Linux18:48:43
@dont.wanna.tell:matrix.orgMartin Häcker

I'm referring to https://nixos.org/manual/nixpkgs/stable/#chap-cross where it says:

The tests are conducted by a cluster called Hydra, which also builds binary packages from the Nix expressions in Nixpkgs for x86_64-linux, i686-linux and x86_64-darwin. The binaries are made available via a binary cache.

18:49:05
@k900:0upti.meK900And?18:51:05
@k900:0upti.meK900Oh wait18:51:51
@k900:0upti.meK900Yeah OK I see how you read that wrong18:51:58
@k900:0upti.meK900That's not just for cross18:52:00
@k900:0upti.meK900That's for everything18:52:03
@k900:0upti.meK900And mostly non-cross things18:52:06
@k900:0upti.meK900And Hydra does build aarch64-darwin, the docs just are out of date18:52:17
@dont.wanna.tell:matrix.orgMartin HäckerSo, the cross packages are generally not built / cached on hydra, or is the 24.11 channel just too new for them to be cached yet?18:53:16
@k900:0upti.meK900Cross packages are generally not built18:53:33
@k900:0upti.meK900We build a very small subset of specifically x86_64-linux to aarch64-linux18:53:43
@artturin:matrix.orgArtturinSee https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/release-cross.nix for what is built18:54:04
@dont.wanna.tell:matrix.orgMartin Häckerso the fact that it seemed they where for darwin-x86 has some other reason18:54:04
@k900:0upti.meK900You probably downloaded the native x86_64-darwin toolchain18:54:27
@k900:0upti.meK900Which is used to build the cross toolchain18:54:32
@k900:0upti.meK900That should be cached for all four tier 1 targets18:54:39
@dont.wanna.tell:matrix.orgMartin HäckerLooking at https://github.com/NixOS/nixpkgs/blob/7f6f4d968db96de346a9b62d829e45cd5efd617c/pkgs/top-level/release-cross.nix#L16 it seems to me that there is darwin-x86 in there but not darwin-arm18:55:20
@dont.wanna.tell:matrix.orgMartin Häckeram I reading that wrong?18:55:23
@k900:0upti.meK900I don't think much of that is evaluated, never mind built18:56:34
@k900:0upti.meK900Hm it is actually18:57:13
@k900:0upti.meK900It just is mostly broken18:57:18
@k900:0upti.meK900https://hydra.nixos.org/eval/181043318:57:20
@k900:0upti.meK900Which is to be expected18:57:23
@k900:0upti.meK900Because Darwin to Linux cross is hard and also broken18:57:37
@dont.wanna.tell:matrix.orgMartin HäckerYeah, I guess so. So for future reference, if I want to try and follow the tutorials there, either use a docker container to build this or a linux vm?18:59:02
@artturin:matrix.orgArtturinWe probably want to replace x86_64-darwin there with aarch64-darwin since it's better supported nowadays, darwin to linux cross still broken though18:59:05

Show newer messages


Back to Room ListRoom Version: 6