Hadrian

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

Hadrian

GHC - devs mailing list

Andrey and other Hadrian heros

Just to say that I am 100% stalled on using Hadrian because the in-tree binary uses the wrong library files.  I reported this a few weeks ago, but it still seems unchanged

Simon

 

Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414

simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs

 

T16566.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 "809020190414", got "8064")

  |

1 | module T16566 where

  |        ^^^^^^


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

Andrey Mokhov

Hi Simon,

Apologies it’s taking so long. It’s not obvious how to fix this properly, and as a temporary workaround we could create a top-level wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like Hadrian itself does during the build.

Will this work for you?

Cheers,
Andrey

 

From: Simon Peyton Jones [mailto:[hidden email]]
Sent: 15 April 2019 12:28
To: Andrey Mokhov <[hidden email]>
Cc: [hidden email]
Subject: Hadrian

 

Andrey and other Hadrian heros

Just to say that I am 100% stalled on using Hadrian because the in-tree binary uses the wrong library files.  I reported this a few weeks ago, but it still seems unchanged

Simon

 

Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414

simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs

 

T16566.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 "809020190414", got "8064")

  |

1 | module T16566 where

  |        ^^^^^^


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list

as a temporary workaround we could create a top-level wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like Hadrian itself does during the build.

That sound fine, thanks.   Same for ghc-stage2.sh?

My difficulty is that as of today I simply do not know how to invoke my freshly built GHC!

Simon

 

From: Andrey Mokhov <[hidden email]>
Sent: 15 April 2019 12:53
To: Simon Peyton Jones <[hidden email]>
Cc: [hidden email]
Subject: RE: Hadrian

 

Hi Simon,

Apologies it’s taking so long. It’s not obvious how to fix this properly, and as a temporary workaround we could create a top-level wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like Hadrian itself does during the build.

Will this work for you?

Cheers,
Andrey

 

From: Simon Peyton Jones [[hidden email]]
Sent: 15 April 2019 12:28
To: Andrey Mokhov <[hidden email]>
Cc: [hidden email]
Subject: Hadrian

 

Andrey and other Hadrian heros

Just to say that I am 100% stalled on using Hadrian because the in-tree binary uses the wrong library files.  I reported this a few weeks ago, but it still seems unchanged

Simon

 

Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414

simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs

 

T16566.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 "809020190414", got "8064")

  |

1 | module T16566 where

  |        ^^^^^^


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Hadrian

Matthew Pickering
Does the stage2 compiler which is found in `stage1/bin/ghc` not work
for you? I thought the issue was that the stage1 compiler doesn't
work.

Matt

On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs
<[hidden email]> wrote:

>
> as a temporary workaround we could create a top-level wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like Hadrian itself does during the build.
>
> That sound fine, thanks.   Same for ghc-stage2.sh?
>
> My difficulty is that as of today I simply do not know how to invoke my freshly built GHC!
>
> Simon
>
>
>
> From: Andrey Mokhov <[hidden email]>
> Sent: 15 April 2019 12:53
> To: Simon Peyton Jones <[hidden email]>
> Cc: [hidden email]
> Subject: RE: Hadrian
>
>
>
> Hi Simon,
>
> Apologies it’s taking so long. It’s not obvious how to fix this properly, and as a temporary workaround we could create a top-level wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like Hadrian itself does during the build.
>
> Will this work for you?
>
> Cheers,
> Andrey
>
>
>
> From: Simon Peyton Jones [mailto:[hidden email]]
> Sent: 15 April 2019 12:28
> To: Andrey Mokhov <[hidden email]>
> Cc: [hidden email]
> Subject: Hadrian
>
>
>
> Andrey and other Hadrian heros
>
> Just to say that I am 100% stalled on using Hadrian because the in-tree binary uses the wrong library files.  I reported this a few weeks ago, but it still seems unchanged
>
> Simon
>
>
>
> Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version
>
> The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414
>
> simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs
>
>
>
> T16566.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 "809020190414", got "8064")
>
>   |
>
> 1 | module T16566 where
>
>   |        ^^^^^^
>
> _______________________________________________
> ghc-devs mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list
Ah.  I hadn't even tried the stage2 compiler (in the stage1/ directory).  Yes, that works.  But perhaps a script to get to it would be helpful, otherwise invoking stage1 will look entirely different to invoking stage2.  Not a bid deal, I grant you!

S

