!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

564 Members
123 Servers

Load older messages


SenderMessageTime
1 Dec 2025
@reckenrode:matrix.orgRandy EckenrodeGood luck with Python. It can’t cross-compile from one Darwin platform to another. I don’t know about from Linux to Darwin. It may only support cross to ELF platforms.16:31:32
@reckenrode:matrix.orgRandy EckenrodeDoes our libtapi package work? I did try to make sure it compiles on Linux, but I haven’t checked on it in a while.16:32:14
@bake.monorail:matrix.orgbake.monorail

It compiles, but if you use regular stdenv some symbols are not exported for the reason above.
This works:

(pkgs.callPackage ./pkgs/by-name/li/libtapi/package.nix { stdenv = pkgs.libcxxStdenv; })
16:32:59
@bake.monorail:matrix.orgbake.monorail I'm thinking at very least to put an assertion on stdenv.isUsingLibcxx or something 16:33:54
@bake.monorail:matrix.orgbake.monorail Anyway, I'll try to switch back to master and fight some more to get lld working.
Thanks for the feedback Randy.
16:36:35
@reckenrode:matrix.orgRandy EckenrodeYou’re welcome!16:43:55
@alexfmpe:matrix.orgalexfmpe

am I holding it wrong or x86_64 -> aarch32 works while aarch64->aarch32 doesn't ?

$ uname -mo
Darwin arm64

$ nom-build -A pkgsCross.armv7a-android-prebuilt.hello --argstr system "aarch64-linux"
error: Android NDK doesn't support building on aarch64-unknown-linux-gnu, as far as we know

$ nom-build -A pkgsCross.armv7a-android-prebuilt.hello --argstr system "x86_64-linux"
/nix/store/2nnknh2lbi49n97n8cii6lqgr64bfzjp-hello-armv7a-unknown-linux-androideabi-2.12.2
18:24:28
@alexfmpe:matrix.orgalexfmpe(using rosetta/linux builder shenanigans) 18:24:54
@k900:0upti.meK900On Darwin? Very possibly18:25:20
@k900:0upti.meK900lol18:25:21
@k900:0upti.meK900Though even not on Darwin I'm guessing the Android SDK does not have aarch64 host tools18:25:46
@emilazy:matrix.orgemily --argstr system "aarch64-linux" should not be Darwin 18:26:09
@alexfmpe:matrix.orgalexfmpeeval = aarch64-darwin build = x86_64-linux host = aarch64-linux18:39:22
@alexfmpe:matrix.orgalexfmpeI think?18:39:24
@alexfmpe:matrix.orgalexfmpe* eval = aarch64-darwin build = aarch64-linux host = aarch64-linux eval = aarch64-darwin build = x86_64-linux host = aarch64-linux18:39:59
@alexfmpe:matrix.orgalexfmpe * Those two commands mean eval = aarch64-darwin build = aarch64-linux host = aarch64-linux eval = aarch64-darwin build = x86_64-linux host = aarch64-linux 18:40:11
@k900:0upti.meK900Eval should not matter at all18:40:34
@k900:0upti.meK900Anyway, the NDK does not in fact have aa64 host tools18:40:43
@k900:0upti.meK900So yes18:40:50
@alexfmpe:matrix.orgalexfmperight, I'm just clarifying where 'darwin' fits in18:41:00
@emilazy:matrix.orgemilyno AArch64 surprises me. you can't do Android dev on AArch64 Chromebooks?18:52:47
@k900:0upti.meK900You can't even run an IDE on those18:55:46
@k900:0upti.meK900Can you18:55:49
@emilazy:matrix.orgemilysure you can20:05:35
@emilazy:matrix.orgemilythey have built-in Linux VMs with full graphical Wayland app support20:05:42
@emilazy:matrix.orgemilyAndroid Studio is explicitly supported on the Intel ones at least20:05:50
@emilazy:matrix.orgemilyno idea about the ARM ones but it'd surprise me if not20:05:57
2 Dec 2025
@hsngrmpf:matrix.orgDavHau Occasionally I encounter cross packages which simply compile binaries for the wrong platform.
Is there a hook in nixpkgs that I can use to check if all binaries in $out/bin are for the correct platform?
06:43:18
@k900:0upti.meK900I don't think so, but it would be nice to have one06:49:49
@hsngrmpf:matrix.orgDavHaudone: https://github.com/NixOS/nixpkgs/pull/46718316:04:09

Show newer messages


Back to Room ListRoom Version: 6