!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

556 Members
119 Servers

Load older messages


SenderMessageTime
21 Sep 2025
@ss:someonex.netSomeoneSerge (back on matrix) FWIW I tried to trace the chain from find_installation to find_program in hopes to understand how does one even specify which platform's python they want, and my conclusion was "fuck if I know" 16:48:54
@ss:someonex.netSomeoneSerge (back on matrix)mesonbuild matrix says it's supposed to look for the host python, so something must be wrong on our side21:52:00
@rosssmyth:matrix.orgrosssmyth What are you working on? If this is running at build-time it will probably sniff around PATH and find the meson interpreter or something. Add python to depsBuildBuild or nativeBuildInputs. buildInputs is for a python interpreter than runs on the host machine the final executable runs on, so at build time it will not find it. 22:14:16
@ss:someonex.netSomeoneSerge (back on matrix)

this is running at build-time

It's not, it's for the host. The find_installation method is, according to upstream chat, for the host. It's a meson-packaged gtk app written in python o_0. Native/strictDeps=false works and builds fine, but like why would I want strictDeps=false this is cringe

23:44:02
@ss:someonex.netSomeoneSerge (back on matrix) *

this is running at build-time

It's not, it's for the host. The find_installation method is, according to upstream chat, for the host. It's a meson-packaged (nb: not meson-python) gtk app written in python o_0. Native/strictDeps=false works and builds fine, but like why would I want strictDeps=false this is cringe

23:44:53
22 Sep 2025
@ss:someonex.netSomeoneSerge (back on matrix)Mhmmm update: it's basically the same disaster as cmake, they look to run python from PATH on BUILD, but want its sysconfig to return cross stuff01:11:07
@ss:someonex.netSomeoneSerge (back on matrix)So I guess nvm it's meant to be broken01:11:21
@rosssmyth:matrix.orgrosssmyth Maybe. You might be able to add a path to one of these options https://mesonbuild.com/Builtin-options.html#python-module but who knows. If not then patching your cross-file may be required with substituteInPlace or replaceVars 01:28:56
@rosssmyth:matrix.orgrosssmyth * Maybe. You might be able to add a path to one of these options https://mesonbuild.com/Builtin-options.html#python-module but who knows. If not then patching your cross-file may be required with substituteInPlace or replaceVars 01:29:03
23 Sep 2025
@estrange:matrix.orgestrange joined the room.00:18:31
@a-kenji:matrix.orgkenji changed their display name from a-kenji to kenji.10:42:22
@jolman:matrix.org@jolman:matrix.org left the room.20:12:34
@freexploit:trafkin.com@freexploit:trafkin.com 20:37:20
@freexploit:trafkin.com@freexploit:trafkin.com 20:37:38
@freexploit:trafkin.com@freexploit:trafkin.com left the room.20:38:28
24 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughan

What should the correct solution be for this instead of relying on glibcPkgs?

...
      netbsd = super.netbsd.overrideScope (
        _final: prev: {
          compat = prev.compat.overrideAttrs (old: { makeFlags = old.makeFlags ++ [ "OBJCOPY=${glibcPkgs.binutils}/bin/strip" ]; });
        }
      );
...
14:37:20
@matthewcroughan:defenestrate.itmatthewcroughanthis turned out to not do anything14:38:54
25 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughan

Anyone got any guesses as to why this might be happening then?

