!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

312 Members
97 Servers

Load older messages


SenderMessageTime
15 Nov 2025
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) https://github.com/NixOS/nixpkgs/blob/ce944e8d76f74336dbf6725c87ca2539b0653c30/pkgs/build-support/rust/lib/default.nix#L58-L82
This doesn't look quite right to me...

The build hook used in my builds contains this:
"CC_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CXX_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
  "CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL\_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CARGO_BUILD_TARGET=x86\_64-unknown-linux-musl" \
  "HOST\_CC=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "HOST\_CXX=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CC_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
"CXX_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL\_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
```,

but my platform definition is
```nix
nixpkgs.buildPlatform = (inputs.nixpkgs.lib.systems.elaborate "x86\_64-unknown-linux-musl");
nixpkgs.hostPlatform =
  inputs.nixpkgs.lib.recursiveUpdate
    (inputs.nixpkgs.lib.systems.elaborate "x86\_64-unknown-linux-musl")
    {
      useLLVM = true;
      linker = "lld";
      config = "x86\_64-unknown-linux-musl";
    };

So i'd have expected lld and clang in there
16:25:50
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) https://github.com/NixOS/nixpkgs/blob/ce944e8d76f74336dbf6725c87ca2539b0653c30/pkgs/build-support/rust/lib/default.nix#L58-L82
This doesn't look quite right to me...

The build hook used in my builds contains this:
"CC_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CXX_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
  "CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL\_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CARGO_BUILD_TARGET=x86\_64-unknown-linux-musl" \
  "HOST\_CC=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "HOST\_CXX=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CC_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
"CXX_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL\_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \

but my platform definition is
nixpkgs.buildPlatform = (inputs.nixpkgs.lib.systems.elaborate "x86\_64-unknown-linux-musl");
nixpkgs.hostPlatform =
  inputs.nixpkgs.lib.recursiveUpdate
    (inputs.nixpkgs.lib.systems.elaborate "x86\_64-unknown-linux-musl")
    {
      useLLVM = true;
      linker = "lld";
      config = "x86\_64-unknown-linux-musl";
    };

So i'd have expected lld and clang in there
16:26:02
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) https://github.com/NixOS/nixpkgs/blob/ce944e8d76f74336dbf6725c87ca2539b0653c30/pkgs/build-support/rust/lib/default.nix#L58-L82
This doesn't look quite right to me...

The build hook used in my builds contains this:
"CC_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CXX_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
  "CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL\_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CARGO_BUILD_TARGET=x86\_64-unknown-linux-musl" \
  "HOST\_CC=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "HOST\_CXX=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CC_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
"CXX_X86_64_UNKNOWN_LINUX\_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL\_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \

but my platform definition is
nixpkgs.buildPlatform = (inputs.nixpkgs.lib.systems.elaborate "x86_64-unknown-linux-musl");
nixpkgs.hostPlatform =
  inputs.nixpkgs.lib.recursiveUpdate
    (inputs.nixpkgs.lib.systems.elaborate "x86_64-unknown-linux-musl")
    {
      useLLVM = true;
      linker = "lld";
      config = "x86_64-unknown-linux-musl";
    };

So i'd have expected lld and clang in there
16:26:23
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) https://github.com/NixOS/nixpkgs/blob/ce944e8d76f74336dbf6725c87ca2539b0653c30/pkgs/build-support/rust/lib/default.nix#L58-L82
This doesn't look quite right to me...

The build hook used in my builds contains this:
  "CC_X86_64_UNKNOWN_LINUX_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CXX_X86_64_UNKNOWN_LINUX_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
  "CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "CARGO_BUILD_TARGET=x86_64-unknown-linux-musl" \
  "HOST_CC=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
  "HOST_CXX=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CC_X86_64_UNKNOWN_LINUX_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
"CXX_X86_64_UNKNOWN_LINUX_MUSL=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/c++" \
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=/nix/store/wrhxx96lh48nsv9a6p38b3x4r2fskwwm-gcc-wrapper-14.3.0/bin/cc" \
 cargo build "${flagsArray[@]}"

