| 26 Feb 2026 |
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 |
rosssmyth | * Which I never use (on Windows) cause mingw mostly sucks | 20:12:18 |
rosssmyth | I will give it a look though | 20:12:38 |
dramforever | [nix-shell:~]$ x86_64-w64-mingw32-gcc -l:libpthread.a -o test x.c
[nix-shell:~]$ file test.exe
test.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows, 10 sections
| 20:13:14 |
dramforever | it sure looks like it should work | 20:13:23 |
dramforever | without additional arguments to the linker | 20:13:31 |
rosssmyth | Do we use gcc as the linker driver with rustc, or ld directly? | 20:14:08 |
emily | tbf I assume the MSVC target doesn't use a pthreads emulation library. | 20:14:35 |
emily | I hope? | 20:14:36 |
dramforever | both work | 20:14:40 |
dramforever | * both ld and gcc work | 20:14:49 |
dramforever | i think we should be using gcc | 20:14:52 |
rosssmyth | Yes | 20:15:03 |
dramforever | so like obviously my worry is not that it's not sending pthreads into rustc | 20:15:32 |
dramforever | but that we've managed to have it use the wrong linker | 20:15:44 |
emily | stop doing MinGW / Windows was not supposed to be given GCC / etc. | 20:15:54 |
rosssmyth | rustc just tells the linker to use it | 20:15:54 |