!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

552 Members
116 Servers

Load older messages


SenderMessageTime
17 Oct 2025
@elvishjerricco:matrix.orgElvishJerriccoliterally04:17:17
@elvishjerricco:matrix.orgElvishJerricco literally the only correct situation for that condition is if the libc is glibc 04:17:30
@elvishjerricco:matrix.orgElvishJerricconot "not musl"04:17:33
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)I mean chill, if you don't want to explain this to me you don't have to04:17:35
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) But I'm in lib/systems/inspect.nix right now, and trying to figure it out 04:17:45
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
    isMusl =
      with abis;
      map (a: { abi = a; }) [
        musl
        musleabi
        musleabihf
        muslabin32
        muslabi64
      ];

04:17:51
@elvishjerricco:matrix.orgElvishJerriccoIs this clear? There are other libcs than glibc or musl04:19:44
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Like, however complex this is, it can't evaluate to anything other than the libc being equal to musl though can it?04:19:58
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
nix-repl> lib.systems.parse.abis
{
  android = { ... };
  androideabi = { ... };
  eabi = { ... };
  eabihf = { ... };
  elf = { ... };
  gnu = { ... };
  gnuabi64 = { ... };
  gnuabielfv1 = { ... };
  gnuabielfv2 = { ... };
  gnuabin32 = { ... };
  gnueabi = { ... };
  gnueabihf = { ... };
  msvc = { ... };
  musl = { ... };
  muslabi64 = { ... };
  muslabin32 = { ... };
  musleabi = { ... };
  musleabihf = { ... };
  uclibc = { ... };
  uclibceabi = { ... };
  uclibceabihf = { ... };
  unknown = { ... };
}
04:20:07
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) like, yes, there are crazy combos, but musl always means the libc is musl right? 04:20:21
@elvishjerricco:matrix.orgElvishJerricco yes, but like I've said already, the condition is not about musl 04:20:53
@elvishjerricco:matrix.orgElvishJerriccomusl / glibc is not a binary04:20:58
@elvishjerricco:matrix.orgElvishJerriccoit's not one or the other04:21:00
@elvishjerricco:matrix.orgElvishJerriccothe thing we care about here is if the libc is literally glibc. Is it clear that "not musl" is not equal to "is glibc"?04:21:22
@elvishjerricco:matrix.orgElvishJerriccobecause "is glibc" is the correct semantics04:21:27
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) I wonder now how hostPlatform.libc even gets defined 04:21:49
@elvishjerricco:matrix.orgElvishJerriccohttps://github.com/NixOS/nixpkgs/blob/ff84020dd9cc87bab5c2675d62e555afeb09304f/lib/systems/default.nix#L12004:22:09
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) like what comes first, isMusl = or libc = 04:22:11
@elvishjerricco:matrix.orgElvishJerricco now, admittedly, that code is a little flawed, in that it assumes that if any of those other conditions isn't true then it should fallback to glibc, but that's its own bug and not relevant to using the correct semantics in this PR 04:22:52
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) Okay so the libc is itself defined in terms of isMusl 04:22:54
@elvishjerricco:matrix.orgElvishJerricco among a big list of other things 04:23:08
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)so isMusl seems to come firt?04:23:08
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)* so isMusl seems to come first?04:23:10
@elvishjerricco:matrix.orgElvishJerriccodo you see all those other conditions?04:23:17
@elvishjerricco:matrix.orgElvishJerriccoIs it clear that musl and glibc are not the only possible libc?04:23:38
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)IDK what semantics are04:23:48
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)you seem to be 200% more informed than I am04:23:53
@elvishjerricco:matrix.orgElvishJerricco it's truly this simple: the platform can be using any libc in the world. Only in the glibc platform do we want to do this condition. 04:24:18
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) Yes, but as far as I understood musl is a libc, and isMusl should be equivalent to libc == musl 04:24:28
@elvishjerricco:matrix.orgElvishJerricco ....... which is not inverse to libc == glibc 04:24:49

Show newer messages


Back to Room ListRoom Version: 6