| 26 Feb 2026 |
rosssmyth | https://github.com/NixOS/nixpkgs/blob/254bfbcf45f588ecac20e2d79e163ee133037638/pkgs/build-support/rust/build-rust-package/default.nix#L164 | 19:57:16 |
rosssmyth | Doesn't work because rustc nor the rustc wrapper never looks are buildInputs | 19:57:38 |
rosssmyth | * Doesn't work because rustc nor the rustc wrapper never look at buildInputs | 19:57:45 |
rosssmyth | https://github.com/NixOS/nixpkgs/pull/457066 | 19:59:12 |
dramforever | this is kind of weird | 20:01:30 |
dramforever | so i don't understand why rustc needs to know this | 20:01:56 |
rosssmyth | Something about mingw requiring pthreads but most other targets don't so rustc doesn't try to link it by default. It's been a while since I looked into it. | 20:05:18 |
rosssmyth | * Something about mingw requiring pthreads but most other targets don't so rustc doesn't tell llvm link pthreads in by default. It's been a while since I looked into it. | 20:05:39 |
rosssmyth | * Something about mingw requiring pthreads but most other targets don't so rustc doesn't tell llvm to link pthreads in by default. It's been a while since I looked into it. | 20:05:45 |
rosssmyth | or maybe the opposite where rustc tells llvm to link it in uncondtionally | 20:06:52 |
rosssmyth | idk | 20:06:54 |
rosssmyth | * or maybe the opposite where rustc tells llvm to link it in uncondtionally, but only on mingw | 20:07:30 |
dramforever | yeah your code does neither of that | 20:07:50 |
dramforever | so what it makes me think is that all libraries are broken | 20:08:44 |
rosssmyth | It tells it where to find it | 20:08:45 |
rosssmyth | https://github.com/rust-lang/rust/blob/25396cf54981afd1fa5a7406658b45033106a0d3/compiler/rustc_target/src/spec/base/windows_gnu.rs#L70 | 20:08:56 |
rosssmyth | I believe this is the offending code | 20:09:02 |
rosssmyth | Where it says "pls link pthreads"
But since it's not anywhere normal on Nix, it cannot find it | 20:09:23 |
emily | surely stdenv should just set up that path | 20:09:36 |
emily | isn't this why -pthread exists though (it's even POSIX IIRC?) | 20:09:48 |
rosssmyth | Well it always must be set manually in my experience! So surely it doesn't. | 20:10:02 |
emily | I mean should as in, that's the place we should fix it | 20:10:21 |
emily | I guess the counterargument is that pthreads aren't natively supported on Windows? | 20:10:33 |
rosssmyth | Yeah it's a compat layer | 20:10:43 |
emily | but then how do Rust distributions ensure the pthreads implementation is shipped and available | 20:10:44 |
emily | like rustu | 20:10:48 |
emily | * like rustup | 20:10:50 |
rosssmyth | Unsure, but my guess is it is in the rust gnu distribution bundle | 20:11:32 |
rosssmyth | Which I never use cause mingw mostly sucks | 20:11:49 |
rosssmyth | Unless you love your builds breaking all the time | 20:12:04 |