NixOS RISC-V | 222 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 | 64 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Apr 2026 | ||
| 14:16:53 | ||
| 15 Apr 2026 | ||
| 06:49:36 | ||
| 09:38:46 | ||
i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.mkShell/stdenv with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain instead of an x86->rv32 one... where's the problem with my mental model, and how can i get a shell with the right environment? | 09:46:07 | |
| i used this article and this one as sources, but I guess I might have missed or misunderstood something? | 09:47:22 | |
| * i used this article and this one as sources, but I guess I might h](https://www.hobson.space/posts/nixcross/)ave missed or misunderstood something? | 09:47:47 | |
| * i used this article and this one as sources, but I guess I might have missed or misunderstood something? | 09:48:05 | |
| * i used this article and this one as sources, but I guess I must have missed or misunderstood something? | 09:48:14 | |
| * i used this article and this one as sources, but I guess I must have missed or misunderstood something? | 09:49:44 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.mkShell/stdenv with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain, and if i do nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv32.mkShell {} and try to compile a simple program, I get a cc1: execvp: no such file or directory error... where's the problem with my mental model, and how can i get a shell with the right environment? | 09:54:19 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.mkShell/stdenv with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain, and if i do nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv32.mkShell {}' and try to compile a simple program, I get a cc1: execvp: no such file or directory error... where's the problem with my mental model, and how can i get a shell with the right environment? | 09:59:49 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.mkShell/stdenv with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain (which cc points to a nix-managed gcc, but for x86)... where's the problem with my mental model, and how can i get a shell with the right environment? | 10:01:19 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.stdenv/mkShell with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain (which cc points to a nix-managed gcc, but for x86)... where's the problem with my mental model, and how can i get a shell/derivation environment with the right toolchain? | 10:12:44 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.stdenv/mkShell with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain (which cc points to a nix-managed gcc, but for x86)... where's the problem with my mental model, and how can i get a shell/derivation environment with the right toolchain?(ideally i'd also like to get an llvm-based toolchain, but that seems like it's basically completely unsupported) | 10:14:20 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.stdenv/mkShell with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain (which cc points to a nix-managed gcc, but for x86)... where's the problem with my mental model, and how can i get a shell/derivation environment with the right toolchain?(ideally i'd also like to get an llvm-based toolchain, but that seems like it's basically completely unsupported ;-;) | 10:14:27 | |
* i'm not sure if this is the right place to ask, especially because this is a very noob question, but i'm trying to get a shell for doing cross-compilation from x86 to riscv. I thought it'd be a simple matter of getting a pkgsCross.riscv32.stdenv/mkShell with the right nativeBuildInputs etc, but if i do nix-shell -p pkgsCross.riscv32.stdenv, I just get an x86->x86 toolchain (which cc points to a nix-managed gcc, but for x86)... where's the problem with my mental model, and how can i get a shell/derivation environment with the right toolchain?(ideally i'd also like to get an llvm-based toolchain, but that seems like it's basically completely unsupported ;-; i mean, compiler-rt-libc-riscv32-unknown-linux-gnu is broken so...) | 10:15:21 | |
hmm, i might just be dumb... i though that .stdenv was basically just like an empty mkDerivation { } but I guess notalso i got confused by mkShell having which cc point to my system's cc, but actually $CC is correct it seems. it's just going to be annoying since some of the stuff i want to use has cc in its makefiles instead of $CC | 10:21:25 | |
| Redacted or Malformed Event | 10:50:43 | |
| * ok so i wasn't going crazy: trying it out with just
| 10:50:51 | |
| * ok so i wasn't going crazy: trying it out with just
:( | 10:53:55 | |
| * ok so i wasn't going crazy: trying it out with just
:( | 10:54:23 | |
| * ok so i wasn't going crazy: trying it out with just
:( | 10:55:24 | |
stdenv.cc is the toolchain | 13:01:19 | |
| but otherwise yeah pkgsCross.riscv32.mkShell should get you what you want | 13:03:23 | |
| yeah idk what i did, i was just confused | 13:03:49 | |
| my actual code was more complicated than just an empty mkShell, but working my way back up to it rather than trying to force the existing code into cross-compilation worked better | 13:05:02 | |
| * my actual nix code was more complicated than just an empty mkShell, but working my way back up to it rather than trying to force the existing nnix code into cross-compilation worked better | 13:06:44 | |
|
Yes, anything that hardcodes | 13:09:08 | |
| 21:44:25 | ||
| 21:44:28 | ||