!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

563 Members
120 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
19 Oct 2025
@matthewcroughan:defenestrate.itmatthewcroughan 39.3 MiB, image.raw.zst) 17:43:10
@matthewcroughan:defenestrate.itmatthewcroughanOkay, maybe I should stop now 17:43:14
20 Oct 2025
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)

matthewcroughan: https://github.com/NixOS/nixpkgs/pull/453557/commits/f3b1b7752116a278b0d9e63b956cb44b832941fa
@Sigmanificient has managed to make the musl build work, and forcing the musl version of the package still has a succeeding test:

diff --git a/nixos/tests/login-nosuid.nix b/nixos/tests/login-nosuid.nix
index cdd14478d02c..7f6242294fe0 100644
--- a/nixos/tests/login-nosuid.nix
+++ b/nixos/tests/login-nosuid.nix
@@ -21,6 +21,8 @@
       security.enableWrappers = false;
       security.pwaccess.enable = true;
 
+      security.pwaccess.package = pkgs.pkgsMusl.pwaccess;
+
       environment.systemPackages = [ pkgs.which ];
 
       # pam debug without giant rebuild

So, you may be able to just take that whole PR, set security.pwaccess.enable = true; and security.enableWrappers = false;, and then have suid-less login!

09:40:19
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)who needs suid anyways :P09:42:52
23 Oct 2025
@electro__:matrix.orgElectro

Trying to cross compile the linux kernel with clang, finding that for some reason pkgsCross.aarch64-multiplatform.buildPackages.clang does not not have arm_neon.h. Looks like for some reason it's set up to just use --gcc-toolchain= pointing to the aarch64 gcc toolchain, which in my experience always runs into these incompatible header issues. The build finds this one, but it seems some of the types are messed up when it's used for clang. I've always been baffled by clang's intent to be a cross-compiler, but always being so difficult :(

Would appreciate if anyone has any suggestions on how to approach these kinds of problems.

00:22:26
@electro__:matrix.orgElectro *

Trying to cross compile the linux kernel with clang, finding that for some reason pkgsCross.aarch64-multiplatform.buildPackages.clang does not have arm_neon.h. Looks like for some reason it's set up to just use --gcc-toolchain= pointing to the aarch64 gcc toolchain, which in my experience always runs into these incompatible header issues. The build finds this one, but it seems some of the types are messed up when it's used for clang. I've always been baffled by clang's intent to be a cross-compiler, but always being so difficult :(

Would appreciate if anyone has any suggestions on how to approach these kinds of problems.

00:22:40
@electro__:matrix.orgElectro Interestingly the pkgsCross.aarch64-multiplatform.clang package does have its own arm_neon.h that presumably works, though of course I want to cross compile... 00:25:56
@matthewcroughan:defenestrate.itmatthewcroughan Grimmauld (any/all): ping 12:24:39
@matthewcroughan:defenestrate.itmatthewcroughanwhat romo is this?12:24:41
@matthewcroughan:defenestrate.itmatthewcroughan* what room is this?12:24:44
@matthewcroughan:defenestrate.itmatthewcroughanimage.png
Download image.png
12:24:50
@matthewcroughan:defenestrate.itmatthewcroughanmatrix :(12:24:55
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)cross-compiling12:24:57
@matthewcroughan:defenestrate.itmatthewcroughanthis is where I was in, not exotic targets 12:25:05
@matthewcroughan:defenestrate.itmatthewcroughanHow do you fix Matrix amnesia?12:50:33
@mrargoz:matrix.org@mrargoz:matrix.org joined the room.20:53:40

Show newer messages


Back to Room ListRoom Version: 6