!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

559 Members
122 Servers

Load older messages


SenderMessageTime
1 Dec 2025
@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
@k900:0upti.meK900I wonder how much it'll suck to just add it by default16:08:43
@hexa:lossy.networkhexacould this work with python3Minimal?16:10:25
@hsngrmpf:matrix.orgDavHauLet's add it by default later. I would like to make it available at all for now. And yeah, good point, it should use python3Minimal16:11:49
@hexa:lossy.networkhexaalso not sure how fancy we want to go, but couldn't the hook be null in non-cross situations16:23:54
@hexa:lossy.networkhexathat way we wouldn't have to guard it on every use16:24:14
@hsngrmpf:matrix.orgDavHauI think it would be better to go the route to always include it by default. even in non-cross scenarios. the check is very cheap.16:25:21

Show newer messages


Back to Room ListRoom Version: 6