[Haskell-iPhone] ghc-ios build issue

Robert Lorentz robert.lorentz at me.com
Tue Nov 27 00:17:02 CET 2012


Hi everyone,

Last night I spoke to two very helpful folks (Stephen and Luke)  on the matter of ghc-ios not building for me.  I haven't reached a solution yet and thought I would post my issue. Stephen thought maybe there was a version mismatch with Cabal, but Luke didn't seem to have any problems building.. 

Any thoughts on what is going wrong here?




I'm following the directions EXPLICITLY from:  https://github.com/ghc-ios/ghc/wiki

I seem to have done the git branch selection properly:

macbook-air:ghc rcl$ cd libraries/Cabal/Cabal/
macbook-air:Cabal rcl$ git branch
* ios


I'm using:

macbook-air:ghc rcl$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1

macbook-air:ghc rcl$ llc --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 3.0
  Optimized build.
  Built Nov 25 2012 (23:35:46).
  Host: x86_64-apple-darwin12.2.0
  Host CPU: i686

  Registered Targets:
    alpha    - Alpha [experimental]
    arm      - ARM
…

MacBook-Air:~ rcl$ uname -a
Darwin MacBook-Air.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64

Mac OS X 10.8.2


Things I've tried since starting:

At first, I had LLVM 3.1 so I switched.  Then I had the latest GHC 'Haskell Package' which was 7.4.2, the wiki recommends 7.4.2 so I installed this older version from Haskell Package 2012.2.0.0 64bit.  Then I thought perhaps I need to install 32 bit Haskell Package; I did this (7.4.1) and it also fails.



When compiling ghc, Cabal fails:

[68 of 68] Compiling Main             ( utils/ghc-cabal/Main.hs, bootstrapping/Main.o )

utils/ghc-cabal/Main.hs:287:67:
    Couldn't match expected type `Data.ByteString.Lazy.Internal.ByteString'
                with actual type `String'
    In the return type of a call of `toUTF8'
    In the second argument of `writeFileAtomic', namely
      `(toUTF8 content)'
    In a stmt of a 'do' block:
      writeFileAtomic (distdir </> "inplace-pkg-config") (toUTF8 content)
make[1]: *** [utils/ghc-cabal/dist/build/tmp/ghc-cabal] Error 1


The build starts off like this:

"/usr/bin/ghc" -H64m -O2 --make utils/ghc-cabal/Main.hs -o utils/ghc-cabal/dist/build/tmp/ghc-cabal \
	       -no-user-package-conf \
	       -Wall \
	       -DCABAL_VERSION=1,17,0 \
	       -odir  bootstrapping \
	       -hidir bootstrapping \
	       -ilibraries/Cabal/Cabal \
	       -ilibraries/filepath \
	       -ilibraries/hpc \



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/iphone/attachments/20121126/e105c688/attachment.htm>


More information about the iPhone mailing list