<div dir="ltr">Ok, I had success by removing “-debug” in favour of “-DDEBUG”. After compiling GHC I fired GDB and this is the output:<div><br></div><div><div>Starting program: /Users/adinapoli/programming/haskell/ghc/inplace/lib/bin/ghc-stage2 -B/Users/adinapoli/programming/haskell/ghc/inplace/lib --interactive</div><div>GHCi, version 8.3.20170413: <a href="http://www.haskell.org/ghc/">http://www.haskell.org/ghc/</a>  :? for help</div><div>[New Thread 0x120f of process 19786]</div><div>[New Thread 0x1403 of process 19786]</div><div>[New Thread 0x1503 of process 19786]</div><div>[New Thread 0x1603 of process 19786]</div><div><br></div><div>Thread 1 received signal SIGSEGV, Segmentation fault.</div><div>0x0000000104cdd81a in ocInit_MachO () at rts/linker/MachO.c:141</div><div>141         if(NULL != oc->info->nlist) {</div></div><div><br></div><div>Maybe it does ring a bell to any of you. In case not, I’m happy to continue digging.</div><div><br></div><div>A.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 April 2017 at 21:19, Alfredo Di Napoli <span dir="ltr"><<a href="mailto:alfredo.dinapoli@gmail.com" target="_blank">alfredo.dinapoli@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">Hey Ben,<div><br></div><div>yes, it’s consistently reproducible. I have tried compiling GHC from scratch by adding `-dcore-lint` and `-debug` to GhcStage2HcOpts in my mk/<a href="http://build.mk" target="_blank">build.mk</a>, but eventually the build process failed with:</div><div><br></div><div>ld: library not found for -lHSrts_thr_debug_p<br></div><div><br></div><div>Any idea what am I doing wrong? Next I’m going to try enabling `-DDEBUG` only as described here:</div><div><br></div><div><a href="https://ghc.haskell.org/trac/ghc/wiki/Debugging/Compiler" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/wiki/Debugging/Compiler</a><br></div><div><br></div><div>To see if I get any further.</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>A.</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 13 April 2017 at 19:01, Ben Gamari <span dir="ltr"><<a href="mailto:ben@smart-cactus.org" target="_blank">ben@smart-cactus.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com" target="_blank">alfredo.dinapoli@gmail.com</a>> writes:<br>
<br>
> Hey all,<br>
><br>
> I’m trying to compile GHC HEAD (cloning from master) with the `prof` build<br>
> flavour on a Mac OS X 10.11.6 machine and I have noticed that, despite<br>
> ghc-stage2 works as expected, when invoked with —interactive it starts<br>
> before crashing with a segmentation fault:<br>
><br>
> ```<br>
> ☁  compiler [master] ⚡ ../inplace/bin/ghc-stage2 --interactive<br>
> GHCi, version 8.3.20170413: <a href="http://www.haskell.org/ghc/" rel="noreferrer" target="_blank">http://www.haskell.org/ghc/</a>  :? for help<br>
> [1]    79176 segmentation fault  ../inplace/bin/ghc-stage2 --interactive<br>
> ```<br>
><br>
> Did it happen to somebody else or it’s just me? Shall I try throwing gdb at<br>
> it to try and see what’s going on?<br>
<br>
</span>Hmm, interesting. I've not seen crashes like this locally nor in CI. It<br>
would be great if you could try to get some insight. Is this crash<br>
perfectly reproducible?<br>
<br>
It may be worth adding -dcore-lint to GhcStage2HcOpts to ensure the code<br>
we are producing is sane.<br>
<br>
Cheers,<br>
<br>
- Ben<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>