| 15 Sep 2025 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | No that gives me the broken strip | 21:19:31 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | the llvm strip is bad, I need the gnu strip | 21:19:39 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | which is what binutils is giving me | 21:19:49 |
emily | it could at least be ${stdenv.cc.bintools}/bin/strip | 21:23:50 |
emily | which will work across all platforms | 21:23:55 |
Tristan Ross | Wouldn't that fail with cross compilation since strip would have the prefix? | 21:25:15 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | It's not the strip I need anyway | 21:25:37 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | because only the gnu strip performs properly | 21:25:47 |
Tristan Ross | Ok, then pkgsBuildHost.binutils should be right. | 21:26:53 |
emily | are you sure? Darwin sets it to a non-GNU strip… | 21:27:19 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | I've been unsuccessful so far | 21:27:32 |
emily | but yes I guess it'd be lib.getExe stdenv.cc.bintools "${stdenv.cc.bintools.targetPrefix}strip" or something. | 21:27:40 |
emily | * but yes I guess it'd be lib.getExe' stdenv.cc.bintools "${stdenv.cc.bintools.targetPrefix}strip" or something. | 21:27:42 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
index e0be2bb06..84d53ff13 100644
--- a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
+++ b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix
@@ -11,6 +11,7 @@
netbsdSetupHook,
makeMinimal,
version,
+ writeShellScript
}:
mkDerivation (
@@ -59,7 +60,11 @@ mkDerivation (
# temporarily use gnuinstall for bootstrapping
# bsdinstall will be built later
- makeFlags =
+ makeFlags = let
+ strip = writeShellScript "" ''
+ ${stdenv.cc.bintools}/bin/${stdenv.hostPlatform.config}-strip --strip-unneeded "$@"
+ '';
+ in
defaultMakeFlags
++ [
"INSTALL=${coreutils}/bin/install"
@@ -69,6 +74,7 @@ mkDerivation (
"TSORT=cat"
# Can't process man pages yet
"MKSHARE=no"
+ "OBJCOPY=${strip}"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# GNU objcopy produces broken .a libs which won't link into dependers.
| 21:28:20 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | it looks like --strip-unneeded didn't help | 21:28:25 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | https://github.com/llvm/llvm-project/pull/130704/files | 21:28:38 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | Yeah I'm not sure, it doesn't seem to be passing anything in the Makefiles | 21:30:01 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | --- md2.po ---
/nix/store/bpf1nk00iz2dbam5x5gzhad3c9zql4m7-llvm-binutils-19.1.7/bin/aarch64-unknown-linux-musl-strip: error: 'md2.po': not stripping symbol '.L.str.1' because it is named in a relocation
| 21:30:02 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | this is all we get whenever an llvm strip/objcopy is used | 21:30:12 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | regardless of any fancy flags | 21:30:21 |
emily | that seems like a different matter | 21:41:16 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | I have both a musl native and musl llvm nixos configuration build and working in github.com/MatthewCroughan/nixos-musl | 22:33:55 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | don't pay any attention to the overlay horrors | 22:34:02 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | upstreaming some of that eventually | 22:34:06 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | my back hurts | 22:34:21 |
| 16 Sep 2025 |
| Sapphire changed their profile picture. | 21:14:56 |
| 17 Sep 2025 |
| QuadRadical (Ping) changed their profile picture. | 23:50:04 |
| 19 Sep 2025 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | nix build github:nixos/nixpkgs/8d4ddb19d03c65a36ad8d189d001dc32ffb0306b#pkgsMusl.pkgsLLVM.zig_0_14
error: Cannot build '/nix/store/0yy2hk73fpin5g2gv0s0clpx6qddsxlg-zig-aarch64-unknown-linux-musl-0.14.1.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/lvq2agcwjfzahz3cim2m142jhivakbaq-zig-aarch64-unknown-linux-musl-0.14.1-doc
/nix/store/ygp8h8y3adpkc4h4bfspyrz3ybl2wyqn-zig-aarch64-unknown-linux-musl-0.14.1
Last 25 log lines:
> >>> referenced by LiveStacks.cpp.o:(llvm::LiveStacks::getOrCreateInterval(int, llvm::TargetRegisterClass const*)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMCodeGen.a
> >>> referenced by LiveStacks.cpp.o:(llvm::LiveStacks::getOrCreateInterval(int, llvm::TargetRegisterClass const*)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMCodeGen.a
> >>> referenced 675 more times
>
> aarch64-unknown-linux-musl-ld: error: undefined symbol: std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const
> >>> referenced by LiveStacks.cpp.o:(llvm::LiveStacks::getOrCreateInterval(int, llvm::TargetRegisterClass const*)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMCodeGen.a
> >>> referenced by ELFAttributeParser.cpp.o:(std::_Hashtable<unsigned int, std::pair<unsigned int const, unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<unsigned int const, unsigned int>, false>*, unsigned long)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMSupport.a
> >>> referenced by ARMAttributeParser.cpp.o:(llvm::ARMAttributeParser::also_compatible_with(llvm::ARMBuildAttrs::AttrType)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMSupport.a
> >>> referenced 62 more times
>
> aarch64-unknown-linux-musl-ld: error: undefined symbol: std::__throw_bad_array_new_length()
> >>> referenced by LiveStacks.cpp.o:(llvm::LiveStacks::getOrCreateInterval(int, llvm::TargetRegisterClass const*)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMCodeGen.a
> >>> referenced by StackLifetime.cpp.o:(llvm::StackLifetime::calculateLocalLiveness() (.localalias)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMAnalysis.a
> >>> referenced by StackLifetime.cpp.o:(llvm::StackLifetime::collectMarkers() (.localalias)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMAnalysis.a
> >>> referenced 556 more times
>
> aarch64-unknown-linux-musl-ld: error: undefined symbol: std::__throw_logic_error(char const*)
> >>> referenced by RegionInfo.cpp.o:(llvm::RegionBase<llvm::RegionTraits<llvm::Function>>::getNameStr[abi:cxx11]() const) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMAnalysis.a
> >>> referenced by IRSymtab.cpp.o:((anonymous namespace)::Builder::getComdatIndex(llvm::Comdat const*, llvm::Module const*)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMObject.a
> >>> referenced by VirtualFileSystem.cpp.o:(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::basic_string(char const*, unsigned long, std::allocator<char> const&) (.isra.0)) in archive /nix/store/ddd7c61p98aaw1as33q7lfzvq647c7jd-llvm-19.1.7-lib/lib/libLLVMSupport.a
> >>> referenced 469 more times
>
> aarch64-unknown-linux-musl-ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
> clang++: error: linker command failed with exit code 1 (use -v to see invocation)
> ninja: build stopped: subcommand failed.
For full logs, run:
nix log /nix/store/0yy2hk73fpin5g2gv0s0clpx6qddsxlg-zig-aarch64-unknown-linux-musl-0.14.1.drv
| 16:06:42 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | Tristan Ross: here's a minimal reproducer | 16:06:46 |
matthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) | Looks like it's no better in zig 0.15 | 16:59:15 |