!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

565 Members
118 Servers

Load older messages


SenderMessageTime
26 Feb 2026
@artturin:matrix.orgArtturinThis should really be true so you can be sure that you have the right behaviour19:51:55
@dramforever:matrix.orgdramforeveri can't tell if this crane thing is doing the right thing19:53:08
@rosssmyth:matrix.org@rosssmyth:matrix.org If you are using Crane, if you use pkgsCross.mingwW64.callPackage, you do not have to manually specify windows.pthreads 19:54:18
@rosssmyth:matrix.org@rosssmyth:matrix.orgBecause of a change a really cool person did https://github.com/ipetkov/crane/commit/7cc51a10ddafa9ed1693afdf26d1bffb6ce027a019:55:13
@dramforever:matrix.orgdramforever... i fail to see how19:55:19
@dramforever:matrix.orgdramforeverooooh19:55:42
@rosssmyth:matrix.org@rosssmyth:matrix.orgIt checks what stdenv is being used19:55:48
@dramforever:matrix.orgdramforeverbecause it's handled in crane19:55:49
@rosssmyth:matrix.org@rosssmyth:matrix.org I want to do this in Nixpkgs for rustPlatform.buildRustPackage but no one seems to be able to agree how to do it 19:56:20
@rosssmyth:matrix.org@rosssmyth:matrix.orgSo it's just not done atm 19:56:28
@rosssmyth:matrix.org@rosssmyth:matrix.orgThere is an attempt to do it, but it doesn't work19:56:38
@rosssmyth:matrix.org@rosssmyth:matrix.orghttps://github.com/NixOS/nixpkgs/blob/254bfbcf45f588ecac20e2d79e163ee133037638/pkgs/build-support/rust/build-rust-package/default.nix#L16419:57:16
@rosssmyth:matrix.org@rosssmyth:matrix.orgDoesn't work because rustc nor the rustc wrapper never looks are buildInputs 19:57:38
@rosssmyth:matrix.org@rosssmyth:matrix.org* Doesn't work because rustc nor the rustc wrapper never look at buildInputs 19:57:45
@rosssmyth:matrix.org@rosssmyth:matrix.orghttps://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.org@rosssmyth:matrix.orgSomething 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.org@rosssmyth:matrix.org* 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.org@rosssmyth:matrix.org* 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.org@rosssmyth:matrix.orgor maybe the opposite where rustc tells llvm to link it in uncondtionally 20:06:52
@rosssmyth:matrix.org@rosssmyth:matrix.orgidk20:06:54
@rosssmyth:matrix.org@rosssmyth:matrix.org* 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.org@rosssmyth:matrix.orgIt tells it where to find it20:08:45
@rosssmyth:matrix.org@rosssmyth:matrix.orghttps://github.com/rust-lang/rust/blob/25396cf54981afd1fa5a7406658b45033106a0d3/compiler/rustc_target/src/spec/base/windows_gnu.rs#L7020:08:56
@rosssmyth:matrix.org@rosssmyth:matrix.orgI believe this is the offending code20:09:02
@rosssmyth:matrix.org@rosssmyth:matrix.orgWhere 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

Show newer messages


Back to Room ListRoom Version: 6