[Haskell-iPhone] build troubles with ghc-ios
Stephen Blackheath [to GHC-iPhone]
likeliest.complexions.stephen at blacksapphire.com
Mon Mar 25 22:50:49 CET 2013
Stefan,
Aha. I already mentioned that...
http://hackage.haskell.org/trac/ghc/ticket/7759
...needs to be applied to base, but there is another one that I missed.
This patch also needs to be applied to utils/hsc2hs:
http://hackage.haskell.org/trac/ghc/ticket/7760
Warning: I've just checked some new stuff into master-merge-ios that is
merged with the latest mainline. I tested it before I merged, so it is
possible that the merge has introduced some breakage. You could help me
by testing it.
I'm now very close to finishing getting this all integrated into
mainline GHC.
Steve
On 26/03/13 06:30, Stefan Kersten wrote:
> hi stephen,
>
> thanks for your reply. i've tried again with your instructions, here's a transcript of what i did:
>
> git clone git://github.com/ghc-ios/ghc.git ghc-ios
> cd ghc-ios
> git checkout --track origin/master-merge-ios
>
> Point remote origin to http://darcs.haskell.org/ghc.git
>
> Edit packages and add haskeline (otherwise perl boot complains):
>
> diff --git a/packages b/packages
> -libraries/haskeline - -
> +libraries/haskeline - packages/haskeline.git
>
> ./sync-all --no-dph get
>
> Patch libraries/base
>
> $( cd libraries/base && curl http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7759/ios-patch-14a-libraries-base.patch | patch -p1 )
>
> $( cd libraries/Cabal && git remote add lukes git at github.com:ghc-ios/packages-Cabal.git && git pull lukes master )
>
> export PATH=$PWD/arm-apple-darwin10-bin:$PATH
> perl boot
>
> configure && make
>
> now i get C compiler errors like the following:
>
> "inplace/bin/hsc2hs" --cc=/Users/sk/dev/haskell/ghc-ios/arm-apple-darwin10-bin/arm-apple-darwin10-gcc --ld=/Users/sk/dev/haskell/ghc-ios/arm-apple-darwin10-bin/arm-apple-darwin10-gcc --cross-safe --cflag=-fno-stack-protector --cross-compile --cflag=-Darm_HOST_ARCH=1 --cflag=-Dios_HOST_OS=1 --cflag=-D__GLASGOW_HASKELL__=707 '--cflag=-fno-stack-protector' '--cflag=-Icompiler/stage2' '--cflag=-Icompiler/.' '--cflag=-Icompiler/parser' '--cflag=-Icompiler/utils' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/process/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/directory/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/unix/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/time/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/containers/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/bytestring/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libraries/array/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/libra
ries/base
/include' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/rts/dist/build' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/includes' '--cflag=-I/Users/sk/dev/haskell/ghc-ios/includes/dist-derivedconstants/header' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/transformers/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/hpc/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/hoopl/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/bin-package-db/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/binary/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/Cabal/Cabal/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/process/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/pretty/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/directory/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/unix/dist-install/bu
ild' '--l
flag=-L/Users/sk/dev/haskell/ghc-ios/libraries/time/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/old-locale/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/filepath/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/containers/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/bytestring/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/deepseq/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/array/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/base/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/integer-simple/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/libraries/ghc-prim/dist-install/build' '--lflag=-L/Users/sk/dev/haskell/ghc-ios/rts/dist/build' '--lflag=-ldl' '--lflag=-liconv' '--lflag=-lm' '--lflag=-ldl' --cflag=-Icompiler/stage2/build/autogen --cflag=-include --cflag=compiler/s
tage2/bui
ld/autogen/cabal_macros.h compiler/utils/Fingerprint.hsc -o compiler/stage2/build/Fingerprint.hs
> cc1: error: unrecognized command line option "-m64"
>
> editing mk/config.mk and removing the -m64 flags helps a little but then compilation fails again with Fingerprint.hs.
>
> any ideas what's going wrong?
>
> this is on osx 10.8.3 with xcode 4.6.1 and ghc 7.6.2 (64 bit).
>
> thanks,
> sk
>
> On 24 Mar 2013, at 23:15, Stephen Blackheath [to GHC-iPhone] <likeliest.complexions.stephen at blacksapphire.com> wrote:
>> Stefan,
>>
>> The master-merge-ios branch is much newer than the ghc-ios branch and works very well. There are some small changes required to base and to cabal. This contains what I am trying to get checked in to GHC mainline. I have to improve some of it, but it all works.
>>
>> Here is what is going to be the instructions for building from mainline, except that it doesn't quite work yet.
>>
>> Take a look at http://hackage.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
>>
>> I'd recommend you do this:
>>
>> 1. Checkout the master-merge-ios branch, then point your git repo at the main branch. Run perl boot and ./sync-all get
>>
>> 2. Apply this patch to base: http://hackage.haskell.org/trac/ghc/ticket/7759
>>
>> 3. Follow the instructions I gave in Building/CrossCompiling/iOS (the link above) to do with Cabal.
>>
>> Then follow the rest of the instructions on how to build it. For convenience, the needed arm-apple-darwin10-* scripts are in a directory called arm-apple-darwin10/ in the master-merge-ios branch.
>>
>>
>> Steve
>>
>> On 25/03/13 05:35, Stefan Kersten wrote:
>>> hi all,
>>>
>>> i'm having a hard time building ghc from the ghc-ios ios branch. i am using the script that has been posted recently on this list for checking out the correct versions of library packages [1]. below is the error i get for rts/PrimOps.cmm (libraries/ghc-prim/GHC/Generics.hs fails with a similar error); this is on osx 10.8.3 with xcode 4.6.1. i've tried compiling with ghc 7.4.1 and 7.4.2, both built for i386 and x86_64, respectively. does this look familiar to anybody?
>>>
>>> thanks,
>>> sk
>>>
>>> [1] https://github.com/pjones/ghc-ios-util/blob/master/ghc/checkout.sh
>>>
>>> "inplace/bin/ghc-stage1" -H64m -O2 -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -optc-O2 -c rts/PrimOps.cmm -o rts/dist/build/PrimOps.o
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3966:0:
>>> bad immediate value for offset (6012)
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3960:0:
>>> bad immediate value for offset (5992)
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3926:0:
>>> bad immediate value for offset (5920)
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3920:0:
>>> bad immediate value for offset (5900)
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3899:0:
>>> bad immediate value for offset (5828)
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3886:0:
>>> bad immediate value for offset (5788)
>>>
>>> /var/folders/qh/jdhbtx3x10jfrs0yq3qrfdx00000gn/T/ghc40705_0/ghc40705_0.s:3860:0:
>>> bad immediate value for offset (5700)
>>>
>>>
>>>
>>> _______________________________________________
>>> iPhone mailing list
>>> iPhone at haskell.org
>>> http://www.haskell.org/mailman/listinfo/iphone
>>>
>>
>> _______________________________________________
>> iPhone mailing list
>> iPhone at haskell.org
>> http://www.haskell.org/mailman/listinfo/iphone
>
More information about the iPhone
mailing list