Opened 14 years ago

Closed 14 years ago

Last modified 48 years ago

#165 closed bug (Fixed)

hsc2hs fails to link intermediate program

Reported by: as49 Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: 6.0
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


On Mac OS X 10.2.6 and the binary package of ghc 6.00 I 
get the following linker error when running hsc2hs on a 
trivial program:

ld: Undefined symbols:

It seems that hsc2hs uses ghc now by default to compile the 
C program. That doesn't seem to be the problem, though, 
since it worked with ghc 5.04.


Change History (2)

comment:1 Changed 14 years ago by as49

Logged In: YES 

I coud reproduce this bug on Solaris. In libHSrts the
mentioned symbol is referenced but unless a Haskell main
function is anywhere it will stay undefined. The gnu linker
seems to be less strict about non-existent symbols defined
on the command line, the Solaris and Apple linker don't like
it, though. The right fix for hsc2hs is to pass -no-hs-main
to ghc when it is linking.
Could this be added to hsc2hs in the next release?


comment:2 Changed 14 years ago by simonmar

Status: assignedclosed
Logged In: YES 

Caused by a bogus -u flag passed to the linker by GHC.  Will 
be fixed in 6.0.1.
Note: See TracTickets for help on using tickets.