!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

557 Members
121 Servers

Load older messages


SenderMessageTime
1 Dec 2025
@bake.monorail:matrix.orgbake.monorailasd.png
Download asd.png
16:23:10
@bake.monorail:matrix.orgbake.monorail These are the things I'm trying to get to build right now. I still need to figure out the role of libresolv, libsbuf and libutil. Also, apple-sdk. 16:23:59
@reckenrode:matrix.orgRandy Eckenrode apple-sdk provides the stubs and headers used to build packages for Darwin. Some libraries are built from source. libresolv and libutil are some of them. 16:26:39
@reckenrode:matrix.orgRandy Eckenrode I thought swift-corelibs-libdispatch got fixed. I’ll be updating it as part of my Swift work, but right now I keep discovering more horrors trying to bootstrap 6.2. 16:27:35
@reckenrode:matrix.orgRandy Eckenrode What I mean by setting platforms to non-Darwin is setting meta.platforms to Linux. I don’t want there to be confusion about whether cctools-port should be used on Darwin itself. 16:28:46
@reckenrode:matrix.orgRandy Eckenrode (As-in, a new package separate from cctools.) 16:30:14
@bake.monorail:matrix.orgbake.monorail libtapi was also fun, they hardcode symbol names that assume libc++ in tools/libtapi/libtapi.exports and everything fails silently downstream if you use stdlibc++ :P 16:31:02
@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

Show newer messages


Back to Room ListRoom Version: 6