<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Thanks! I installed 6.8.2 binary and that successfully compiled 6.8.3 source with gcc 4.1.1. (I am still not sure why a direct 6.8.3. binary installation did not work for me, but now I think everything is good). Thanks very much again!<br><br>Di, Yu<br>7.26<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: Simon Marlow &lt;marlowsd@gmail.com&gt;<br>To: Yu Di &lt;diyu60607@yahoo.com&gt;<br>Cc: glasgow-haskell-users@haskell.org<br>Sent: Friday, July 25, 2008 3:52:01 AM<br>Subject: Re: ghc 6.8.3 build error with __DISCARD__ linking problem, please help!<br><br>
Yu Di wrote:<br>&gt; Hi, I am trying to build ghc 6.8.3 from source release, my currently <br>&gt; installed version is ghc 6.4.2 (x86 linux binary release version), and I <br>&gt; got:<br>&gt; <br>&gt; /usr/local/ghc/bin/ghc -o ghc-pkg.bin -H16m -O -cpp -Wall <br>&gt; -fno-warn-name-shadowing -fno-warn-unused-matches -DUSING_COMPAT <br>&gt; -i../../compat -ignore-package Cabal&nbsp; -Rghc-timing&nbsp; -package unix&nbsp; &nbsp; <br>&gt; -L../../compat -lghccompat&nbsp;  Main.o Version.o CRT_noglob.o<br>&gt; Main.o: In function `__stginit_ZCMain':<br>&gt; ghc13533.hc:(.text+0x4): undefined reference to `__DISCARD__'<br>&gt; ghc13533.hc:(.text+0x9): undefined reference to `__DISCARD__'<br>&gt; Main.o: In function `__stginit_Main':<br>&gt; ghc13533.hc:(.text+0x18): undefined reference to `__DISCARD__'<br>&gt; ghc13533.hc:(.text+0x1d): undefined reference to `__DISCARD__'<br>&gt; Main.o: In function `__stginit_Main_':<br>&gt; ghc13533.hc:(.text+0x2c):
 undefined reference to `__DISCARD__'<br>&gt; Main.o:ghc13533.hc:(.text+0x3d): more undefined references to <br>&gt; `__DISCARD__' follow<br>&gt; collect2: ld returned 1 exit status<br>&gt; &lt;&lt;ghc: 13726704 bytes, 3 GCs, 105428/105428 avg/max bytes residency (1 <br>&gt; samples), 15M in use, 0.00 INIT (0.00 elapsed), 0.01 MUT (1.98 elapsed), <br>&gt; 0.01 GC (0.03 elapsed) :ghc&gt;&gt;<br>&gt; <br>&gt; Do you know how I can fix this problem? My ghc and gcc versions are:<br>&gt; <br>&gt; The Glorious Glasgow Haskell Compilation System, version 6.4.2<br>&gt; gcc (GCC) 4.1.1 20060724 (prerelease) (4.1.1-4pclos2007)<br>&gt; <br>&gt; (I also tried ghc 6.2.0 and gcc 3.3.6, but all combinations resulted in <br>&gt; the same error message)<br><br>The error is coming from your installed 6.4.2, and I strongly suspect that <br>it is incompatible with the gcc version you have installed.&nbsp; You could try <br>downgrading gcc, but your best bet is to just
 install a recent GHC binary <br>distribution.<br><br>Cheers,<br>&nbsp;&nbsp;&nbsp; Simon<br></div></div></div><br>

      </body></html>