Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal fails with Custom Setup.hs #4

Open
joeyh opened this issue Feb 8, 2013 · 2 comments
Open

cabal fails with Custom Setup.hs #4

joeyh opened this issue Feb 8, 2013 · 2 comments

Comments

@joeyh
Copy link
Contributor

joeyh commented Feb 8, 2013

Trying to build packages that use a Custom Setup.hs with the cabal wrapper will fail. It seems cabal doesn't really understand cross-compiling, so it builds the Setup.hs with the android ghc, and then tries to run it.

I don't know of a fix at this time. May need cabal changes. I was able to work around it in one case by setting Build-Type: Simple in the cabal file. That package only used the cistom Setup.hs to do some haddock stuff.

@neurocyte
Copy link
Owner

In the long run Cabal definitely needs proper cross compile support. There was some discussion on the mailing list awhile ago about it, but I don’t think anyone is actively working on it right now.

@joeyh
Copy link
Contributor Author

joeyh commented Feb 9, 2013

The trick described above works for most problem packages. One challanging one is network, which uses a configure script. I just got it to build, via this very hacky method:

cabal unpack network
copy in config.sub and config.guess from automake 1.13.1
edit the configure script, and add to the top of it: set -- --host=arm-linux-androideabi

Then the cabal wrapper can be used to install it. Although I had several build failure due to, apparently, it wanting to build in IPV6 socket support, which seemed to use symbols not available to ghc-android. It was easy enough to edit the files where this occurred and ifdef that stuff out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants