Error building ghc on raspberry pi.

roconnor at theorem.ca roconnor at theorem.ca
Fri Jan 18 01:27:31 CET 2013


On Thu, 17 Jan 2013, Austin Seipp wrote:

> There have been a few of these bugs recently it seems. If you could:
> use the stage1 compiler to compile a simple executable, like 'main =
> return ()' or hello world or whatever.
>
> The stage1 compiler can be located in the build directory, under
> 'inplace/bin/ghc-stage1'. So something like:
>
> <GHC BUILD>/inplace/bin/ghc-stage1 -fforce-recomp hello_world.hs
>
> Check if the output executable crashes immediately. If it does, then
> it is likely a miscompilation of the runtime or libraries somewhere.
> Otherwise, we'll have to narrow down another way.

$ inplace/bin/ghc-stage1 -fforce-recomp /tmp/Main.hs
[1 of 1] Compiling Main             ( /tmp/Main.hs, /tmp/Main.o )
Linking /tmp/Main ...
$ /tmp/Main
Segmentation fault

> If it does fail, please use GDB on the executable, and give a
> backtrace from the crash (using the 'bt' command, after the program
> has crashed.)

I'll get back to you on this.

> You can also try linking with the debug RTS, by passing the -debug and
> -rtsopts flag to ghc-stage1. Then run again, and see if something else
> was tripped. You can see all the sanity checks you can enable, if you
> run the executable using './program.exe +RTS --help'. The debug flags
> are named things like '-Ds' and '-Da', etc and should be passed to the
> RTS.

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''



More information about the Glasgow-haskell-users mailing list