!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

538 Members
110 Servers

Load older messages


SenderMessageTime
15 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughanthis is all we get whenever an llvm strip/objcopy is used21:30:12
@matthewcroughan:defenestrate.itmatthewcroughanregardless of any fancy flags 21:30:21
@emilazy:matrix.orgemilythat seems like a different matter21:41:16
@matthewcroughan:defenestrate.itmatthewcroughanI have both a musl native and musl llvm nixos configuration build and working in github.com/MatthewCroughan/nixos-musl 22:33:55
@matthewcroughan:defenestrate.itmatthewcroughandon't pay any attention to the overlay horrors22:34:02
@matthewcroughan:defenestrate.itmatthewcroughanupstreaming some of that eventually22:34:06
@matthewcroughan:defenestrate.itmatthewcroughanmy back hurts22:34:21
16 Sep 2025
@sapphire:pub.solarSapphire changed their profile picture.21:14:56
17 Sep 2025
@quadradical:federated.nexusQuadRadical (Ping) changed their profile picture.23:50:04
19 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughan
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:defenestrate.itmatthewcroughan Tristan Ross: here's a minimal reproducer 16:06:46
@matthewcroughan:defenestrate.itmatthewcroughanLooks like it's no better in zig 0.1516:59:15
@matthewcroughan:defenestrate.itmatthewcroughanafaik zig should support this, I wonder what's going wrong16:59:25
@matthewcroughan:defenestrate.itmatthewcroughanRedacted or Malformed Event17:08:04
@matthewcroughan:defenestrate.itmatthewcroughanRedacted or Malformed Event17:08:10
@matthewcroughan:defenestrate.itmatthewcroughanpkgsMusl.zig_0_14 seems to build fine, so it's just LLVM causing it17:22:30
@matthewcroughan:defenestrate.itmatthewcroughanfound https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_that_zig_wants_to_move_away_from_llvm/ 🤔17:22:57
21 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughan Tristan Ross: When I compile a fully LLVM system, the vm attribute produces something that says this 00:14:44
@matthewcroughan:defenestrate.itmatthewcroughan
unable to handle EFI zboot image with "zstd" compression
qemu-system-aarch64: could not load kernel '/nix/store/fiwxkwxq0nsbmlsbi44cj3jmv0c175nl-nixos-system-nixos-25.11.20250919.8eaee11/kernel'
``
00:14:56
@matthewcroughan:defenestrate.itmatthewcroughan *
unable to handle EFI zboot image with "zstd" compression
qemu-system-aarch64: could not load kernel '/nix/store/fiwxkwxq0nsbmlsbi44cj3jmv0c175nl-nixos-system-nixos-25.11.20250919.8eaee11/kernel'
00:15:01
@matthewcroughan:defenestrate.itmatthewcroughan

However..

  boot.kernelPatches = [
    {
      name = "config-enable-zboot";
      patch = null;
      structuredExtraConfig = {
        EFI_ZBOOT = lib.mkForce lib.kernel.yes;
        KERNEL_ZSTD = lib.mkForce lib.kernel.yes;
        RD_ZSTD = lib.mkForce lib.kernel.yes;
      };
    }
  ];
00:15:19
@matthewcroughan:defenestrate.itmatthewcroughanso I'm not sure what's happening there00:15:24
@matthewcroughan:defenestrate.itmatthewcroughanhttps://grep.app/qemu/qemu/master/hw/core/loader.c?q=unable+to+handle+EFI+zboot+image+with#L88700:15:51
@matthewcroughan:defenestrate.itmatthewcroughanAh okay I see, I'm producing a linux kernel with vmlinuz.efi as the target, which isn't supported by qemu on arm64 I guess00:17:34
@matthewcroughan:defenestrate.itmatthewcroughan* Ah okay I see, I'm producing a linux kernel with vmlinuz.efi as the target, which isn't supported by qemu on aarch64 I guess00:17:38
@matthewcroughan:defenestrate.itmatthewcroughanwhereas for musl I'm just setting crossSystem, here I'm setting nixpkgs.hostPlatform and some linux-kernel args leaked in from my other experiments00:18:00
@rosscomputerguy:matrix.orgTristan Ross
In reply to @matthewcroughan:defenestrate.it
Ah okay I see, I'm producing a linux kernel with vmlinuz.efi as the target, which isn't supported by qemu on arm64 I guess
Just do an uncompressed kernel
01:12:34
@matthewcroughan:defenestrate.itmatthewcroughanI did, that worked fine01:12:43
@matthewcroughan:defenestrate.itmatthewcroughanI have an llvm, llvm-musl, llvm nixos config and the minimal nix files to change that now01:12:57
@matthewcroughan:defenestrate.itmatthewcroughanit's not too much, but it was a lot of research01:13:34

Show newer messages


Back to Room ListRoom Version: 6