Skip to content

Instantly share code, notes, and snippets.

@gazay
Created January 30, 2015 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gazay/d9a71cc79ea5d56f35cc to your computer and use it in GitHub Desktop.
Save gazay/d9a71cc79ea5d56f35cc to your computer and use it in GitHub Desktop.
Android builder failure
androidbuilder@cf12994d95a0:~/foreign-jni$ arm-linux-androideabi-cabal install
Resolving dependencies...
Downloading text-1.2.0.4...
Downloading transformers-0.4.2.0...
Configuring text-1.2.0.4...
Configuring transformers-0.4.2.0...
Failed to install text-1.2.0.4
Build log ( /home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/.cabal/logs/text-1.2.0.4.log ):
[1 of 1] Compiling Main ( /tmp/text-1.2.0.4-59/text-1.2.0.4/dist/setup/setup.hs, /tmp/text-1.2.0.4-59/text-1.2.0.4/dist/setup/Main.o )
Linking /tmp/text-1.2.0.4-59/text-1.2.0.4/dist/setup/setup ...
/home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/cabal/setup-exe-cache/setup-Simple-Cabal-1.18.1.3-arm-linux-android-ghc-7.8.3: 1: /home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/cabal/setup-exe-cache/setup-Simple-Cabal-1.18.1.3-arm-linux-android-ghc-7.8.3: Syntax error: word unexpected (expecting ")")
Failed to install transformers-0.4.2.0
Build log ( /home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/.cabal/logs/transformers-0.4.2.0.log ):
/home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/cabal/setup-exe-cache/setup-Simple-Cabal-1.18.1.3-arm-linux-android-ghc-7.8.3: 1: /home/androidbuilder/.ghc/android-14/arm-linux-androideabi-4.8/cabal/setup-exe-cache/setup-Simple-Cabal-1.18.1.3-arm-linux-android-ghc-7.8.3: Syntax error: word unexpected (expecting ")")
cabal: Error: some packages failed to install:
foreign-jni-0.1.0.0 depends on transformers-0.4.2.0 which failed to install.
mtl-2.2.1 depends on transformers-0.4.2.0 which failed to install.
text-1.2.0.4 failed during the configure step. The exception was:
ExitFailure 2
transformers-0.4.2.0 failed during the configure step. The exception was:
ExitFailure 2
@sseefried
Copy link

If you could "arm-linux-androideabi-cabal install -v3" you will get a lot more information.

The sad truth is that some of these packages don't build "out of the box" in a cross-compiling environment and you have to "cabal unpack", edit the source code slightly, and then build again. It's pretty annoying.

@gazay
Copy link
Author

gazay commented Jan 31, 2015

@sseefried yep, this worked for me http://stackoverflow.com/questions/25765893/how-do-i-install-dependencies-when-cross-compiling-haskell-code. Now trying to install all dependencies for foreign-jni :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment