!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

533 Members
115 Servers

Load older messages


SenderMessageTime
15 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughan

nix-repl> pkgsLLVM.hostPlatform.linker
"lld"

nix-repl> pkgsLLVM.pkgsMusl.hostPlatform.linker 
"bfd"
20:08:17
@rosscomputerguy:matrix.orgTristan RossRight eval, wrong order20:08:18
@matthewcroughan:defenestrate.itmatthewcroughan *
nix-repl> pkgsLLVM.hostPlatform.linker
"lld"

nix-repl> pkgsLLVM.pkgsMusl.hostPlatform.linker 
"bfd"
20:08:23
@rosscomputerguy:matrix.orgTristan Ross pkgsMusl.pkgsLLVM 20:08:30
@matthewcroughan:defenestrate.itmatthewcroughanAh.. I see20:08:35
@rosscomputerguy:matrix.orgTristan Ross It's the // problem 20:08:43
@matthewcroughan:defenestrate.itmatthewcroughanwell that's why it builds then I guess20:08:52
@matthewcroughan:defenestrate.itmatthewcroughanI got the order wrong20:08:56
@matthewcroughan:defenestrate.itmatthewcroughan nix build nixpkgs#pkgsMusl.pkgsLLVM.netbsd.getent should fail 20:09:20
@matthewcroughan:defenestrate.itmatthewcroughan Tristan Ross: actually pkgsMusl.pkgsLLVM sets the buildPlatform to musl 20:17:20
@rosscomputerguy:matrix.orgTristan RossHuh20:17:33
@matthewcroughan:defenestrate.itmatthewcroughan nix build github:nixos/nixpkgs/staging-next#pkgsMusl.pkgsLLVM.netbsd.getent 20:17:54
@matthewcroughan:defenestrate.itmatthewcroughanyes, this fails in the same way20:17:57
@matthewcroughan:defenestrate.itmatthewcroughanSo that's your reproducer20:18:44
@matthewcroughan:defenestrate.itmatthewcroughanEven when I set the buildPlatform to musl, it fails in the same way20:25:06
@matthewcroughan:defenestrate.itmatthewcroughanit only worked when I got the order wrong then, that's all20:25:19
@matthewcroughan:defenestrate.itmatthewcroughanso that derivation just doesn't build for musl atm20:25:24
@matthewcroughan:defenestrate.itmatthewcroughan* so that derivation just doesn't build for musl + llvm atm20:25:41
@matthewcroughan:defenestrate.itmatthewcroughanI cannot get it to stop stripping21:02:33
@matthewcroughan:defenestrate.itmatthewcroughandontStrip has no impact on the netbsd derivations21:02:38
@matthewcroughan:defenestrate.itmatthewcroughan Tristan Ross: this fixes it, but is it the right solution? 21:11:41
@matthewcroughan:defenestrate.itmatthewcroughan
diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
index e0be2bb06..cda2a441a 100644
--- a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
+++ b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
@@ -11,6 +11,7 @@
   netbsdSetupHook,
   makeMinimal,
   version,
+  binutils,
 }:

 mkDerivation (
@@ -69,6 +70,7 @@ mkDerivation (
         "TSORT=cat"
         # Can't process man pages yet
         "MKSHARE=no"
+        "OBJCOPY=${binutils}/bin/strip"
       ]
       ++ lib.optionals stdenv.hostPlatform.isDarwin [
         # GNU objcopy produces broken .a libs which won't link into dependers.
21:11:45
@rosscomputerguy:matrix.orgTristan RossUm21:11:59
@matthewcroughan:defenestrate.itmatthewcroughan What I really wanted to do was find a way to pass --strip-unneeded to the build 21:12:04
@rosscomputerguy:matrix.orgTristan Ross You probably want to use stdenv.cc.bintools 21:12:09
@matthewcroughan:defenestrate.itmatthewcroughanbut I could not figure out a way of doing it21:12:14
@emilazy:matrix.orgemily OBJCOPY=strip does not seem like it would ever be the right solution… 21:13:23
@matthewcroughan:defenestrate.itmatthewcroughanthis does not contain strip in this case21:14:21
@rosscomputerguy:matrix.orgTristan RossWeird21:14:31
@matthewcroughan:defenestrate.itmatthewcroughan /nix/store/ip27s5zi4zgdb65zbkccgpggr28sg506-aarch64-unknown-linux-musl-llvm-binutils-wrapper-19.1.7 21:15:11

Show newer messages


Back to Room ListRoom Version: 6