| 18 Mar 2026 |
JamieMagee | Yes, it's on QEMU | 16:32:44 |
dramforever | the binfmt thing, right? | 16:36:27 |
dramforever | i don't think i can in good conscience accept this. so many packages fail tests in qemu-user that we'll keep adding these, until the real riscv machine gets good then these would be obsolete | 16:40:52 |
dramforever | * | 16:41:04 |
dramforever | as an example, a good while back even coreutils fails tests under qemu-user | 16:41:20 |
dramforever | a while back i wrote a hydra hack to schedule builds based on derivation meta | 16:43:15 |
dramforever | it still needs some weird extra hacks on top but it avoids changing hash | 16:43:32 |
dramforever | https://github.com/dramforever/hydra/tree/description-feature-hack | 16:44:16 |
dramforever | this plus marking them in meta plus adding them into actual hydra jobs lets you schedule these failing derivations into a full system emulation or real riscv64 machine | 16:45:27 |
dramforever | it "worked", but nobody got around to actually marking stuff... | 16:45:48 |
Alyssa Ross | globally disable checking if using binfmt imo 😈️ | 16:49:41 |
dramforever | i need to get nix --binfmt-misc pr'd into nix some time... | 16:50:49 |
dramforever | if you haven't seen, https://github.com/dramforever/nix/pull/25 | 16:51:16 |
dramforever | it's just a little bit too hacky, and the rabbit hole got so deep i sent a patch to linux man-pagea | 16:51:55 |
dramforever | * it's just a little bit too hacky, and the rabbit hole got so deep i sent a patch to linux man-pages | 16:52:02 |
JamieMagee | Yeah, qemu-user | 17:39:14 |
| 19 Mar 2026 |
JamieMagee | I appreciate you taking the time to look into it with me. I've closed out my PR and I'll workaround it locally with an overlay. | 05:20:07 |
Alex | Frankly, I'm surprised that QEMU continues to get RISC-V emulation subtly wrong. | 06:13:22 |
Alex | Or is the issue unrelated to QEMU in that some things behave weirdly when userspace and kernelspace are on different architectures? | 06:15:15 |
Alyssa Ross | often qemu-user just doesn't implement certain stuff — remember it's not just emulating the architecture; it has to emulate the whole Linux API | 06:23:38 |
dramforever | -ENOSYS is one of the least subtle wrongs qemu-user commits | 12:39:17 |
dramforever | but yes usually you can expect user emulation to have a crap ton more problems than system emulation | 12:40:03 |
colemickens | Is there a branch y'all follow or maintain? Or just ride nixos-unstable and cross your fingers? :) | 19:17:42 |
Alex | Generally two options:
- Latest and pray
- Find someone else's (hopefully working) configuration and use the same revision as them
| 19:22:52 |
Sergei Zimmerman (xokdvium) | In reply to @alex:tunstall.xyz Or is the issue unrelated to QEMU in that some things behave weirdly when userspace and kernelspace are on different architectures? Well, nix is one for example https://github.com/NixOS/nix/issues/15153 | 20:16:49 |
Alex | Yes, I ran into that issue myself a few weeks ago while doing binfmt emulation of aarch64. | 20:18:01 |
Sergei Zimmerman (xokdvium) | I guess it should be pretty easy to fix by just calling uname and using the appropriate arch for setting up seccomp? | 20:23:35 |
Alex | colemickens good news:
alex@alex-pc3 ~/r/O/n/ghc-cross-2 (ghc-cross-hadrian)> /nix/store/7kjpbn6fv6gqi9fx65ann5bqdsm3s9fi-riscv64-unknown-linux-gnu-ghc-9.10.3/bin/riscv64-unknown-linux-gnu-ghc --info | grep platform
,("target platform string","riscv64-unknown-linux")
,("Build platform","x86_64-unknown-linux")
,("Host platform","x86_64-unknown-linux")
,("Target platform","riscv64-unknown-linux")
I'm still double checking that the cross-compiler works, but I expect to PR the fix to Nixpkgs soon enough. | 21:35:58 |
Alex | This alone is not enough to cross-compile cachix:
---> Starting interpreter on port 6072
Listening on port 6072
iserv-proxy-interpreter: tmp/nix/store/7kjpbn6fv6gqi9fx65ann5bqdsm3s9fi-riscv64-unknown-linux-gnu-ghc-9.10.3/lib/riscv64-unknown-linux-gnu-ghc-9.10.3/lib/riscv64-linux-ghc-9.10.3/ghc-prim-0.12.0-561f/libHSghc-prim-0.12.0-561f.a: RTS linker not implemented on riscv
iserv-proxy-interpreter: loadArchive "tmp/nix/store/7kjpbn6fv6gqi9fx65ann5bqdsm3s9fi-riscv64-unknown-linux-gnu-ghc-9.10.3/lib/riscv64-unknown-linux-gnu-ghc-9.10.3/lib/riscv64-linux-ghc-9.10.3/ghc-prim-0.12.0-561f/libHSghc-prim-0.12.0-561f.a": failed
iserv-proxy: <socket: 17>: hGetBufSome: resource vanished (Connection reset by peer)
HasCallStack backtrace:
collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/IO.hs:260:11 in ghc-internal:GHC.Internal.IO
throwIO, called at libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs:315:19 in ghc-internal:GHC.Internal.IO.Exception
ioException, called at libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs:319:20 in ghc-internal:GHC.Internal.IO.Exception
/nix/store/vw5aaxwm2fppx1xarn7k41db5yr3rvww-iserv-wrapper-both/bin/iserv-wrapper: line 1: kill: (499) - No such process
<no location info>: error: External interpreter terminated (1)
| 21:43:39 |
Alex | colemickens https://github.com/NixOS/nixpkgs/pull/501439 | 22:00:19 |