In-tree invocation of GHC built with Hadrian

Simon Peyton Jones simonpj at microsoft.com
Thu Apr 4 12:29:31 UTC 2019


No, setting GHC_ENVIRONMNT to "-" doesn't change anything


tmp$ GHC_ENVIRONMENT=- ~/code/HEAD/_build/stage0/bin/ghc -c Foo.hs

Foo.hs:1:8: error:
    Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi
        mismatched interface file versions (wanted "80920190404", got "8064")
  |
1 | module Foo where
  |        ^^^

| -----Original Message-----
| From: Moritz Angermann <moritz.angermann at gmail.com>
| Sent: 04 April 2019 12:47
| To: Simon Peyton Jones <simonpj at microsoft.com>
| Subject: Re: In-tree invocation of GHC built with Hadrian
| 
| Yes, that looks wrong indeed. It shouldn't pick up the ghc-8.6.4 library.
| 
| After the recent env files discussion, maybe it's picking up some env
| files?
| It's just a wild guess though, I've never had ghc do that to me yet(!).
| Does
| 
| GHC_ENVIRONMENT=- ~/code/HEAD/_build/stage0/bin/ghc -c Foo.hs
| 
| yield any better results?
| 
| Cheers,
|  Moritz
| > On Apr 4, 2019, at 7:21 PM, Simon Peyton Jones via ghc-devs <ghc-
| devs at haskell.org> wrote:
| >
| > How can I run the inplace binary built by Hadrian.  I tried this
| >
| > ~/code/HEAD/_build/stage0/bin/ghc -c Foo.hs
| >
| > but I got this
| >
| > ~/code/HEAD/_build/stage0/bin/ghc -c Foo.hs
| >
| > Foo.hs:1:8: error:
| >     Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-
| 4.12.0.0/Prelude.hi
| >         mismatched interface file versions (wanted "80920190403", got
| "8064")
| >   |
| > 1 | module Foo where
| >   |        ^^^
| > simonpj at MSRC-3645512:~/tmp$
| >
| > Somehow the inplace binary built by Hadrian is looking for library files
| in completely the wrong place.
| >
| > What should I do?
| >
| > Simon
| >
| > _______________________________________________
| > ghc-devs mailing list
| > ghc-devs at haskell.org
| >
| https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.hask
| ell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
| devs&data=02%7C01%7Csimonpj%40microsoft.com%7C350a796ae8db4e3f8fc708d6
| b8f34549%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899752311716865&a
| mp;sdata=FCMavvoIcAGUQVO0ggOxNJwIKZw2EC%2BSbmhZFSacywg%3D&reserved=0



More information about the ghc-devs mailing list