Cannot make ghc: Failed to load interface for GHC.Base

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

Dan Rosén-4
Dear devs,

I'm getting this build error when compiling GHC:

"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H64m -O0
-fasm    -package-name ghc-prim-0.3.1.0 -hide-all-packages -i
-ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build
-ilibraries/ghc-prim/dist-install/build/autogen
-Ilibraries/ghc-prim/dist-install/build
-Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.
-optP-include
-optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package
rts-1.0 -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash
-XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples
-XEmptyDataDecls -XNoImplicitPrelude -O -fasm  -no-user-package-db
-rtsopts      -odir libraries/ghc-prim/dist-install/build -hidir
libraries/ghc-prim/dist-install/build -stubdir
libraries/ghc-prim/dist-install/build  -dynamic-too -c
libraries/ghc-prim/./GHC/Types.hs -o
libraries/ghc-prim/dist-install/build/GHC/Types.o -dyno
libraries/ghc-prim/dist-install/build/GHC/Types.dyn_o

libraries/ghc-prim/GHC/Types.hs:1:1:
    Failed to load interface for 'GHC.Base'
    There are files missing in the 'base' package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1

I uploaded a full log of (perl boot && ./configure && make) here:
http://www.cse.chalmers.se/~danr/log (3MB)

At lines 2515- I can see this:

"/home/dan/code/ghc/inplace/bin/ghc-pkg" update --force
libraries/base/dist-install/inplace-pkg-config
Reading package info from "libraries/base/dist-install/inplace-pkg-config"
... done.
base-4.7.0.0: Warning: haddock-interfaces:
/home/dan/code/ghc/libraries/base/dist-install/doc/html/base/base.haddock
doesn't exist or isn't a file
base-4.7.0.0: cannot find any of
["Control/Applicative.hi","Control/Applicative.p_hi","Control/Applicative.dyn_hi"]
(ignoring)
...
base-4.7.0.0: cannot find any of
["GHC/Base.hi","GHC/Base.p_hi","GHC/Base.dyn_hi"] (ignoring)

Maybe this is related? I don't know if these ignores are expected.

I've tried cloning the repo from http://git.haskell.org/ghc.git and the
github mirror, I'm using the "quick" build flavour, but I've also tried
adding

DYNAMIC_BY_DEFAULT=NO
DYNAMIC_GHC_PROGRAMS=NO

before GhcLibWays' definition in mk/build.mk without success.

Any ideas what could be wrong?

Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130829/d6eb964c/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

David Luposchainsky
On 2013-08-29 12:20, Dan Ros?n wrote:
> I'm getting this build error when compiling GHC

