Opened 11 years ago

Closed 11 years ago

Last modified 44 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: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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:
_Main_zdmain_closure

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.

Axel.


Change History (2)

comment:1 Changed 11 years ago by as49

Logged In: YES 
user_id=489164

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?

Thanks,
Axel.

comment:2 Changed 11 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 
user_id=48280

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.