| 23 Nov 2025 |
kwinz | * I am having trouble nixos-rebuild switching to a minimal configuration on the visionfive 2, with nixos unstable because it tries to build GO and fails | 09:35:28 |
dramforever | it will be fixed when this lands https://github.com/NixOS/nixpkgs/pull/458867 | 10:05:26 |
Tristan Ross | In reply to @kwinz:matrix.org I am having trouble nixos-rebuild switching to a minimal configuration on the visionfive 2, with nixos unstable because it tried to build GO and fails Yeah been running into the same problem | 17:12:27 |
Tristan Ross | In reply to @dramforever:matrix.org it will be fixed when this lands https://github.com/NixOS/nixpkgs/pull/458867 Oh that's good | 17:12:32 |
Tristan Ross | Wait, is this a part of the problem where PIE just doesn't work on RISC-V because the flag isn't set? | 17:16:46 |
Tristan Ross | * Wait, is this a part of the problem where PIE just doesn't work on RISC-V because the flag isn't set in the ELF executable? | 17:17:06 |
dramforever | In reply to @rosscomputerguy:matrix.org Wait, is this a part of the problem where PIE just doesn't work on RISC-V because the flag isn't set in the ELF executable? "what flag" | 18:51:09 |
dramforever | okay at one point static pie didn't work on riscv*-linux but that should be fixed now. i think | 18:51:32 |
Tristan Ross | In reply to @dramforever:matrix.org "what flag" I think it's DF_1_PIE | 18:56:22 |
Tristan Ross | In reply to @dramforever:matrix.org okay at one point static pie didn't work on riscv*-linux but that should be fixed now. i think When was it fixed? | 18:56:40 |
Tristan Ross | Because I did run into the problem like 2 weeks ago | 18:56:57 |
dramforever | oh hmm interesting | 20:22:10 |
dramforever | i didn't think it mattered? | 20:22:26 |
dramforever | do you mean a go program? | 20:22:38 |
Tristan Ross | GCC & patchelf in the bootstrap-tools | 20:25:30 |
Tristan Ross | But the go error is preventing me from building for the system lol | 20:25:49 |
dramforever | wasn't that a non-pie problem? | 20:26:38 |
Tristan Ross | GCC has a PIE address but the flag in the ELF header isn't set | 20:26:58 |
Tristan Ross | So vm.mmap_min_addr is higher than the PHDR address | 20:27:09 |
Tristan Ross | Which causes the kernel to fail the mmap of the PHDR | 20:27:21 |
Tristan Ross | Patchelf was fixed at some point and that one fixes itself after updating the bootstrap-tools but GCC is still broken | 20:28:06 |
dramforever | no no no a normal PIE would start at address 0 | 20:29:05 |
dramforever | that one has file type ET_EXEC | 20:29:16 |
dramforever | pies have ET_DYN but also DF_1_PIE | 20:29:34 |
Tristan Ross | The PHDR starts at 0xf000 but the vm.mmap_min_addr is 65535 | 20:29:38 |
dramforever | why do you think it's a pie | 20:29:58 |
Tristan Ross | Because I thought that's what you mentioned it was when we were looking at this problem a couple weeks ago | 20:30:32 |
dramforever | i said it's not a pie | 20:30:45 |
Tristan Ross | Huh | 20:30:59 |
Tristan Ross | So why else would mmap fail with 0xf000 when vm.mmap_min_addr is 65535? | 20:31:29 |