Just as a remark, I'm getting the same error, presumably because Dan and
me were working on the same modules. To put the error in perspective,
here's how I got it: After editing a few lines in PrelNames.lhs and
TcRnDriver.lhs, I felt like it was time to rebuild GHC again from
scratch, so I did the usual clean-and-make-again. However, it seems like
Base simply isn't built, all the packages are skipped for some reason
(search for "Configuring array-0.4.0.2..." in Dan's log for example).

I've had this issue in the past, and none of
clean/distclean/maintainer-clean helped solve it. In the end I just
deleted the folder and cloned a new version, but that's hardly a
solution I'd like to use every time, especially when I've done code
changes (generate and then reapply patch manually).

David



Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

Austin Seipp-4
When was the last time you cleaned your tree? Earlier this week I made a
breaking change to the interface file format. If you have a build from
before then, update and incrementally rebuild, it will break.

On Thursday, August 29, 2013, David Luposchainsky wrote:

> On 2013-08-29 12:20, Dan Ros?n wrote:
> > I'm getting this build error when compiling GHC
>
> Just as a remark, I'm getting the same error, presumably because Dan and
> me were working on the same modules. To put the error in perspective,
> here's how I got it: After editing a few lines in PrelNames.lhs and
> TcRnDriver.lhs, I felt like it was time to rebuild GHC again from
> scratch, so I did the usual clean-and-make-again. However, it seems like
> Base simply isn't built, all the packages are skipped for some reason
> (search for "Configuring array-0.4.0.2..." in Dan's log for example).
>
> I've had this issue in the past, and none of
> clean/distclean/maintainer-clean helped solve it. In the end I just
> deleted the folder and cloned a new version, but that's hardly a
> solution I'd like to use every time, especially when I've done code
> changes (generate and then reapply patch manually).
>
> David
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org <javascript:;>
> http://www.haskell.org/mailman/listinfo/ghc-devs
>


--
Sent from my portable turning machine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130829/1354742a/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

David Luposchainsky
On 2013-08-29 18:03, Austin Seipp wrote:
> When was the last time you cleaned your tree? Earlier this week I made a
> breaking change to the interface file format. If you have a build from
> before then, update and incrementally rebuild, it will break.

I tried all of clean, distclean and maintainer-clean, followed by the
usual build process. The issue remains.

David




Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

Dan Rosén-4
In reply to this post by Austin Seipp-4
Sorry! I thought I got this build error when making HEAD, but I don't. It
builds fine.

However, if I just cherry-pick this simple commit onto HEAD
https://github.com/danr/ghc/commit/86631ffd294af320cb9b00e1a593201af887ed72,
then I do get this error, which is very puzzling. I did a make
maintainer-clean in between.



On Thu, Aug 29, 2013 at 6:05 PM, David Luposchainsky <
dluposchainsky at googlemail.com> wrote:

> On 2013-08-29 18:03, Austin Seipp wrote:
> > When was the last time you cleaned your tree? Earlier this week I made a
> > breaking change to the interface file format. If you have a build from
> > before then, update and incrementally rebuild, it will break.
>
> I tried all of clean, distclean and maintainer-clean, followed by the
> usual build process. The issue remains.
>
> David
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130830/75c99b66/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

Dan Rosén-4
In reply to this post by Austin Seipp-4
Closed, but a note to interested readers:

killy9999 on #ghc realized the reason why the stage1 compiler cannot be
built with this patch is related to that several test suite programs exit
with erros like this:

GHC/Base.lhs:1:1:
    GHC internal error: 'GHC.Base.Monad' is not in scope during type
checking, but it passed the renamer
    tcl_env of environment: []


So the error is resolved, and now productive debugging can start.


On Fri, Aug 30, 2013 at 2:50 PM, Dan Ros?n <danr at chalmers.se> wrote:

>  Sorry! I thought I got this build error when making HEAD, but I don't.
> It builds fine.
>
> However, if I just cherry-pick this simple commit onto HEAD
> https://github.com/danr/ghc/commit/86631ffd294af320cb9b00e1a593201af887ed72
> ,
> then I do get this error, which is very puzzling. I did a make
> maintainer-clean in between.
>
>
>
> On Thu, Aug 29, 2013 at 6:05 PM, David Luposchainsky <
> dluposchainsky at googlemail.com> wrote:
>
>> On 2013-08-29 18:03, Austin Seipp wrote:
>> > When was the last time you cleaned your tree? Earlier this week I made a
>> > breaking change to the interface file format. If you have a build from
>> > before then, update and incrementally rebuild, it will break.
>>
>>  I tried all of clean, distclean and maintainer-clean, followed by the
>> usual build process. The issue remains.
>>
>> David
>>
>>
>> _______________________________________________
>> ghc-devs mailing list
>> ghc-devs at haskell.org
>> http://www.haskell.org/mailman/listinfo/ghc-devs
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130830/a977cc44/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

Simon Peyton Jones
Wait.. are you saying that with HEAD several test suite programs fail as you describe below?  If so, which?

Simion

From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Dan Ros?n
Sent: 30 August 2013 14:26
To: David Luposchainsky
Cc: ghc-devs at haskell.org
Subject: Re: Cannot make ghc: Failed to load interface for GHC.Base

Closed, but a note to interested readers:

killy9999 on #ghc realized the reason why the stage1 compiler cannot be built with this patch is related to that several test suite programs exit with erros like this:

GHC/Base.lhs:1:1:

    GHC internal error: ?GHC.Base.Monad? is not in scope during type checking, but it passed the renamer

    tcl_env of environment: []

So the error is resolved, and now productive debugging can start.

On Fri, Aug 30, 2013 at 2:50 PM, Dan Ros?n <danr at chalmers.se<mailto:danr at chalmers.se>> wrote:
Sorry! I thought I got this build error when making HEAD, but I don't. It builds fine.

However, if I just cherry-pick this simple commit onto HEAD
https://github.com/danr/ghc/commit/86631ffd294af320cb9b00e1a593201af887ed72,
then I do get this error, which is very puzzling. I did a make maintainer-clean in between.

On Thu, Aug 29, 2013 at 6:05 PM, David Luposchainsky <dluposchainsky at googlemail.com<mailto:dluposchainsky at googlemail.com>> wrote:
On 2013-08-29 18:03, Austin Seipp wrote:
> When was the last time you cleaned your tree? Earlier this week I made a
> breaking change to the interface file format. If you have a build from
> before then, update and incrementally rebuild, it will break.
I tried all of clean, distclean and maintainer-clean, followed by the
usual build process. The issue remains.

David


_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
http://www.haskell.org/mailman/listinfo/ghc-devs


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130830/ce632e25/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Cannot make ghc: Failed to load interface for GHC.Base

Dan Rosén-4
In reply to this post by Dan Rosén-4
No! Sorry for the confusion Simon, it is HEAD _PLUS_ my own commit that
triggers these errors. Oh, and I should add that 'my own commit' is only in
my own development repository. So, no worries!

/Dan


On Fri, Aug 30, 2013 at 4:44 PM, Simon Peyton-Jones
<simonpj at microsoft.com>wrote:

>  Wait.. are you saying that with HEAD several test suite programs fail as
> you describe below?  If so, which?
>
> Simion****
>
> ** **
>
> *From:* ghc-devs [mailto:ghc-devs-bounces at haskell.org] *On Behalf Of *Dan
> Ros?n
> *Sent:* 30 August 2013 14:26
> *To:* David Luposchainsky
> *Cc:* ghc-devs at haskell.org
> *Subject:* Re: Cannot make ghc: Failed to load interface for GHC.Base****
>
> ** **
>
> Closed, but a note to interested readers:
>
> killy9999 on #ghc realized the reason why the stage1 compiler cannot be
> built with this patch is related to that several test suite programs exit
> with erros like this:****
>
> GHC/Base.lhs:1:1:****
>
>     GHC internal error: 'GHC.Base.Monad' is not in scope during type checking, but it passed the renamer****
>
>     tcl_env of environment: []****
>
>
> So the error is resolved, and now productive debugging can start.****
>
> ** **
>
> On Fri, Aug 30, 2013 at 2:50 PM, Dan Ros?n <danr at chalmers.se> wrote:****
>
>   Sorry! I thought I got this build error when making HEAD, but I don't.
> It builds fine.
>
> However, if I just cherry-pick this simple commit onto HEAD
> https://github.com/danr/ghc/commit/86631ffd294af320cb9b00e1a593201af887ed72
> ,
> then I do get this error, which is very puzzling. I did a make
> maintainer-clean in between. ****
>
> ** **
>
> On Thu, Aug 29, 2013 at 6:05 PM, David Luposchainsky <
> dluposchainsky at googlemail.com> wrote:****
>
>  On 2013-08-29 18:03, Austin Seipp wrote:
> > When was the last time you cleaned your tree? Earlier this week I made a
> > breaking change to the interface file format. If you have a build from
> > before then, update and incrementally rebuild, it will break.****
>
> I tried all of clean, distclean and maintainer-clean, followed by the
> usual build process. The issue remains.****
>
>
> David
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs****
>
>   ** **
>
>  ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130830/03c4fef4/attachment.htm>