| 2 Jan 2025 |
rhelmot | I can't remember why I set up the freebsd stdenv to be clang + gnu binutils but it's been working until now... | 09:16:15 |
| 3 Jan 2025 |
| elikoga changed their display name from elikoga (@38c3 📞488{0,1,9}) to elikoga. | 10:28:12 |
| lzcunt joined the room. | 15:05:59 |
| ghpzin joined the room. | 15:25:00 |
lzcunt | and I've been stuck with this issue where the mlibc package that I'm working on has infinite recursion because it's build dependencies depend on the stdenv with mlibc instead of the mlibc for the build platform | 16:17:43 |
lzcunt | * Hey there, I've been trying to add a new libc (mlibc) to nixpkgs and I've been stuck with this issue where the mlibc package that I'm working on has infinite recursion because it's build dependencies depend on the stdenv with mlibc instead of the mlibc for the build platform | 16:18:30 |
lzcunt | I've been told you guys can maybe help with my issue | 16:18:54 |
lzcunt | * Hey there, I've been trying to add a new libc (mlibc) to nixpkgs and I've been stuck with this issue where the mlibc package that I'm working on has infinite recursion because it's build dependencies depend on the stdenv with mlibc instead of the stdenv for the build platform | 16:19:27 |
Artturin | Show the code | 16:19:34 |
lzcunt | I have it in https://github.com/lunabunja/nixpkgs in the mlibc/init branch | 16:20:05 |
lzcunt | you can see that nix-build . -A mlibc works (mlibc built with build=host=target=glibc or musl) but nix-build . -A pkgsCross.x86_64-linux-mlibc.hello does not work - it tries building mlibc with host=linux-mlibc and fails because it also tries building its dependencies in nativeBuildInputs (meson and ninja) with the mlibc stdenv | 16:23:52 |
lzcunt | * you can see that nix-build . -A mlibc works (mlibc built with build=host=target=glibc or musl) but nix-build . -A pkgsCross.x86_64-linux-mlibc.hello does not work - it tries building mlibc with host=linux-mlibc and fails because it also tries building its dependencies in nativeBuildInputs (meson and ninja) with the mlibc stdenv (which hasn't been built yet so infinite recursion) | 16:24:30 |
lzcunt | there's more details in #dev:nixos.org | 16:25:26 |
Tristan Ross | It's probably an infinite recursion which the cc | 16:31:32 |
lzcunt | it is. whenever anything touches stdenv.cc it shits itself | 16:31:55 |
Tristan Ross | I think depsBuildBuild is the problem | 16:32:13 |
lzcunt | that doesn't trigger it no | 16:32:33 |
lzcunt | it happens inside meson - which shouldn't happen because it's stdenv is supposed to be the one from the previous i think? i don't really understand stages well but i would assume meson would be build for the build platform (which has glibc | 16:34:10 |
Tristan Ross | I don't see anything else being the problem | 16:34:18 |
Artturin | Specifically meson andor ninja or one of their deps trigger it | 16:34:35 |
Tristan Ross | That's weird though | 16:34:49 |
Tristan Ross | I use cmake and ninja in LLVM libc and don't have this problem | 16:34:58 |
lzcunt | yep any of their deps that touches stdenv.cc triggers it, like openssl or zlib when I build with python3Minimal to not build openssl | 16:35:30 |
lzcunt | yea I saw that PR, seemingly it doesn't have this issue | 16:36:01 |
lzcunt | but your PR uses pkgsLLVMLibc maybe that changes stuff | 16:36:15 |
Artturin | This type of thing again https://github.com/NixOS/nixpkgs/commit/007088359e7a0b438f42387cb59c0479ba81df83 | 16:36:59 |
lzcunt | is my thinking any wrong here? why is meson (or anything i put in nativeBuildInputs) being built for the host platform | 16:37:04 |
Artturin | adding openssl get's rid of the error from that line | 16:37:14 |
Tristan Ross | Yeah, pkgsLLVMLibc composes a new nixpkgs instance which has the libc applied. | 16:37:27 |
Artturin | In reply to @sananatheskenana:matrix.org is my thinking any wrong here? why is meson (or anything i put in nativeBuildInputs) being built for the host platform they're not but the weird python inputs' thing interferes with eval | 16:37:38 |