reflex-platform icon indicating copy to clipboard operation
reflex-platform copied to clipboard

Feature: Support Android ABIs x86 and x86_64

Open alaendle opened this issue 6 years ago • 5 comments

Would it be possible to support the mentioned ABIs for android builds? My guess is that this couldn't be to complicated, but my tries to implement this failed - mainly because of lacking nix skills.

alaendle avatar Sep 23 '19 05:09 alaendle

It's definitely possible with the right crossSystem, but you'll have to build your own GHC:

crossSystem = {
  config = "x86_64-unknown-linux-android";
  useAndroidPrebuilt = true;
  ndkVer = "18b";
  sdkVer = "24";
}

matthewbauer avatar Sep 23 '19 16:09 matthewbauer

It actually is broken. This should get us closer:

https://github.com/NixOS/nixpkgs/pull/69309

matthewbauer avatar Sep 23 '19 19:09 matthewbauer

Oh great idea, especially since we already have the iOS symulator thing. @matthewbauer Can we add the platform to the nixpkgs examples?

Ericson2314 avatar Sep 24 '19 16:09 Ericson2314

Oh great idea, especially since we already have the iOS symulator thing. @matthewbauer Can we add the platform to the nixpkgs examples?

It looks like ghc 8.6.5 doesn't have support for it:

    (GHC version 8.6.5 for x86_64-unknown-linux-android):
          Failed to lookup the datalayout for x86_64-unknown-linux-android; available targets: ["i386-unknown-windows","i686-unknown-windows","x86_64-unknown-windows","arm-unknown-linux-gnueabihf","armv7a-unknown-linux-androideabi","armv6-unknown-linux-gnueabihf","armv6l-unknown-linux-gnueabihf","armv7-unknown-linux-gnueabihf","armv7a-unknown-linux-gnueabi","armv7l-unknown-linux-gnueabihf","aarch64-unknown-linux-gnu","aarch64-unknown-linux","i386-unknown-linux-gnu","i386-unknown-linux","x86_64-unknown-linux-gnu","x86_64-unknown-linux","armv7-unknown-linux-androideabi","aarch64-unknown-linux-android","powerpc64le-unknown-linux","amd64-portbld-freebsd","arm-unknown-nto-qnx-eabi","i386-apple-darwin","x86_64-apple-darwin","armv7-apple-ios","aarch64-apple-ios","i386-apple-ios","x86_64-apple-ios","aarch64-unknown-freebsd","armv6-unknown-freebsd-gnueabihf","armv7-unknown-freebsd-gnueabihf"]
  CallStack (from HasCallStack):
    error, called at compiler/llvmGen/LlvmCodeGen.hs:96:24 in ghc:LlvmCodeGen

matthewbauer avatar Sep 25 '19 15:09 matthewbauer

https://gitlab.haskell.org/ghc/ghc/issues/16736 already complains about the missing platform. As it seems it's included in GHC 8.8 but as far as I can tell not in the next GHC 8.6 release (for now).

alaendle avatar Sep 26 '19 13:09 alaendle

Now that we've switched to GHC 8.10.7, perhaps this is worth another look.

ali-abrar avatar Sep 07 '23 17:09 ali-abrar