| 30 Jan 2026 |
Randy Eckenrode | Use pkgsStatic.llvmPackages.libcxxStdenv to build it? | 11:45:02 |
Tristan Ross | Oh yeah, forgot that exists | 11:48:10 |
Tristan Ross | Omg, that fixed it. Thanks Randy for reminding me that exists. | 11:48:59 |
Tristan Ross | Also, I managed to test https://github.com/NixOS/nixpkgs/pull/485174 and it at least fixes swift being compiled. | 11:54:50 |
Randy Eckenrode | So fixing Linux is what’s left? | 11:57:44 |
Tristan Ross | Yes, it does appear that way | 11:58:03 |
Tristan Ross | Which imo, this should be at least a Darwin fix since that seems more critical | 11:58:18 |
Ihar Hrachyshka | See my nixpkgs review dump there in a comment too. (Probably was an overkill to run the whole tree...) Once commit message is fixed, let's merge it.
I didn't expect swift will be master admissible since it broke a lot for me personally. | 11:58:25 |
Tristan Ross | A separate PR fixing swift on Linux should be fine. | 11:58:45 |
Tristan Ross | Oh great, it broke again | 12:04:14 |
Tristan Ross | libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
| 12:05:07 |
Tristan Ross | Idk how it's got this issue when libc++ should be statically linked here fully. | 12:05:51 |
Tristan Ross | Do my buildInputs need the static libc++ derivation? | 12:06:51 |
Randy Eckenrode | It’s part of the stdenv. | 12:07:35 |
Randy Eckenrode | You can use otool -L to see whether it’s linking the system one. I can’t remember how libcxxStdenv is defined, but I thought it always used libc++ from Nixpkgs. | 12:08:35 |
Randy Eckenrode | If you don’t have Xcode installed nix shell nixpkgs#llvmPackages.bintools-unwrapped --command llvm-otool -L IIRC. | 12:09:30 |
Tristan Ross | It still says:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1900.180.0)
| 12:09:31 |
Tristan Ross | Oh, libsandbox is also being included from the system huh | 12:10:28 |
Randy Eckenrode | You can try overriding the libcxx of the static stdenv’s unwrapped cc. | 12:10:33 |
Randy Eckenrode | Is the package manually linking system libraries on its own somehow? | 12:11:01 |
Randy Eckenrode | That mutex error is weird though. Does it work with LLVM 20+ on Linux? | 12:11:35 |
Tristan Ross | Somewhat because crane isn't able to pick up the difference between host vs build packages for some reason | 12:11:38 |
Tristan Ross | Yesn't | 12:11:45 |
Tristan Ross | This does some very weird things like statically link nix | 12:12:10 |
Tristan Ross | (Yes nix, like libnix-flake-c and the various other libs) | 12:12:27 |
Tristan Ross | Linux mostly works, aside from flakiness in the program's behavior | 12:13:03 |
Tristan Ross | Hmm, this might've been caused by a skill issue lol. I had to override other flags so it might've been using pkgs.pkgsBuildBuild.stdenv.cc. | 12:21:51 |
Tristan Ross | Statically linking Rust for 3 platforms is a bit of a pain | 12:22:22 |
Randy Eckenrode | Overriding the stdenv used by Rust is extremely annoying. It was one of the motivating reasons for how the new SDK pattern ended up as it did. | 12:48:58 |
Tristan Ross | Yeah, I'm using crane so it's at least easier to deal with some of these things | 12:50:02 |