<div dir="ltr"><div>Thank you all for the feedback, I went with Harendra's solution and that worked fine (and removed any shell wrapping I had to do).<br><br></div>To answer Phyx, using stack has become more convenient for managing ghc than using the packages my distro offers (which always falls behind the latest version of GHC by a couple of months), or the alternative of just downloading binaries and managing that process manually. There might also be a misunderstanding given your first post, because I only use stack to provide those ghc (ghc-pkg, alex, happy) binaries, and I'm not managing the ghc source as a stack package; and what that means is that I don't have to run `stack exec --` to interact with build artifacts.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 8:05 PM, Alan & Kim Zimmerman <span dir="ltr"><<a href="mailto:alan.zimm@gmail.com" target="_blank">alan.zimm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>FWIW, I use the docker image, as per <a href="https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux#Docker" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/wiki/Building/Preparation/<wbr>Linux#Docker</a>, where I have the invocation in a one-line script<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Alan<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 26 January 2017 at 19:38, Phyx <span dir="ltr"><<a href="mailto:lonetiger@gmail.com" target="_blank">lonetiger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">But do you really want to do this? </p>
<p dir="ltr">It seems to me you don't want to keep using your stage0 while working on ghc. As you don't want to break it and spend hours wondering why your build failed.</p>
<p dir="ltr">Fair enough, if people want to do this. So long as it's not the defacto method.</p><div class="m_-7795736889991548150HOEnZb"><div class="m_-7795736889991548150h5">
<br><div class="gmail_quote"><div dir="ltr">On Thu, 26 Jan 2017, 17:28 Matthew Pickering, <<a href="mailto:matthewtpickering@gmail.com" target="_blank">matthewtpickering@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the intention is that if you are already using stack to manage<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
your GHC installations then it is desirable to use their managed<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
version of GHC rather than have to install another version.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
It seems to me that the solution that Harendra suggests is the easiest<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
for anyone with this setup.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
Fwiw, the easiest way I found to setup a clean development environment<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
for GHC was to use the nix ghcHEAD derviation.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
   nix-shell '<nixpkgs>' -A haskell.compiler.ghcHEAD<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
but of course, this only works if you are using nix!<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
Matt<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
On Thu, Jan 26, 2017 at 5:18 PM, Phyx <<a href="mailto:lonetiger@gmail.com" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">lonetiger@gmail.com</a>> wrote:<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> Can I ask a silly question. I can't seem to find where stack is recommended<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> for ghc development on the newcomers page, but why is it? I don't want to<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> start another flame war but I can't imagine any scenario where this is<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> useful. As far as I understand the whole benefit of stack is the curated<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> packages.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> Which are moot here since almost everything you need is in the tree aside<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> from Happy and Alex. Seems to me this is just overcomplicating a very simple<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> process.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> Not to mention if you have to go through stack - - exec etc all for<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> interactions with the build artifacts it would get old quickly. Also it<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> doesn't seem reliable especially if stack is modifying the environment and<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> or flags passed to the compiler.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> Let me reiterate, I have nothing against stack, I just don't see the<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> benefits here. Ideally you'd want your environment as simple and vanilla as<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> possible and *totally* in your control IMHO.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> What am I missing here?<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> Thanks,<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> Tamar<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> On Thu, 26 Jan 2017, 14:21 Harendra Kumar, <<a href="mailto:harendra.kumar@gmail.com" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">harendra.kumar@gmail.com</a>> wrote:<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> I use "export PATH=`stack path --bin-path`" to make the stack installed<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> ghc available in the PATH before building ghc. And that's all.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> Setting the PATH works better because we do not get any extra env<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> variables set by stack in the environment and we do not go through the stack<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> wrapper, so it may be a little bit faster as well. The GHC_PACKAGE_PATH<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> variable set by the stack command is especially troublesome in some cases.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> You can try "stack exec env" to check all vars that stack puts in your<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> environment.<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> -harendra<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> On 26 January 2017 at 15:52, Marius Ghita <<a href="mailto:mhitza@gmail.com" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">mhitza@gmail.com</a>> wrote:<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> Following is a list of steps that I ran and their output linked:<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>>  - clone repo<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="https://gist.github.com/mhitza/f5d4516b6c8386fe8e064f95b5ad620b" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/f5d4516b6c8386fe8e064f95b5ad6<wbr>20b</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>>  - <a href="http://build.mk" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">build.mk</a> configuration<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="https://gist.github.com/mhitza/2d979c64a646bdd3e097f65fd650c675" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/2d979c64a646bdd3e097f65fd650c<wbr>675</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>>  - boot <a href="https://gist.github.com/mhitza/e23df8b9ed2aac5b1b8881c70165bf3f" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/e23df8b9ed2aac5b1b8881c70165b<wbr>f3f</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>>  - configure<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="https://gist.github.com/mhitza/88c09179be3bb82024192bf6181aef13" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/88c09179be3bb82024192bf6181ae<wbr>f13</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>>  - make FAILS<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="https://gist.github.com/mhitza/95738bf49c8c87ce46c9319b4c266a2c" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/95738bf49c8c87ce46c9319b4c266<wbr>a2c</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> I'm using a 'stack-ghc' executable, that's only a shell wrapper to run<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> ghc from stack (since I don't have a globally installed ghc) (source<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="https://gist.github.com/mhitza/38fe96fb440daab28e57a50de47863d5" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/38fe96fb440daab28e57a50de4786<wbr>3d5</a> ), and I<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> also have 'ghc-pkg' wrapped in the same way with<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> a stack-ghc-pkg script (source<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="https://gist.github.com/mhitza/6c2b1978ef802707161041abe1d2699e" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://gist.github.com/mhitza<wbr>/6c2b1978ef802707161041abe1d26<wbr>99e</a> )<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> --<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> Google+: <a href="https://plus.google.com/111881868112036203454" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">https://plus.google.com/111881<wbr>868112036203454</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> ______________________________<wbr>_________________<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> ghc-devs mailing list<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="mailto:ghc-devs@haskell.org" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">ghc-devs@haskell.org</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/ghc-devs</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> ______________________________<wbr>_________________<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> ghc-devs mailing list<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> <a href="mailto:ghc-devs@haskell.org" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">ghc-devs@haskell.org</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/ghc-devs</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> ______________________________<wbr>_________________<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> ghc-devs mailing list<br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> <a href="mailto:ghc-devs@haskell.org" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">ghc-devs@haskell.org</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" class="m_-7795736889991548150m_-1590988186611151548gmail_msg" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/ghc-devs</a><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
><br class="m_-7795736889991548150m_-1590988186611151548gmail_msg">
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Google+: <a href="https://plus.google.com/111881868112036203454" target="_blank">https://plus.google.com/111881868112036203454</a><br></div>
</div>