|  -----Original Message-----
|  From: Matthew Pickering <[hidden email]>
|  Sent: 15 April 2019 13:40
|  To: Simon Peyton Jones <[hidden email]>
|  Cc: Andrey Mokhov <[hidden email]>; [hidden email]
|  Subject: Re: Hadrian
|  
|  Does the stage2 compiler which is found in `stage1/bin/ghc` not work for
|  you? I thought the issue was that the stage1 compiler doesn't work.
|  
|  Matt
|  
|  On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs <ghc-
|  [hidden email]> wrote:
|  >
|  > as a temporary workaround we could create a top-level wrapper script,
|  say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments,
|  just like Hadrian itself does during the build.
|  >
|  > That sound fine, thanks.   Same for ghc-stage2.sh?
|  >
|  > My difficulty is that as of today I simply do not know how to invoke my
|  freshly built GHC!
|  >
|  > Simon
|  >
|  >
|  >
|  > From: Andrey Mokhov <[hidden email]>
|  > Sent: 15 April 2019 12:53
|  > To: Simon Peyton Jones <[hidden email]>
|  > Cc: [hidden email]
|  > Subject: RE: Hadrian
|  >
|  >
|  >
|  > Hi Simon,
|  >
|  > Apologies it’s taking so long. It’s not obvious how to fix this
|  properly, and as a temporary workaround we could create a top-level
|  wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the
|  right arguments, just like Hadrian itself does during the build.
|  >
|  > Will this work for you?
|  >
|  > Cheers,
|  > Andrey
|  >
|  >
|  >
|  > From: Simon Peyton Jones [mailto:[hidden email]]
|  > Sent: 15 April 2019 12:28
|  > To: Andrey Mokhov <[hidden email]>
|  > Cc: [hidden email]
|  > Subject: Hadrian
|  >
|  >
|  >
|  > Andrey and other Hadrian heros
|  >
|  > Just to say that I am 100% stalled on using Hadrian because the
|  > in-tree binary uses the wrong library files.  I reported this a few
|  > weeks ago, but it still seems unchanged
|  >
|  > Simon
|  >
|  >
|  >
|  > Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version
|  >
|  > The Glorious Glasgow Haskell Compilation System, version
|  > 8.9.0.20190414
|  >
|  > simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c
|  > T16566.hs
|  >
|  >
|  >
|  > T16566.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 "809020190414", got
|  > "8064")
|  >
|  >   |
|  >
|  > 1 | module T16566 where
|  >
|  >   |        ^^^^^^
|  >
|  > _______________________________________________
|  > ghc-devs mailing list
|  > [hidden email]
|  > https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.
|  > haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&amp;data=02%7C01
|  > %7Csimonpj%40microsoft.com%7Cdf9439b6d848493aca9608d6c19f79f6%7C72f988
|  > bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909288021992421&amp;sdata=ddsV
|  > pnCFLP4D7dGqPtuMdv3oahBrOvRWVDlOV2GSwBU%3D&amp;reserved=0
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list
sounds good to me!

