| 15 Sep 2025 |
emily | AIUI it requires fairly substantial patching of software | 16:00:53 |
emily | which isn't something we'd want to carry in-tree | 16:00:57 |
siraben | ah, if so, bummer | 16:09:26 |
| matthewcroughan joined the room. | 19:06:28 |
matthewcroughan | I'm pretty close to producing an LLVM/Musl system, but I get
compat-netbsd-aarch64-unknown-linux-musl> --- md2.po ---
compat-netbsd-aarch64-unknown-linux-musl> aarch64-unknown-linux-musl-objcopy: error: 'md2.po': not stripping symbol '.L.str.1' because it is named in a relocation
| 19:06:48 |
matthewcroughan | nix build nixpkgs#pkgsLLVM.pkgsMusl.netbsd.compat -L works though 🤨 | 19:08:56 |
Tristan Ross | Do a nix-diff between the two drv files of pkgsLLVM.pkgsMusl.netbsd.compat as the base and what you're trying to build as the other. | 19:24:18 |
Tristan Ross | If you've configured cross correctly, they'll be the same. | 19:24:32 |
matthewcroughan | Is there no easy way to configure cross identically to `pkgsMusl? | 19:25:39 |
matthewcroughan | * Is there no easy way to configure cross identically to pkgsMusl? | 19:25:43 |
Tristan Ross | There is | 19:25:52 |
Tristan Ross | Your localSystem needs to be the standard GNU triple | 19:26:13 |
matthewcroughan | LIke I can't do nixpkgs.hostPlatform = pkgsMusl.hostPlatform because that's infinite recursion | 19:26:17 |
matthewcroughan | but it's what I want to | 19:26:19 |
Tristan Ross | Take a look at pkgs/top-level/variants.nix or pkgs/top-level/stage.nix to see what pkgsMusl does | 19:26:49 |
matthewcroughan | I don't want the GNU triple, I want the same evaluation and code as in pkgs/top-level/variants.nix | 19:27:01 |
matthewcroughan | since it's always correctly configured there, it should be exposed | 19:27:12 |
Tristan Ross | You have to use the GNU triple for the buildPlatform | 19:27:16 |
Tristan Ross | For hostPlatform, just use the musl one | 19:27:28 |
matthewcroughan | so for pkgsMusl, the buildPlatform is gnu? | 19:27:58 |
matthewcroughan | and that's just some default of nixpkgs? | 19:28:02 |
Tristan Ross | Yes | 19:28:07 |
emily | if it's cross then buildPlatform is your main platform by definition | 19:28:36 |
emily | Musl has fully-bootstrapped stdenv so you can do non-cross | 19:28:43 |
matthewcroughan | Ah yes, I get the ld errors when I set buildPlatform to aarch64-unknown-linux-musl | 19:28:51 |
matthewcroughan | j/src/unistd/ttyname_r.lo obj/src/unistd/ualarm.lo obj/src/unistd/unlink.lo obj/src/unistd/unlinkat.lo obj/src/unistd/usleep.lo obj/src/unistd/write.lo obj/src/unistd/writev.lo obj/ldso/dlstart.lo obj/ldso/dynlink.lo
> aarch64-unknown-linux-musl-ranlib lib/libc.a
> collect2: fatal error: cannot find 'ld'
> compilation terminated.
> make: *** [Makefile:162: lib/libc.so] Error 1
> make: *** Waiting for unfinished jobs..
| 19:29:08 |
matthewcroughan | so now I'm using gnu I'll report back | 19:29:19 |
Tristan Ross | Matt is trying to mix it with LLVM which I don't think musl host into an LLVM cross is something which has been tested before. | 19:29:37 |
emily | ah | 19:29:59 |
matthewcroughan | Yeah I've successfully build a minimal native musl system, I'm now going for gold with LLVM | 19:30:00 |