philr_ has joined #nix-darwin
eraserhd has joined #nix-darwin
kalbasit has quit [Ping timeout: 240 seconds]
philr has joined #nix-darwin
philr_ has quit [Ping timeout: 240 seconds]
wildsebastian has quit [Ping timeout: 272 seconds]
wildsebastian has joined #nix-darwin
<thefloweringash> I would love some documentation on stdenv bootstrapping. I can eventually figure out the "what", but the "why" is much harder.
<thefloweringash> regenerating bootstrap tools upgrades clang 4 -> clang 7, and the current bootstrap unpack doesn't seem to handle it. one of the curls built from stage-1 has ___isOSVersionAtLeast undefined. this is meant to come from compiler-rt
<thefloweringash> I can hack up something that works (ie, put compiler-rt into the bootstrap tarball and hook it up like the main clang cc-wrapper wrapper), but without knowing the intent behind the bootstrap stages I don't know if it's rebuilding compiler-rt at the right time(s?)
<Mic92> Who maintained these bootstrap archives before?
jhuizy has quit [Quit: Ping timeout (120 seconds)]
jhuizy has joined #nix-darwin
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nix-darwin
<thefloweringash> that would be the sensible way: open a PR and ping the previous committers so they can tell me the right way :-)
<Mic92> And hope they are still doing NixOS
<Mic92> (maintainance)
<thefloweringash> alright #94426 and #94427
<{^_^}> https://github.com/NixOS/nixpkgs/pull/94426 (by thefloweringash, 4 minutes ago, open): stdenv/darwin: put compiler-rt into bootstrap tarball
<{^_^}> https://github.com/NixOS/nixpkgs/pull/94427 (by thefloweringash, 35 seconds ago, open): stdenv/darwin: assemble full clang toolchain
<LnL> thefloweringash: why does that matter for the bootstrap tarball?
<thefloweringash> having a compiler-rt available?
<LnL> yeah compiler-rt/___isOSVersionAtLeast
<LnL> that's only used during bootstrapping
<thefloweringash> the practical consequence is that `nix-build -A perlPackages.LocaleGettext` fails
<LnL> so the bootstrap compiler doesn't need to be able to do everything
<LnL> hmm, that seems strange
<thefloweringash> the error message is great :-)
<thefloweringash> there's a libcurl.dylib somewhere in the bootstrap chain that that perl build is referencing
<thefloweringash> IIUC uses __builtin_available(), which requires the compiler-rt support function ___isOSVersionAtLeast
<LnL> what if you do this? perlPackages.LocaleGettext.override { curl = pkgs.curl; }
<thefloweringash> the current bootstrap tools has a compiler-rt, and it looks like it used to be part of clang itself until #39743
<{^_^}> https://github.com/NixOS/nixpkgs/pull/39743 (by Ralith, 2 years ago, merged): llvm: factor out compiler-rt, fix libstdcxxStdenv sanitizer headers
<LnL> adding compiler-rt to the bootstrap tarball is fine in principle, but this seems more like a bootstrapping issue
<thefloweringash> so the curl is definitely broken, but we might be able to not reference that libcurl?
<LnL> yeah it might be using curl from a stage that's too early
<thefloweringash> it might be the curl that's part of swift-corefoundation built from the stage-1 stdenv
<thefloweringash> haven't figured out why something how something that seems higher level like perlPackages.LocaleGettext is using a lower level corefoundation
<thefloweringash> I'm bit inclined to say that shipping a slightly broken toolchain is a footgun we don't want, even if there's also some ordering bug in the bootstrap stages
<thefloweringash> I'll have to dig into the details of this perl/curl thing later
__monty__ has joined #nix-darwin
<thefloweringash> correcting myself: the broken curl is using stage 4 stdenv, which should be after compiler-rt is built
__monty__ has quit [Quit: leaving]
keving has left #nix-darwin ["User left"]
mog has quit [Ping timeout: 244 seconds]
mog has joined #nix-darwin
philr has quit [Ping timeout: 256 seconds]
__monty__ has joined #nix-darwin
__monty__ has quit [Quit: leaving]
mbrgm_ has joined #nix-darwin
mbrgm has quit [Ping timeout: 264 seconds]
mbrgm_ is now known as mbrgm