| 25 Jan 2026 |
nim65s | ref https://github.com/NixOS/nixpkgs/issues/475479 | 13:09:07 |
nim65s | oh, wait, no | 13:09:57 |
matthewcroughan @fosdem | Bash is quite an odd one though | 13:10:00 |
matthewcroughan @fosdem | Because 99% of the builds work | 13:10:07 |
matthewcroughan @fosdem | I guess this is the runtime bash for the system | 13:10:14 |
dramforever | this shouldn't change anything since it's stdenv.hostPlatform.isFreeBSD | 13:10:14 |
matthewcroughan @fosdem | That might be the problem | 13:10:38 |
matthewcroughan @fosdem | maybe I need it in my case | 13:10:47 |
dramforever | how we have ended up std=c23 is certainly a mystery... | 13:11:17 |
matthewcroughan @fosdem | But I forked nixpkgs and added it unconditionally and it seems to crash still | 13:11:41 |
matthewcroughan @fosdem | diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix
index 86d3727cd94f..8e9fe8ff751b 100644
--- a/pkgs/shells/bash/5.nix
+++ b/pkgs/shells/bash/5.nix
@@ -85,11 +85,9 @@ lib.warnIf (withDocs != null)
#
# Once FreeBSD is built with a newer version of Clang, this hack
# should be removed.
- +
- lib.optionalString (stdenv.hostPlatform.isFreeBSD && stdenv.hostPlatform != stdenv.buildPlatform)
- ''
- -std=c23
- '';
+ + ''
+ -std=c23
+ '';
| 13:11:43 |
matthewcroughan @fosdem | * diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix
index 86d3727cd94f..8e9fe8ff751b 100644
--- a/pkgs/shells/bash/5.nix
+++ b/pkgs/shells/bash/5.nix
@@ -85,11 +85,9 @@ lib.warnIf (withDocs != null)
#
# Once FreeBSD is built with a newer version of Clang, this hack
# should be removed.
- +
- lib.optionalString (stdenv.hostPlatform.isFreeBSD && stdenv.hostPlatform != stdenv.buildPlatform)
- ''
- -std=c23
- '';
+ + ''
+ -std=c23
+ '';
| 13:11:47 |
matthewcroughan @fosdem | In that case I get configure: error: C compiler cannot create executables | 13:12:11 |
matthewcroughan @fosdem | Beginning configuration for bash-5.3-release for aarch64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in '/build/bash-5.3':
configure: error: C compiler cannot create executables
| 13:12:27 |
matthewcroughan @fosdem | Maybe John Ericson would know how to fix it :D | 13:13:40 |
dramforever | do you have the full log | 13:13:51 |
dramforever | for the first one | 13:13:52 |
matthewcroughan @fosdem | Yeah can put it on termbin, sec | 13:14:02 |
matthewcroughan @fosdem | nix log /nix/store/946y9d3skwapp70wn66s6rvsfsypn9rc-bash-aarch64-unknown-linux-musl-5.3p9.drv | nc termbin.com 9999
https://termbin.com/z6eb
| 13:14:31 |
dramforever | yeah looks like c23-ness mismatch | 13:16:02 |
dramforever | i love cross compilation | 13:16:12 |
matthewcroughan @fosdem | Ah you would hate native musl llvm stuff more | 13:19:06 |
dramforever | hmm, looks like bootstrapping will be "okay" | 13:24:00 |
dramforever | lemme give it a try | 13:24:06 |
matthewcroughan @fosdem | Funny enough, system closures end up smaller if you cross compile instead of native | 13:24:32 |
matthewcroughan @fosdem | like I have a small nixos closure built with gnu-llvm-musl, and it comes out smaller than the one build without the gnu cross stuff | 13:24:51 |
matthewcroughan @fosdem | a few megabytes | 13:24:55 |
matthewcroughan @fosdem | there's also an accidental linkage to the llvm toolchain that occurs in the native setup that adds 40M | 13:25:29 |
matthewcroughan @fosdem | but even when that is corrected for, the cross-compiled setup produces smaller closures | 13:25:41 |
dramforever | oh, got tricked by parallel build | 13:30:48 |