frasertweedale / hs-jose

Haskell JOSE and JWT library
http://hackage.haskell.org/package/jose
Apache License 2.0
122 stars 46 forks source link

Problems compiling to Android #80

Closed rprije closed 3 years ago

rprije commented 5 years ago

I'm using nix to cross-compile JOSE targeting Android and am getting the following error:

Preprocessing library for jose-0.8.0.0..
Building library for jose-0.8.0.0..
[ 1 of 18] Compiling Crypto.JOSE.AESKW ( src/Crypto/JOSE/AESKW.hs, dist/build/Crypto/JOSE/AESKW.o )
[ 2 of 18] Compiling Crypto.JOSE.Error ( src/Crypto/JOSE/Error.hs, dist/build/Crypto/JOSE/Error.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.3 for arm-unknown-linux-android):
        Ix{Int}.index: Index (119) out of range ((0,63))

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

I attached my gzipped nix derivation which I hope is complete enough information to understand how it's attempting to do the build. It also failed when attempting 0.7.0.0.

dq4ayr9q81qlmndwszsf7bnl6hjc5dci-jose-0.8.0.0-armv7a-unknown-linux-androideabi.drv.gz

frasertweedale commented 5 years ago

Probably won't get a chance to look at this for a little while (some days, at least). Have you tried with other GHC versions?

rprije commented 5 years ago

Not yet. I've been having a little trouble figuring out how to change the GHC version on this platform. I'll follow up again if I figure it out.

frasertweedale commented 3 years ago

Closing due to inactivity. @rprije or anyone else: if this is still occurring with recent GHC, please reopen.