On 01/05/2013 05:20 PM, Stephen Paul Weber wrote:
> Somebody claiming to be Nathan Hüsken wrote:
>> ghc build stage1 succeeds, stage2 fails with:
> 
> IIRC, stage2 does not work with cross-compiling.
> 
>> Time.hsc: In function '_hsc2hs_test45':
>> Time.hsc:266:20: error: storage size of 'test_array' isn't constant
> 
> Which Time.hsc?

It is
libraries/old-time/dist-install/build/System/Time.hs

> 
>> But if I understand correctly, that is not so bad because stage1 is
>> already the cross compiler that I need (linux->android), correct?
> 
> Almost.  You need stage1 and the stage1 libraries.

Ok, but when it says "building final phase" should have build stage1
libraries, right?

> 
>> Ok, so I try to use it. I got to inplace/bin and do
>>
>> ./ghc-stage1 Main.hs
>>
>> where the contents of Main.hs are:
>>
>> putStrLn "Hello, World!"
> 
> I believe that this should work.  I usually symlink to ghc and put the
> dir in PATH, but that shouldn't change anything.
> 
>> wired-in package base mapped to base-4.7.0.0-inplace
> 
> Looks like it thinks base got built.
> 
>> wired-in package base mapped to base-4.7.0.0-inplace
>>
>> Main.hs:1:1:
>>    Could not find module `Prelude'
>>    There are files missing in the `base' package,
>>    try running 'ghc-pkg check'.
>>    Locations searched:
>>      Prelude.hs
>>      Prelude.lhs
>> /home/ls/src/ghc-7.7.20121213/libraries/base/dist-install/build/Prelude.hi
>>
> 
> Hmm.  Perhaps the libraries did *not* in fact build properly.  What
> happens when you try to build by itself?

How do I build the libraries by themself? I did not know, so I recorded
the complete output of the ghc build. For completeness it is here: [1].

When it gets into phase 1, there are a lot of messages like these:


  utils/genapply/ghc.mk:27: utils/genapply/dist/build/.depend.haskell:
No such file or directory

Looking for where it seems to build base (the output is I believe what I
posted in [1]), I find a lot of messages like these:

base-4.7.0.0: cannot find any of
["Foreign/Concurrent.hi","Foreign/Concurrent.p_hi","Foreign/Concurrent.dyn_hi"]
(ignoring)

which tells me that hi files are not beeing build ... but I can not find
any output that tells me why.
Maybe I just do not know what to look for?

[1]: https://gist.github.com/4470932
[2]: https://gist.github.com/4470854


_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to