Fwd: vector fails to build with ghc on arm-linux-androideabi

Hello, I'm trying to build the openpgp libs for android. I can build and run HaskellActivity from the HelloWorld sample, but as when I try to install vector, I get the following build failure: ==================== $ arm-linux-androideabi-cabal install --reinstall --force-reinstall vector ... [ 5 of 19] Compiling Data.Vector.Fusion.Stream.Monadic ( Data/Vector/Fusion/Stream/Monadic.hs, dist/build/Data/Vector/Fusion/Stream/Monadic.o ) Loading package ghc-prim ... linking ... ghc: /home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/lib/arm-unknown-linux-androideabi-ghc-7.7.20130921/ghc-prim-0.3.1.0/HSghc-prim-0.3.1.0.o: unhandled ELF relocation(Rel) type 28 ghc: unable to load package `ghc-prim' Failed to install vector-0.10.9.1 ... ==================== It seems somewhat related to this closed bug: https://ghc.haskell.org/trac/ghc/ticket/7824 Am I doing something stupid? Can I fix this? cheers

Hi Herwig, I assume you’re using my ghc-android build script from github? Currently ghc-android still builds ghc with 'DYNAMIC_GHC_PROGRAMS = NO' which means that it doesn’t get to use the system linker. Hopefully, once we get ghc to use the system linker on Android problems like this will go away. I am currently waiting for the 7.8 release before doing a complete review of how ghc-android builds ghc and how the resulting binaries are best integrated into Android applications. I suggest you add a ticket to the github page for this specific issue. On 2013-11-27 22:29, Herwig Hochleitner wrote:
Hello,
I'm trying to build the openpgp libs for android. I can build and run HaskellActivity from the HelloWorld sample, but as when I try to install vector, I get the following build failure:
====================
$ arm-linux-androideabi-cabal install --reinstall --force-reinstall vector ... [ 5 of 19] Compiling Data.Vector.Fusion.Stream.Monadic ( Data/Vector/Fusion/Stream/Monadic.hs, dist/build/Data/Vector/Fusion/Stream/Monadic.o ) Loading package ghc-prim ... linking ... ghc: /home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/lib/arm-unknown-linux-androideabi-ghc-7.7.20130921/ghc-prim-0.3.1.0/HSghc-prim-0.3.1.0.o: unhandled ELF relocation(Rel) type 28
ghc: unable to load package `ghc-prim' Failed to install vector-0.10.9.1 ...
====================
It seems somewhat related to this closed bug: https://ghc.haskell.org/trac/ghc/ticket/7824 Am I doing something stupid? Can I fix this?
cheers
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- CJ van den Berg mailto:cj@vdbonline.com xmpp:neurocyte@gmail.com
participants (2)
-
CJ van den Berg
-
Herwig Hochleitner