[16/19] Building C object CMakeFiles/zig2.dir/compiler_rt.c.o
[17/19] Building C object CMakeFiles/zig2.dir/zig2.c.o
[18/19] Linking CXX executable zig2
FAILED: [code=1] zig2 
: && /nix/store/zxfq7vsw55hhjnfm841k1x5x2fmsqmni-aarch64-unknown-linux-musl-clang-wrapper-21.1.1/bin/aarch64-unknown-linux-musl-clang++ -O3 -DNDEBUG -Wl,-z,stack-size=0x10000000 CMakeFiles/zig2.dir/zig2.c.o CMakeFiles/zig2.dir/compiler_rt.>
aarch64-unknown-linux-musl-ld: error: undefined symbol: llvm::sys::getProcessTriple()
>>> referenced by zig_llvm-ar.cpp
>>>               zig_llvm-ar.cpp.o:(llvm_ar_main(int, char**, llvm::ToolContext const&)) in archive zigcpp/libzigcpp.a
>>> referenced by Driver.cpp.o:(lld::wasm::(anonymous namespace)::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>)) in archive /nix/store/j0m3sirlqygwaq6v4jhjdbardc503a5d-lld-aarch64-unknown-linux-musl-20.1.8-lib/lib/liblldWasm.a
>>> referenced by DriverUtils.cpp.o:(lld::elf::ELFOptTable::parse(lld::elf::Ctx&, llvm::ArrayRef<char const*>)) in archive /nix/store/j0m3sirlqygwaq6v4jhjdbardc503a5d-lld-aarch64-unknown-linux-musl-20.1.8-lib/lib/liblldELF.a
>>> referenced 5 more times
15:01:48
@matthewcroughan:defenestrate.itmatthewcroughan oh yeah.. why is it using ld and not lld 15:45:25
@matthewcroughan:defenestrate.itmatthewcroughan Tristan Ross: 15:46:25
@rosscomputerguy:matrix.orgTristan RossHuh, idk15:48:23
@rosscomputerguy:matrix.orgTristan RossCheck the cmake flags15:48:42
@matthewcroughan:defenestrate.itmatthewcroughan
rg LLD | rg -i cmake
CMakeLists.txt:    set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")
CMakeLists.txt:    ${LLD_INCLUDE_DIRS}
CMakeLists.txt:    ${LLD_LIBRARIES}
cmake/Findlld.cmake:# LLD_FOUND
cmake/Findlld.cmake:# LLD_INCLUDE_DIRS
cmake/Findlld.cmake:# LLD_LIBRARIES
cmake/Findlld.cmake:find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
cmake/Findlld.cmake:find_library(LLD_LIBRARY NAMES lld-19.0 lld190 lld NAMES_PER_DIR
cmake/Findlld.cmake:if(EXISTS ${LLD_LIBRARY})
cmake/Findlld.cmake:    set(LLD_LIBRARIES ${LLD_LIBRARY})
cmake/Findlld.cmake:    macro(FIND_AND_ADD_LLD_LIB _libname_)
cmake/Findlld.cmake:        find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_} NAMES_PER_DIR
cmake/Findlld.cmake:                ${LLD_LIBDIRS}
cmake/Findlld.cmake:        if(LLD_${_prettylibname_}_LIB)
cmake/Findlld.cmake:            set(LLD_LIBRARIES ${LLD_LIBRARIES} ${LLD_${_prettylibname_}_LIB})
cmake/Findlld.cmake:    endmacro(FIND_AND_ADD_LLD_LIB)
cmake/Findlld.cmake:    FIND_AND_ADD_LLD_LIB(lldMinGW)
cmake/Findlld.cmake:    FIND_AND_ADD_LLD_LIB(lldELF)
cmake/Findlld.cmake:    FIND_AND_ADD_LLD_LIB(lldCOFF)
cmake/Findlld.cmake:    FIND_AND_ADD_LLD_LIB(lldWasm)
cmake/Findlld.cmake:    FIND_AND_ADD_LLD_LIB(lldMachO)
cmake/Findlld.cmake:    FIND_AND_ADD_LLD_LIB(lldCommon)
cmake/Findlld.cmake:find_package_handle_standard_args(lld DEFAULT_MSG LLD_LIBRARIES LLD_INCLUDE_DIRS)
cmake/Findlld.cmake:mark_as_advanced(LLD_INCLUDE_DIRS LLD_LIBRARIES)
cmake/Findllvm.cmake:    # since on some distros LLD is only available as a static library
15:51:11
@matthewcroughan:defenestrate.itmatthewcroughan
zig-aarch64-linux> -- Found lld: /nix/store/0hmg2vivmwb0fq93qannbbgmg7z4b99f-lld-aarch64-unknown-linux-musl-21.1.1-lib/lib/liblldMinGW.a;/nix/store/0hmg2vivmwb0fq93qannbbgmg7z4b99f-lld-aarch64-unknown-linux-musl-21.1.1-lib/lib/liblldELF.a;/nix/store/0hmg2vivmwb0fq93qannbbgmg7z4b99f-lld-aarch64-unknown-linux-musl-21.1.1-lib/lib/liblldCOFF.a;/nix/store/0hmg2vivmwb0fq93qannbbgmg7z4b99f-lld-aarch64-unknown-linux-musl-21.1.1-lib/lib/liblldWasm.a;/nix/store/0hmg2vivmwb0fq93qannbbgmg7z4b99f-lld-aarch64-unknown-linux-musl-21.1.1-lib/lib/liblldMachO.a;/nix/store/0hmg2vivmwb0fq93qannbbgmg7z4b99f-lld-aarch64-unknown-linux-musl-21.1.1-lib/lib/liblldCommon.a (Required is at least version "21")
15:53:55
@matthewcroughan:defenestrate.itmatthewcroughanit finds lld though15:53:57
26 Sep 2025
@outfoxxed:outfoxxed.meoutfoxxed joined the room.03:53:25
@outfoxxed:outfoxxed.meoutfoxxedI'm trying to fix the Qt6 hook so cross compilation works. Could someone explain how to add an env hook that catches only buildInputs? I've tried various versions of addEnvHooks as well as the env* arrays, and the closest I've gotten is envHostTargetHooks, which contains buildInputs but also nativeBuildInputs, which I wouldn't guess would contain those by the name. (I was assuming I wanted envHostHostHooks which contains nativeBuildInputs instead)06:56:00
@dramforever:matrix.orgdramforeverare you cross compiling some zig stuff06:57:48
@dramforever:matrix.orgdramforeverzig cross is busted06:57:54
@outfoxxed:outfoxxed.meoutfoxxed* I'm trying to fix the Qt6 hook so cross compilation works. Could someone explain how to add an env hook that catches only buildInputs? I've tried various versions of addEnvHooks as well as the env* arrays, and the closest I've gotten is envHostTargetHooks, which contains buildInputs but also nativeBuildInputs, which I wouldn't guess would contain those by the name. (I was assuming I wanted envHostHostHooks which contains nativeBuildInputs instead) My goal here is to add only buildInputs to the qt library search paths, because otherwise it will catch libraries pulled in by the build environment as well and link against the wrong thing06:58:53

Show newer messages


Back to Room ListRoom Version: 6