[Haskell-cafe] Dread __DISCARD__

Steven Elkins sgelkins at gmail.com
Fri Sep 16 21:33:43 EDT 2005


Hello everyone,

I'm a Haskell newbie trying out various programs from the web.  I'm
trying to compile one called bjpop-ray (from Bernie Pope, I think) and
I hit this at link-time:

ghc --make -O0 -package wx Main.hs -o bjpop-ray
Chasing modules from: Main.hs
Skipping  Data             ( ./Data.hs, ./Data.o )
Skipping  Sphere           ( ./Sphere.hs, ./Sphere.o )
Skipping  Parser           ( ./Parser.hs, ./Parser.o )
Skipping  Vector           ( ./Vector.hs, ./Vector.o )
Skipping  Polygon          ( ./Polygon.hs, ./Polygon.o )
Skipping  RayTrace         ( ./RayTrace.hs, ./RayTrace.o )
Skipping  Main             ( Main.hs, Main.o )
Linking ...
/usr/bin/ld: Undefined symbols:
___DISCARD__
collect2: ld returned 1 exit status

I'm on Mac OS 10.4.2, using ghc 6.4 (from the haskell.org .dmg) and
gcc 4.0.0.  Other wxHaskell programs (the samples and my own
experiments) compile without tripping over this.

Googling __DISCARD__ led me to "...the binary on the ghc web site has
the evil __DISCARD__ mangler problem..." on the darwinports bug
mailing list, so I guess I'm not the first person to see this.

Is there a workaround?  Does the Darwin port have the same problem? 
Should I just work on the many other things I've yet to grasp? 
Usually ghc works fine.

Thanks,
Steve


-- 
How wonderful it is that nobody need wait a single moment
before starting to improve the world.       -- Anne Frank
Paradise is exactly where you are
right now...only much, much better.    -- Laurie Anderson


More information about the Haskell-Cafe mailing list