!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

582 Members
126 Servers

Load older messages


SenderMessageTime
2 Oct 2025
@spikespaz:envs.net@spikespaz:envs.netDoesn't that require a binfmt translator to run the windows-native rustc?21:31:09
@rosssmyth:matrix.org@rosssmyth:matrix.orgThat is not what it is compiling. 21:31:28
@rosssmyth:matrix.org@rosssmyth:matrix.orgIt is basically compiling rustc that can target x8621:31:38
@rosssmyth:matrix.org@rosssmyth:matrix.orgBut because of limitation of the rustc derivation it must rebuild all of rustc21:31:51
@spikespaz:envs.net@spikespaz:envs.net How does this look to you? This is very much in flux, and the outer rustPlatform from rust-overlay is unused at the moment. That is on purpose; I'd like to get it working with nixpkgs#rustPlatform.
https://github.com/spikespaz-contrib/noita-entangled-worlds/blob/u/jacob/nix-package-ewext/nix/packages/ewext.nix
21:32:15
@rosssmyth:matrix.org@rosssmyth:matrix.orgIt is target-prefixed like gcc21:32:05
@rosssmyth:matrix.org@rosssmyth:matrix.orgtargets is a list 21:32:51
@spikespaz:envs.net@spikespaz:envs.netit's not being used anyway at the moment.21:33:15
@rosssmyth:matrix.org@rosssmyth:matrix.orgLooks fine to me. Why aren't you using it?21:34:02
@spikespaz:envs.net@spikespaz:envs.net
       >           /nix/store/asqlz348q8ln81iza5wv79wvrrqhfvxh-i686-w64-mingw32-binutils-2.44/bin/i686-w64-mingw32-ld: /build/rustc-1.89.0-src/build/x86_64-unknown-linux-gnu/stage1-std/i686-pc-windows-gnu/release/deps/libgimli-10feed5729a3b158.rlib(gimli-10feed5729a3b158.gimli.3fc3ea03a1049962-cgu.01.rcgu.o):gimli.3fc3ea03a1049962-cgu.01:(.text+0xa6): more undefined references to `_Unwind_Resume' follow
       >           collect2: error: ld returned 1 exit status
       >
       >   = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
       >   = note: use the `-l` flag to specify native libraries to link
       >   = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
       >
       > error: could not compile `std` (lib) due to 1 previous error
21:34:10
@spikespaz:envs.net@spikespaz:envs.net as stated, I want to shim in rust-bin at the last possible moment. 21:34:28
@rosssmyth:matrix.org@rosssmyth:matrix.orgWhat's the last possible moment? I don't understand the goal21:34:51
@rosssmyth:matrix.org@rosssmyth:matrix.orgJust provide it as an input to the derivation21:35:33
@spikespaz:envs.net@spikespaz:envs.net The goal is to get the build working without rust-bin for now 21:35:50
@rosssmyth:matrix.org@rosssmyth:matrix.org Also you should be doing pkgsCross.mingw32.makeRustPlatform 21:35:57
@spikespaz:envs.net@spikespaz:envs.net and the rust-stable comes from the host overlays rust-bin, not pkgsCross.mingw32.rust-bin? 21:37:19
@spikespaz:envs.net@spikespaz:envs.net either way, again, not using rust-bin yet, that rustPlatform is from nixpkgs, not an override 21:37:43
@rosssmyth:matrix.org@rosssmyth:matrix.orgI just use the host cause it shouldn't make a difference since it's not wrapped21:37:52
@spikespaz:envs.net@spikespaz:envs.net Whether I do or don't use rust-bin makes no difference for the missing natives for std in the error above 21:38:29
@rosssmyth:matrix.org@rosssmyth:matrix.orgYou don't have to compile std from rust-bin so yeah21:39:06
@rosssmyth:matrix.org@rosssmyth:matrix.orgYou'll also have to manually provide pthreads most likely 21:39:36
@rosssmyth:matrix.org@rosssmyth:matrix.orgCause for some reason rustc doesn't find it without some help21:39:51
@spikespaz:envs.net@spikespaz:envs.net Package ‘mingw_w64-pthreads-13.0.0’ in /nix/store/..windows/mingw-w64/headers.nix:35 is not available on the requested hostPlatform: 21:41:32
@rosssmyth:matrix.org@rosssmyth:matrix.orgWhat are you building on?21:42:26
@spikespaz:envs.net@spikespaz:envs.netx86_64-linux21:43:08
@rosssmyth:matrix.org@rosssmyth:matrix.orgWorks fine for me. How are you getting pthreads? 21:44:05
@spikespaz:envs.net@spikespaz:envs.netpassing windows.pthreads to buildInputs21:47:49
5 Oct 2025
@ashleyghooper:matrix.orgAsh changed their display name from ashleyghooper to Ash.06:27:47
@hoshinoaya:matrix.orghoshinoaya joined the room.17:56:02
6 Oct 2025
@vog:matrix.orgvog joined the room.13:26:17

Show newer messages


Back to Room ListRoom Version: 6