Error while compiling cross-compiler
schugschug at gmail.com
Mon Mar 11 02:12:22 CET 2013
After reading over the wiki it sounds like these are only used for stage
2 compiler, which includes ghci and template haskell.
Is that correct?
I have the executable ghc-stage1 so I guess that is as much as
functionality I will get for cross-compiling to raspberry pi.
Are there optimization features that are missing from the stage 1 compiler?
Why must template haskell support only work with the stage 2 compiler
which can only run on the target platform.
Could not a compiler be built (of either stage 1 or stage 2) which
includes template haskell and which runs on host the host?
Or some how use host version of ghc to handle the template haskell
elements working in conjunction with the cross compiler stage 1
compiler, to generate the complete code.
On 03/10/13 08:26, Simon Marlow wrote:
> On 09/03/13 12:18, Eric Schug wrote:
>> Ok using git HEAD, which got me further, but now errors when compiling
>> Its having problems locating the headers and libraries for
>> Although, I have the host headers and libraries, but I expect it is
>> searching for the target versions.
>> These I can pull from my raspberry pi, but I am not sure where to put
>> them such that the
>> cross compiler will find them.
> I think I disabled terminfo (and hence haskeline) for my RPi
> cross-compiler. I commented them out of ghc.mk as a temporary
> measure, but didn't get around to finding a proper solution.
>> On 03/08/13 20:19, Austin Seipp wrote:
>>> 7.6.2 doesn't really support cross compilation. The bulk of the work
>>> has been done in the git repository. Any artifacts of cross
>>> compilation support in released tarballs can be ignored.
>>> Please do try the steps on the wiki page, using a copy of HEAD from
>>> git. I tried this a week or two ago and encountered no difficulties if
>>> my memory serves correctly.
>>> Sent from my iPhone^H^H^H^H^HPortable Turing machine
>>> On Mar 8, 2013, at 6:34 PM, Eric Schug<schugschug at gmail.com> wrote:
>>>> I am following the instructions for creating a cross compiler for
>>>> Raspberry Pi, but I get a file does not exist error during stage 1
>>>> (see below).
>>>> The basic steps I have taken are
>>>> apt-get install llvm
>>>> git clone https://github.com/raspberrypi/tools.git
>>>> export rpitools=`pwd`/rpitools/
>>>> export tools=`pwd`/tools
>>>> wget http://www.haskell.org/ghc/dist/7.6.2/ghc-7.6.2-src.tar.bz2
>>>> tar jxvf ghc-7.6.2-src.tar.bz2
>>>> cd ghc-7.6.2/
>>>> ./configure --target=arm-linux-gnueabihf --prefix=$rpitools
>>>> make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
>>>> CROSS_COMPILE="arm-unknown-linux-gnueabihf-" "inplace/bin/ghc-cabal"
>>>> --flag=include-ghc-prim --enable-library-for-ghci
>>>> --configure-option=CFLAGS=" -fno-stack-protector "
>>>> --configure-option=LDFLAGS=" -Wl,--hash-size=31
>>>> -Wl,--reduce-memory-overheads " --configure-option=CPPFLAGS=" "
>>>> --with-ar="/usr/bin/ar" --with-ranlib="true"
>>>> --with-alex="/usr/bin/alex" --with-happy="/usr/bin/happy" --
>>>> dist-install libraries/ghc-prim
>>>> Configuring ghc-prim-0.3.0.0...
>>>> ghc-cabal: /tmp/22147.o: does not exist
>>>> make: *** [libraries/ghc-prim/dist-install/package-data.mk] Error 1
>>>> make: *** [all] Error 2
>>>> I am not sure if I need to create a mk/build.mk file using the
>>>> mk/build.mk.sample, but when I do so and add the line
>>>> Stage1Only = YES
>>>> I still get the same error only with a different temp filename.
>>>> ghc-devs mailing list
>>>> ghc-devs at haskell.org
>> ghc-devs mailing list
>> ghc-devs at haskell.org
More information about the ghc-devs