NixOS RISC-V | 237 Members | |
| NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux https://github.com/orgs/NixOS/teams/risc-v | 69 Servers |
| Sender | Message | Time |
|---|---|---|
| 27 Mar 2024 | ||
| 02:24:01 | ||
In reply to @sorear:matrix.orgoh nice that you figured most of this out, for future reference there are a bunch of options that the initrd script takes to help debug with problems https://nixos.org/manual/nixos/stable/#sec-boot-problems | 11:38:50 | |
| in particular boot.shell_on_fail is probably the one you were looking for | 11:39:08 | |
| maybe | 18:12:07 | |
| still thinking the symlink would be useful (it was surprising to me that there wasn't a symlink, given that nixos installs always have one); doesn't affect security since the shell path isn't secret | 18:17:29 | |
| 28 Mar 2024 | ||
| ok so as far as i understand it, ghc doesn't support cross-compilation, ( pending PR merge ), so you need to do an emulated build, but also as far as i can tell, flakes doesn't support doing an emulated build ?? | 00:36:10 | |
| * ok so as far as i understand it, ghc doesn't support cross-compilation, ( pending PR merge ), so you need to do an emulated build, but also as far as i can tell, flakes doesn't support doing an emulated build ? | 00:36:20 | |
In reply to @hive:the-apothecary.club Flakes support binfmt emulation. The issue is that Nixpkgs doesn't know how to bootstrap GHC on RISC-V, because it doesn't know where to get a binary for GHC. | 00:36:58 | |
| Your options are either:
| 00:38:13 | |
| so even with an emulated build, it still doesn't bootstrap successfully ? | 00:39:25 | |
| (As the creator of the PR, I'm sorry I haven't yet found the time to get the PR merged.) | 00:39:27 | |
| i understand | 00:39:40 | |
In reply to @hive:the-apothecary.club Nixpkgs doesn't even evaluate, because it doesn't know where to find the RISC-V bootstrap binary. See for yourself: | 00:41:36 | |
| ah ok | 00:41:47 | |
| When building GHC from source, here's what Nixpkgs does:
(It is also possible to use the bindist directly, but AFAIK users rarely do that.) | 00:43:52 | |
| If you need help getting GHC working on RISC-V or you want to improve on my GHC cross-compilation PR, feel free to ask. | 00:45:47 | |
| i would love to help your PR get merged | 00:51:31 | |
| 01:51:39 | ||
In reply to @alex:tunstall.xyzI should ask the ghcup maintainer to produce one so we finally have a trusted haskell risc-v bootstrap path... | 11:00:09 | |
In reply to @alex:tunstall.xyzI tried using a self-compiled ghc963 bindist for rv64 directly to avoid recompiling ghc every now and then. Unfortunately a couple of packages fail to compile this way. also happens on amd64, try e.g. nixpkgs#haskell.packages.ghc963Binary.generics-sop. | 11:45:24 | |
| 15:11:46 | ||
In reply to @skeuchel:matrix.org The bindists only need to work well enough to compile GHC, so I assume that in Nixpkgs they might not be tested well enough for everything to work like it does with the Nixpkgs-native builds. This is still quite puzzling though, as those bindists generally work well in FHS-compatible distributions. | 15:22:08 | |
In reply to @skeuchel:matrix.org I tried building x86_64, All compilers except (Excuse the old RV64GC compiler versions. My dev board hasn't been updated in months and I don't have the patience to wait 15+ hours for a new GHC version to compile.) | 16:36:12 | |
| * I tried building x86_64, All compilers except (Excuse the old RV64GC compiler versions. My dev board hasn't been updated in months and I don't have the patience to wait 15+ hours for a new GHC version to compile.) | 16:36:37 | |
| i looked through the chat and couldn't find any good binary caches, maybe i missed something, but https://github.com/misuzu/nixos-vf2/blob/master/flake.nix#L3 seems to just give a 404 ? at the very least, when trying it i'm still getting the error with ghc so i'm not sure what's going on here | 23:41:51 | |
i think i have this setup correctly ? | 23:48:18 | |
In reply to @hive:the-apothecary.clubError with GHC? AFAIK GHC is not in any binary caches (at least, I haven't uploaded my GHC builds to one). | 23:49:14 | |
| ah, ok | 23:49:26 | |
| 29 Mar 2024 | ||
| so i'm trying to build with your branch, but i'm getting the error: | 11:54:02 | |
| i'm not sure what i'm doing wrong :( | 12:00:00 | |