<div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to build a small program with profiling using a ghc built from haskell gitlab master branch. When I use -O2 I run into:<br></div><div><br></div><div>$ ghc/inplace/bin/ghc-stage2 --make -O2 -prof -fprof-auto -rtsopts Main.hs<br>Linking Main ...<br>./StreamD.o(.text+0x1b9f2): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'<br>./MArray.o(.text+0xbe83): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'<br>Main.o(.text+0x6fdb): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'<br>collect2: error: ld returned 1 exit status<br>`cc' failed in phase `Linker'. (Exit code: 1)</div><div><br></div>It builds fine without the -O2 option. On ghc-8 it builds fine even with -O2. Is that a bug in the head GHC or just something to do with how I built it?<br><div><div><br></div><div>Thanks,</div><div>Harendra<br></div></div></div>