!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

581 Members
128 Servers

Load older messages


SenderMessageTime
25 Jan 2026
@dramforever:matrix.orgdramforever yeah it's compiling that with gcc aka $CC_FOR_BUILD 13:31:07
@dramforever:matrix.orgdramforeverwhich is std=c2313:31:09
@dramforever:matrix.orgdramforever

it's this line

gcc -c  -DHAVE_CONFIG_H -DSHELL -I. -I..  -I.. -I../include -I../lib -I.  -Wno-parentheses -Wno-format-security   -g -DCROSS_COMPILING mkbuiltins.c
13:31:25
@dramforever:matrix.orgdramforever has nothing to do with the aarch64-unknown-linux-musl-clang line 13:31:43
@dramforever:matrix.orgdramforever lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) does fix it 13:36:15
@dramforever:matrix.orgdramforeveri'm guessing if you don't condition it on cross it breaks the native bootstrap instead?13:36:44
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemoooh yeah13:37:06
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemI see13:37:08
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem dramforever: next is iproute2 14:46:28
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemhttps://termbin.com/sz5114:47:02
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem utils_math.c43:136:13: error: | #define SIOCGSTAMPNS use of undeclared identifier 'UINT_MAX'SI 14:47:29
@rick:matrix.ciphernetics.nlRick (Mindavi)Missing include maybe? But would be strange vs normal compilation15:14:09
26 Jan 2026
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem Mindavi: looks like it happens both on native and cross 15:39:22
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemThis is the only thing blocking me from bumping https://github.com/MatthewCroughan/nixos-musl15:40:39
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem maybe Grimmauld (any/all) knows? 15:40:48
@grimmauld:m.grimmauld.deGrimmauld (any/all)

no idea, iproute basically just works. Though i do run this:

{
  lib,
  ...
}:

{
  nixpkgs.overlays = [
    (final: prev: {
      networkmanager = prev.networkmanager.overrideAttrs (old: {
        mesonFlags = lib.filter (f: !(lib.hasPrefix "-Diptables=" f)) old.mesonFlags or [ ];
      });
      iproute2 = prev.iproute2.override {
        iptables = null;
      };
      nftables = prev.nftables.override { withXtables = false; };
    })
  ];
  networking.nftables.enable = true;
  system.forbiddenDependenciesRegexes = [ "iptables" ];
}

No need for iptables if one can have nftables, might as well remove it from iproute. Maybe i got lucky and removed the bad code with that? Who knows

15:48:39
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemis nftables the default in nixpkgs yet?15:51:55
@grimmauld:m.grimmauld.deGrimmauld (any/all)not yet15:52:10
@grimmauld:m.grimmauld.deGrimmauld (any/all)but its one of those things that is just better than the default15:52:23
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemyeah, for sure15:53:07
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemIn nixos-musl, if I add those, iproute still ends up in the graph15:56:22
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemimage.png
Download image.png
15:56:26
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem remember this is for pkgs.nixos {} all defaults, maybe you've got some more config that somehow gets rid of iproute from the systemPackages too 15:57:08
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem modifying environment.defaultPackages for example ? 15:57:29
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem Yes, it's in environment.corePackages 16:00:03
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemhttps://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/network-interfaces.nix#L1771-L177716:00:33
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemYeah, I'm not sure how you're able to get rid of that16:03:16
@grimmauld:m.grimmauld.deGrimmauld (any/all)oh yeah i build systemd without tpm :P16:05:28
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemAh!16:05:32
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemHow does that actually relate to iproute2 being included in the network tho16:05:44

Show newer messages


Back to Room ListRoom Version: 6