but my platform definition is
nixpkgs.buildPlatform = (inputs.nixpkgs.lib.systems.elaborate "x86_64-unknown-linux-musl");
nixpkgs.hostPlatform =
  inputs.nixpkgs.lib.recursiveUpdate
    (inputs.nixpkgs.lib.systems.elaborate "x86_64-unknown-linux-musl")
    {
      useLLVM = true;
      linker = "lld";
      config = "x86_64-unknown-linux-musl";
    };

So i'd have expected lld and clang in there
16:26:43
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)and i am getting cryptic linker failures with that platform combination on rust things, such as alacritty or clippy16:32:31
@dramforever:matrix.orgdramforeveroh no, same "triple" cross compilation17:00:31
@dramforever:matrix.orgdramforever* oh no, same-"triple" cross compilation17:01:15
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)qt6 was very confused about these platform shenanigans, but that was at least fixable with hacks17:04:40
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)jq and the rust things that require linking are giving me HELL17:04:52
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)with jq i can at least switch to yq-go, but i am at a loss about what to do with the rust things17:05:16
@dramforever:matrix.orgdramforeveryou can't really fix this17:06:31
@dramforever:matrix.orgdramforeverand honestly our own cc-wrapper environment variables sort of have the same problem17:06:47
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)setting the same platform definition as i have on host into build has other errors17:07:52
@dramforever:matrix.orgdramforever one cursed solution is to cross to x86_64-cross-linux-musl but this still doesn't fix rust... unless you're interested in doing custom targets 17:08:03
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)oh god17:08:18
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) Setting this:
            let
              musl-gcc = inputs.nixpkgs.lib.systems.elaborate "x86_64-unknown-linux-musl";
              musl-llvm = inputs.nixpkgs.lib.recursiveUpdate musl-gcc {
                useLLVM = true;
                linker = "lld";
                config = "x86_64-unknown-linux-musl";
              };
            in
              {
                nixpkgs.buildPlatform = musl-llvm;
                nixpkgs.hostPlatform = musl-llvm;
              }
breaks too:
fetching git input 'git+file:///home/grimmauld/musl-vm'
error:
       … while calling the 'seq' builtin
         at /nix/store/dndmsb8w6cxy8qncmkigdy2pii16j07x-nixpkgs-patched/lib/modules.nix:361:18:
          360|         options = checked options;
          361|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          362|         _module = checked (config._module);

       … while evaluating the attribute 'unmatchedDefns'
         at /nix/store/dndmsb8w6cxy8qncmkigdy2pii16j07x-nixpkgs-patched/lib/modules.nix:894:7:
          893|       # Transforms unmatchedDefnsByName into a list of definitions
          894|       unmatchedDefns =
             |       ^
          895|         if configs == [ ] then

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'version' missing
       at /nix/store/dndmsb8w6cxy8qncmkigdy2pii16j07x-nixpkgs-patched/pkgs/stdenv/linux/default.nix:560:51:
          559|             pname = prevStage.bintools.bintools.pname + "-patchelfed-ld";
          560|             inherit (prevStage.bintools.bintools) version;
             |                                                   ^
          561|             passthru = { inherit (prevStage.bintools.passthru) isFromBootstrapFiles; };
So thats no option either
17:10:13
@dramforever:matrix.orgdramforeverthat's... interesting17:11:31
@dramforever:matrix.orgdramforeveralthough it makes sense, it's no longer cross, and we don't have musl-llvm bootstrap files17:11:47
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)thats fair i guess17:11:58
@dramforever:matrix.orgdramforeveralthough17:13:33
@dramforever:matrix.orgdramforever how bad would it be if we remove the lib.optionalString (rustTargetPlatform != rustHostPlatform) condition 17:13:58
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)in what file?17:14:13
@dramforever:matrix.orgdramforeverthe file you linke17:14:23
@dramforever:matrix.orgdramforever* the file you linked17:14:25
@dramforever:matrix.orgdramforeverlast section17:14:27
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)right17:14:35
@dramforever:matrix.orgdramforever* last part in highlight section17:14:36
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)let me try!17:14:38
@dramforever:matrix.orgdramforeverthis just causes the same problem in the other direction right17:14:59
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)we'll see!17:16:46

Show newer messages


Back to Room ListRoom Version: 6