| 17 Jan 2026 |
Ihar Hrachyshka | ehm... previous attempt to build with probable fix failed on unrelated package and I forgot about it.
https://github.com/NixOS/nixpkgs/pull/480889
will run the build through the night again and report back on the PR how it went. | 02:59:43 |
Randy Eckenrode | This is annoying. Swift uses getMainExecutable from LLVM to get the location of the compiler binary, which resolves symlinks. That means swiftc symlinked into the swift package will look for the stdlib in the swiftc package instead where it doesn’t exist. 😓 | 03:58:27 |
| @folliehiyuki:envs.net left the room. | 09:11:47 |
| robbie-w joined the room. | 15:22:29 |
Randy Eckenrode | https://forums.swift.org/t/zlib-support-in-the-swift-ecosystem/83792/11 | 15:38:22 |
alexfmpe | can one use gcc instead of clang on aarch64-darwin? tried nix-build -E "with import ./. {}; pkgs.hello.override { stdenv = pkgs.gccStdenv; }" which fails with
configure:5654: checking whether the C compiler works
configure:5676: gcc conftest.c >&5
ld: library not found for -liconv
collect2: error: ld returned 1 exit status
...
configure:5728: error: C compiler cannot create executables
See 'config.log' for more details
| 16:35:46 |
K900 | Not well | 16:36:00 |
Randy Eckenrode | Does the GCC stdenv not include the SDK? It should, and libiconv should be propagated. | 16:38:25 |
Randy Eckenrode | But using GCC is a bad idea unless you have no choice. It doesn’t support availability annotations. It’s not set up to use libc++, which everything C++ on Darwin is linked against. (GCC can use it, but we don’t support that AFAIK.) | 16:40:05 |
alexfmpe | hmm I mainly wanted it to test some stuff that is currently broken ish with clang and didn't want to investigate/fix right now | 16:41:39 |
alexfmpe | it's more of a "would unlock progress on current task immediately" rather than a "I'll actually rely on this for anything" | 16:42:31 |
alexfmpe | at any rate, the libiconv error seems odd | 16:43:06 |
alexfmpe | is the expression even right? should I be overriding stdenv for hello only? | 16:44:12 |
Randy Eckenrode | The expression seems right. | 16:47:04 |
Randy Eckenrode | Can you nix develop (or whatever the equivalent is for the old CLI) the failing drv to check that the path to libiconv is there and that ld is wrapped? | 16:48:00 |
alexfmpe | $ nix-shell -E "with import ./. {}; pkgs.hello.override { stdenv = pkgs.gccStdenv; }"
Using versionCheckHook
# echo $NIX_LDFLAGS
-liconv
# which ld
/nix/store/cjkf5fm587xv34pz9zfs3q2qpvij61fz-gcc-wrapper-15.2.0/bin/ld
| 16:54:10 |
alexfmpe | fwiw, with gnuStdenv I get /usr/bin/ld | 16:56:43 |
alexfmpe | * $ nix-shell -E "with import ./. {}; pkgs.hello.override { stdenv = pkgs.gccStdenv; }"
Using versionCheckHook
# echo $NIX_LDFLAGS
-liconv
# which ld
/nix/store/cjkf5fm587xv34pz9zfs3q2qpvij61fz-gcc-wrapper-15.2.0/bin/ld
# ld
ld: library not found for -liconv
| 16:57:25 |
alexfmpe | * $ nix-shell -E "with import ./. {}; pkgs.hello.override { stdenv = pkgs.gccStdenv; }"
Using versionCheckHook
# env | grep iconv
NIX_LDFLAGS=-liconv
# which ld
/nix/store/cjkf5fm587xv34pz9zfs3q2qpvij61fz-gcc-wrapper-15.2.0/bin/ld
# ld
ld: library not found for -liconv
| 16:59:57 |
alexfmpe | * fwiw, with gnuStdenv I get /usr/bin/ld (or rather, it's unchanged) | 17:01:19 |
Randy Eckenrode | That’s definitely not right. | 17:13:04 |
alexfmpe | no clue how to debug/fix this, but up for legwork if that helps | 17:22:37 |
alexfmpe | I'm waiting for builds anyway on the next best thing to work on | 17:23:38 |
Randy Eckenrode | SDKROOT is missing, which means there is no SDK. Hmm. | 17:45:22 |
Randy Eckenrode |
gccStdenv =
if stdenv.cc.isGNU then
stdenv
else
stdenv.override {
cc = buildPackages.gcc;
allowedRequisites = null;
# Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses
# clang's internal assembler).
extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc;
};
| 17:46:16 |
Randy Eckenrode | That’s probably not right. I guess this has been broken since the SDK rework. | 17:46:28 |
Randy Eckenrode | Should be extraBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ clang.cc apple-sdk ]. | 17:47:13 |
alexfmpe | testing | 17:47:50 |
Randy Eckenrode | Though I don’t think the clang.cc is needed anymore for as. That’s done as a script with an absolute path to clang. | 17:48:50 |
Randy Eckenrode | (Not unless something expects to invoke clang explicitly as the assembler, so it may not be worth dropping it.) | 17:50:13 |