|  -----Original Message-----
|  From: Moritz Angermann <[hidden email]>
|  Sent: 15 April 2019 14:29
|  To: Simon Peyton Jones <[hidden email]>
|  Cc: Matthew Pickering <[hidden email]>; Andrey Mokhov
|  <[hidden email]>; [hidden email]
|  Subject: Re: Hadrian
|  
|  I guess we could add
|  
|  $root/ghc-stage1 (shell script)
|  $root/ghc-stage2 (shell script)
|  
|  As long as we understand that those are just convenience scripts.
|  
|  Why $root? Because we can have multiple build directories for different
|  configurations. Thus putting the scripts into the ghc folder would not
|  know which root you wanted. This for the default root this would be:
|  
|  _build/ghc-stage1
|  _build/ghc-stage2
|  
|  Does that sound like an intermittent solution?
|  
|  Cheers,
|    Moritz
|  
|  Sent from my iPhone
|  
|  > On 15 Apr 2019, at 8:47 AM, Simon Peyton Jones via ghc-devs <ghc-
|  [hidden email]> wrote:
|  >
|  > Ah.  I hadn't even tried the stage2 compiler (in the stage1/ directory).
|  Yes, that works.  But perhaps a script to get to it would be helpful,
|  otherwise invoking stage1 will look entirely different to invoking stage2.
|  Not a bid deal, I grant you!
|  >
|  > S
|  >
|  > |  -----Original Message-----
|  > |  From: Matthew Pickering <[hidden email]>
|  > |  Sent: 15 April 2019 13:40
|  > |  To: Simon Peyton Jones <[hidden email]>
|  > |  Cc: Andrey Mokhov <[hidden email]>;
|  > | [hidden email]
|  > |  Subject: Re: Hadrian
|  > |
|  > |  Does the stage2 compiler which is found in `stage1/bin/ghc` not
|  > | work for  you? I thought the issue was that the stage1 compiler
|  doesn't work.
|  > |
|  > |  Matt
|  > |
|  > |  On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs
|  > | <ghc-  [hidden email]> wrote:
|  > |  >
|  > |  > as a temporary workaround we could create a top-level wrapper
|  > | script,  say `ghc-stage1.sh` that will call Stage1 GHC with the
|  > | right arguments,  just like Hadrian itself does during the build.
|  > |  >
|  > |  > That sound fine, thanks.   Same for ghc-stage2.sh?
|  > |  >
|  > |  > My difficulty is that as of today I simply do not know how to
|  > | invoke my  freshly built GHC!
|  > |  >
|  > |  > Simon
|  > |  >
|  > |  >
|  > |  >
|  > |  > From: Andrey Mokhov <[hidden email]>  > Sent: 15
|  > | April 2019 12:53  > To: Simon Peyton Jones <[hidden email]>
|  > | > Cc: [hidden email]  > Subject: RE: Hadrian  >  >  >  > Hi
|  > | Simon,  >  > Apologies it’s taking so long. It’s not obvious how to
|  > | fix this  properly, and as a temporary workaround we could create a
|  > | top-level  wrapper script, say `ghc-stage1.sh` that will call Stage1
|  > | GHC with the  right arguments, just like Hadrian itself does during
|  > | the build.
|  > |  >
|  > |  > Will this work for you?
|  > |  >
|  > |  > Cheers,
|  > |  > Andrey
|  > |  >
|  > |  >
|  > |  >
|  > |  > From: Simon Peyton Jones [mailto:[hidden email]]  > Sent:
|  > | 15 April 2019 12:28  > To: Andrey Mokhov
|  > | <[hidden email]>  > Cc: [hidden email]  >
|  > | Subject: Hadrian  >  >  >  > Andrey and other Hadrian heros  >  >
|  > | Just to say that I am 100% stalled on using Hadrian because the  >
|  > | in-tree binary uses the wrong library files.  I reported this a few
|  > | > weeks ago, but it still seems unchanged  >  > Simon  >  >  >  >
|  > | Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version  >  > The Glorious
|  > | Glasgow Haskell Compilation System, version  > 8.9.0.20190414  >  >
|  > | simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c  >
|  > | T16566.hs  >  >  >  > T16566.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 "809020190414",
|  got
|  > |  > "8064")
|  > |  >
|  > |  >   |
|  > |  >
|  > |  > 1 | module T16566 where
|  > |  >
|  > |  >   |        ^^^^^^
|  > |  >
|  > |  > _______________________________________________
|  > |  > ghc-devs mailing list
|  > |  > [hidden email]
|  > |  >
|  https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.
|  > |  >
|  > | haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&amp;data=02%7C
|  > | 01  >
|  > | %7Csimonpj%40microsoft.com%7Cdf9439b6d848493aca9608d6c19f79f6%7C72f9
|  > | 88  >
|  > | bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909288021992421&amp;sdata=dd
|  > | sV  > pnCFLP4D7dGqPtuMdv3oahBrOvRWVDlOV2GSwBU%3D&amp;reserved=0
|  > _______________________________________________
|  > ghc-devs mailing list
|  > [hidden email]
|  > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

Andrey Mokhov
Hi all,

Here is a patch for generating wrapper scripts from Hadrian:

https://gitlab.haskell.org/ghc/ghc/merge_requests/780

While it's being reviewed and merged, you can create script `<build-root>/ghc-stage1` with the following line yourself:

"_build/stage0/bin/ghc.exe" "-package-db _build/stage1/lib/package.conf.d" "$@"

It works for me, e.g. I can do

================
$ _build/ghc-stage1 helloWorld.hs
[1 of 1] Compiling Main             ( helloWorld.hs, helloWorld.o )
Linking helloWorld.exe ...
$ ./helloWorld.exe
Hello World
================

Cheers,
Andrey

-----Original Message-----
From: Simon Peyton Jones [mailto:[hidden email]]
Sent: 15 April 2019 14:37
To: Moritz Angermann <[hidden email]>
Cc: Matthew Pickering <[hidden email]>; Andrey Mokhov <[hidden email]>; [hidden email]
Subject: RE: Hadrian

sounds good to me!

