!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

565 Members
118 Servers

Load older messages


SenderMessageTime
26 Feb 2026
@rosssmyth:matrix.orgrosssmythhttps://github.com/NixOS/nixpkgs/blob/254bfbcf45f588ecac20e2d79e163ee133037638/pkgs/build-support/rust/build-rust-package/default.nix#L16419:57:16
@rosssmyth:matrix.orgrosssmythDoesn't work because rustc nor the rustc wrapper never looks are buildInputs 19:57:38
@rosssmyth:matrix.orgrosssmyth* Doesn't work because rustc nor the rustc wrapper never look at buildInputs 19:57:45
@rosssmyth:matrix.orgrosssmythhttps://github.com/NixOS/nixpkgs/pull/45706619:59:12
@dramforever:matrix.orgdramforeverthis is kind of weird20:01:30
@dramforever:matrix.orgdramforeverso i don't understand why rustc needs to know this20:01:56
@rosssmyth:matrix.orgrosssmythSomething 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:matrix.orgrosssmyth* 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:matrix.orgrosssmyth* 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:matrix.orgrosssmythor maybe the opposite where rustc tells llvm to link it in uncondtionally 20:06:52
@rosssmyth:matrix.orgrosssmythidk20:06:54
@rosssmyth:matrix.orgrosssmyth* or maybe the opposite where rustc tells llvm to link it in uncondtionally, but only on mingw20:07:30
@dramforever:matrix.orgdramforeveryeah your code does neither of that20:07:50
@dramforever:matrix.orgdramforever so what it makes me think is that all libraries are broken 20:08:44
@rosssmyth:matrix.orgrosssmythIt tells it where to find it20:08:45
@rosssmyth:matrix.orgrosssmythhttps://github.com/rust-lang/rust/blob/25396cf54981afd1fa5a7406658b45033106a0d3/compiler/rustc_target/src/spec/base/windows_gnu.rs#L7020:08:56
@rosssmyth:matrix.orgrosssmythI believe this is the offending code20:09:02
@rosssmyth:matrix.orgrosssmythWhere it says "pls link pthreads" But since it's not anywhere normal on Nix, it cannot find it20:09:23
@emilazy:matrix.orgemily surely stdenv should just set up that path 20:09:36
@emilazy:matrix.orgemily isn't this why -pthread exists though (it's even POSIX IIRC?) 20:09:48
@rosssmyth:matrix.orgrosssmythWell it always must be set manually in my experience! So surely it doesn't. 20:10:02
@emilazy:matrix.orgemilyI mean should as in, that's the place we should fix it20:10:21
@emilazy:matrix.orgemilyI guess the counterargument is that pthreads aren't natively supported on Windows?20:10:33
@rosssmyth:matrix.orgrosssmythYeah it's a compat layer20:10:43
@emilazy:matrix.orgemilybut then how do Rust distributions ensure the pthreads implementation is shipped and available20:10:44
@emilazy:matrix.orgemilylike rustu20:10:48
@emilazy:matrix.orgemily* like rustup20:10:50
@rosssmyth:matrix.orgrosssmythUnsure, but my guess is it is in the rust gnu distribution bundle20:11:32
@rosssmyth:matrix.orgrosssmythWhich I never use cause mingw mostly sucks 20:11:49
@rosssmyth:matrix.orgrosssmythUnless you love your builds breaking all the time 20:12:04

Show newer messages


Back to Room ListRoom Version: 6