In-tree invocation of GHC built with Hadrian
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@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
Do you have any .ghc-environment files in your working directory? Matt On Thu, Apr 4, 2019 at 12:21 PM Simon Peyton Jones via ghc-devs <ghc-devs@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@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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
No, definitely not in the current directory. There is only one file in the directory, Foo.hs Simon | -----Original Message----- | From: Matthew Pickering <matthewtpickering@gmail.com> | Sent: 04 April 2019 12:46 | To: Simon Peyton Jones <simonpj@microsoft.com> | Cc: ghc-devs@haskell.org | Subject: Re: In-tree invocation of GHC built with Hadrian | | Do you have any .ghc-environment files in your working directory? | | Matt | | | On Thu, Apr 4, 2019 at 12:21 PM Simon Peyton Jones via ghc-devs <ghc- | devs@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@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@haskell.org | > https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail. | > haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01 | > %7Csimonpj%40microsoft.com%7Cf54dbe96df5f405e689c08d6b8f33015%7C72f988 | > bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899752031269186&sdata=Llg1 | > 19jpY9JjiYxgWoca3b7Z%2BvZXruKbQVHIW1okxo4%3D&reserved=0
I can reproduce this problem. This doesn't come up when building stage2 with that executable (stage1) because the commands that Hadrian emits all do something along the lines of `-no-user-package-db -package-db _build/stage0/lib/package.conf.d`, which masks the problem. I'm looking into this, I will open a ticket soon with the information that I can gather. On 04/04/2019 13:21, Simon Peyton Jones via ghc-devs 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@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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- Alp Mestanogullari, Haskell Consultant Well-Typed LLP, https://www.well-typed.com/ Registered in England and Wales, OC335890 118 Wymering Mansions, Wymering Road, London, W9 2NF, England
OK, that's great - it's not just me. I'll await further guidance, and revert to "sh validate" meanwhile. Thanks Simon From: ghc-devs <ghc-devs-bounces@haskell.org> On Behalf Of Alp Mestanogullari Sent: 04 April 2019 16:25 To: ghc-devs@haskell.org Subject: Re: In-tree invocation of GHC built with Hadrian I can reproduce this problem. This doesn't come up when building stage2 with that executable (stage1) because the commands that Hadrian emits all do something along the lines of `-no-user-package-db -package-db _build/stage0/lib/package.conf.d`, which masks the problem. I'm looking into this, I will open a ticket soon with the information that I can gather. On 04/04/2019 13:21, Simon Peyton Jones via ghc-devs 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@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@haskell.org<mailto:ghc-devs@haskell.org> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7Ca6847ac7f36c4ce3262f08d6b911c07c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899883237056680&sdata=vuOggPvujLw9p5TxHvatZdcbWlG59WOocBz1YU4Q534%3D&reserved=0> -- Alp Mestanogullari, Haskell Consultant Well-Typed LLP, https://www.well-typed.com/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.well-typed.com%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ca6847ac7f36c4ce3262f08d6b911c07c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899883237066684&sdata=OTz4GGrHGdlLedtBvHrW5%2BmqeLcaRaIIsivi1P%2B7Xus%3D&reserved=0> Registered in England and Wales, OC335890 118 Wymering Mansions, Wymering Road, London, W9 2NF, England
Issue tracked at https://gitlab.haskell.org/ghc/ghc/issues/16534 Somehow the stage 2 GHCs (_build/stage1/bin/ghc) that we build _don't_ have this problem. I will post an update here when I have a comprehensive explanation and a fix. On 04/04/2019 17:40, Simon Peyton Jones wrote:
OK, that’s great – it’s not just me. I’ll await further guidance, and revert to “sh validate” meanwhile.
Thanks
Simon
*From:*ghc-devs <ghc-devs-bounces@haskell.org> *On Behalf Of *Alp Mestanogullari *Sent:* 04 April 2019 16:25 *To:* ghc-devs@haskell.org *Subject:* Re: In-tree invocation of GHC built with Hadrian
I can reproduce this problem. This doesn't come up when building stage2 with that executable (stage1) because the commands that Hadrian emits all do something along the lines of `-no-user-package-db -package-db _build/stage0/lib/package.conf.d`, which masks the problem. I'm looking into this, I will open a ticket soon with the information that I can gather.
On 04/04/2019 13:21, Simon Peyton Jones via ghc-devs 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@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@haskell.org <mailto:ghc-devs@haskell.org>
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs <https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7Ca6847ac7f36c4ce3262f08d6b911c07c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899883237056680&sdata=vuOggPvujLw9p5TxHvatZdcbWlG59WOocBz1YU4Q534%3D&reserved=0>
-- Alp Mestanogullari, Haskell Consultant Well-Typed LLP,https://www.well-typed.com/ <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.well-typed.com%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ca6847ac7f36c4ce3262f08d6b911c07c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899883237066684&sdata=OTz4GGrHGdlLedtBvHrW5%2BmqeLcaRaIIsivi1P%2B7Xus%3D&reserved=0> Registered in England and Wales, OC335890 118 Wymering Mansions, Wymering Road, London, W9 2NF, England
-- Alp Mestanogullari, Haskell Consultant Well-Typed LLP, https://www.well-typed.com/ Registered in England and Wales, OC335890 118 Wymering Mansions, Wymering Road, London, W9 2NF, England
participants (3)
-
Alp Mestanogullari -
Matthew Pickering -
Simon Peyton Jones