|  -----Original Message-----
|  From: Moritz Angermann <[hidden email]>
|  Sent: 15 April 2019 14:29
|  To: Simon Peyton Jones <[hidden email]>
|  Cc: Matthew Pickering <[hidden email]>; Andrey Mokhov
|  <[hidden email]>; [hidden email]
|  Subject: Re: Hadrian
|  
|  I guess we could add
|  
|  $root/ghc-stage1 (shell script)
|  $root/ghc-stage2 (shell script)
|  
|  As long as we understand that those are just convenience scripts.
|  
|  Why $root? Because we can have multiple build directories for different
|  configurations. Thus putting the scripts into the ghc folder would not
|  know which root you wanted. This for the default root this would be:
|  
|  _build/ghc-stage1
|  _build/ghc-stage2
|  
|  Does that sound like an intermittent solution?
|  
|  Cheers,
|    Moritz
|  
|  Sent from my iPhone
|  
|  > On 15 Apr 2019, at 8:47 AM, Simon Peyton Jones via ghc-devs <ghc-
|  [hidden email]> wrote:
|  >
|  > Ah.  I hadn't even tried the stage2 compiler (in the stage1/ directory).
|  Yes, that works.  But perhaps a script to get to it would be helpful,
|  otherwise invoking stage1 will look entirely different to invoking stage2.
|  Not a bid deal, I grant you!
|  >
|  > S
|  >
|  > |  -----Original Message-----
|  > |  From: Matthew Pickering <[hidden email]>
|  > |  Sent: 15 April 2019 13:40
|  > |  To: Simon Peyton Jones <[hidden email]>
|  > |  Cc: Andrey Mokhov <[hidden email]>;
|  > | [hidden email]
|  > |  Subject: Re: Hadrian
|  > |
|  > |  Does the stage2 compiler which is found in `stage1/bin/ghc` not
|  > | work for  you? I thought the issue was that the stage1 compiler
|  doesn't work.
|  > |
|  > |  Matt
|  > |
|  > |  On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs
|  > | <ghc-  [hidden email]> wrote:
|  > |  >
|  > |  > as a temporary workaround we could create a top-level wrapper
|  > | script,  say `ghc-stage1.sh` that will call Stage1 GHC with the
|  > | right arguments,  just like Hadrian itself does during the build.
|  > |  >
|  > |  > That sound fine, thanks.   Same for ghc-stage2.sh?
|  > |  >
|  > |  > My difficulty is that as of today I simply do not know how to
|  > | invoke my  freshly built GHC!
|  > |  >
|  > |  > Simon
|  > |  >
|  > |  >
|  > |  >
|  > |  > From: Andrey Mokhov <[hidden email]>  > Sent: 15
|  > | April 2019 12:53  > To: Simon Peyton Jones <[hidden email]>
|  > | > Cc: [hidden email]  > Subject: RE: Hadrian  >  >  >  > Hi
|  > | Simon,  >  > Apologies it’s taking so long. It’s not obvious how to
|  > | fix this  properly, and as a temporary workaround we could create a
|  > | top-level  wrapper script, say `ghc-stage1.sh` that will call Stage1
|  > | GHC with the  right arguments, just like Hadrian itself does during
|  > | the build.
|  > |  >
|  > |  > Will this work for you?
|  > |  >
|  > |  > Cheers,
|  > |  > Andrey
|  > |  >
|  > |  >
|  > |  >
|  > |  > From: Simon Peyton Jones [mailto:[hidden email]]  > Sent:
|  > | 15 April 2019 12:28  > To: Andrey Mokhov
|  > | <[hidden email]>  > Cc: [hidden email]  >
|  > | Subject: Hadrian  >  >  >  > Andrey and other Hadrian heros  >  >
|  > | Just to say that I am 100% stalled on using Hadrian because the  >
|  > | in-tree binary uses the wrong library files.  I reported this a few
|  > | > weeks ago, but it still seems unchanged  >  > Simon  >  >  >  >
|  > | Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version  >  > The Glorious
|  > | Glasgow Haskell Compilation System, version  > 8.9.0.20190414  >  >
|  > | simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c  >
|  > | T16566.hs  >  >  >  > T16566.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 "809020190414",
|  got
|  > |  > "8064")
|  > |  >
|  > |  >   |
|  > |  >
|  > |  > 1 | module T16566 where
|  > |  >
|  > |  >   |        ^^^^^^
|  > |  >
|  > |  > _______________________________________________
|  > |  > ghc-devs mailing list
|  > |  > [hidden email]
|  > |  >
|  https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.
|  > |  >
|  > | haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&amp;data=02%7C
|  > | 01  >
|  > | %7Csimonpj%40microsoft.com%7Cdf9439b6d848493aca9608d6c19f79f6%7C72f9
|  > | 88  >
|  > | bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909288021992421&amp;sdata=dd
|  > | sV  > pnCFLP4D7dGqPtuMdv3oahBrOvRWVDlOV2GSwBU%3D&amp;reserved=0
|  > _______________________________________________
|  > ghc-devs mailing list
|  > [hidden email]
|  > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs