
shiftag@nanotek.info writes:
Hi List,
I would like to install GHC for my CPU which is an ARMv7L Soft-ABI NEON FPU. I read some stuff on ARM and GHC related. So it appears that an installation is possible but with a RPi. The problem is the stack binary which has been compiled for Hard-Float target. So it should not be difficult to make it work for my architecture.
Indeed I suspect you are right; it should be fairly straightforward to build GHC for your platform.
I checked for stack sources (stack-1.5.1.tar.gz) but I have any clue about how to compile it. Can you give me an hand ?
First you will need to build GHC itself. This will be a two-step process:
1. First build a cross-compiler [1] for your ARMv7L target on a machine with a working GHC (e.g. an amd64 machine).
2. Transfer this compiler to your target and use it to build a native GHC
Let us know if you have any trouble.
Cheers,
- Ben
[1] https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling
Thank you. So, I succeed to install GHC on x64 GNU/Linux machine. However, I have an issue at Stage1 while cross-compiling. I have the following error : # make ===--- building phase 0 make --no-print-directory -f ghc.mk phase=0 phase_0_builds utils/genprimopcode/ghc.mk:19: utils/genprimopcode/dist/package-data.mk: No such file or directory utils/deriveConstants/ghc.mk:19: utils/deriveConstants/dist/package-data.mk: No such file or directory utils/genapply/ghc.mk:23: utils/genapply/dist/package-data.mk: No such file or directory libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No such file or directory libraries/binary/ghc.mk:3: libraries/binary/dist-boot/package-data.mk: No such file or directory libraries/Cabal/Cabal/ghc.mk:3: libraries/Cabal/Cabal/dist-boot/package-data.mk: No such file or directory libraries/ghc-boot-th/ghc.mk:3: libraries/ghc-boot-th/dist-boot/package-data.mk: No such file or directory libraries/ghc-boot/ghc.mk:3: libraries/ghc-boot/dist-boot/package-data.mk: No such file or directory libraries/template-haskell/ghc.mk:3: libraries/template-haskell/dist-boot/package-data.mk: No such file or directory libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/package-data.mk: No such file or directory libraries/transformers/ghc.mk:3: libraries/transformers/dist-boot/package-data.mk: No such file or directory libraries/terminfo/ghc.mk:3: libraries/terminfo/dist-boot/package-data.mk: No such file or directory compiler/ghc.mk:584: compiler/stage1/package-data.mk: No such file or directory utils/hsc2hs/ghc.mk:15: utils/hsc2hs/dist/package-data.mk: No such file or directory utils/ghc-pkg/ghc.mk:60: utils/ghc-pkg/dist/package-data.mk: No such file or directory utils/dll-split/ghc.mk:23: utils/dll-split/dist-install/package-data.mk: No such file or directory ghc/ghc.mk:111: ghc/stage1/package-data.mk: No such file or directory "/usr/bin/ghc" -H32m -O -Wall \ -optc-Wall -optc-fno-stack-protector \ \ -hide-all-packages \ -package base -package array -package time -package containers -package bytestring -package deepseq -package process -package pretty -package directory -package unix \ --make utils/ghc-cabal/Main.hs -o utils/ghc-cabal/dist/build/tmp/ghc-cabal \ -no-user-package-db \ -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations \ -DCABAL_VERSION=1,24,2,0 \ -DMIN_VERSION_binary_0_8_0 \ -DBOOTSTRAPPING \ -optP-include -optPutils/ghc-cabal/cabal_macros_boot.h \ -odir bootstrapping \ -hidir bootstrapping \ -ilibraries/Cabal/Cabal \ -ilibraries/binary/src -DGENERICS \ -ilibraries/filepath \ -ilibraries/hpc \ [53 of 95] Compiling Distribution.PackageDescription ( libraries/Cabal/Cabal/Distribution/PackageDescription.hs, bootstrapping/Distribution/PackageDescription.o ) utils/ghc-cabal/ghc.mk:48: recipe for target 'utils/ghc-cabal/dist/build/tmp/ghc-cabal' failed make[1]: *** [utils/ghc-cabal/dist/build/tmp/ghc-cabal] Killed Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 I checked Google and I found the following patch : https://ghc.haskell.org/trac/ghc/ticket/8709 But it didn't work. Do you have an idea to fix it ? Cheers