[GHC] #5950: Linking standard library fails

GHC cvs-ghc at haskell.org
Sun Mar 18 15:54:13 CET 2012


#5950: Linking standard library fails
---------------------------------------+------------------------------------
 Reporter:  volker-wysk                |          Owner:                  
     Type:  bug                        |         Status:  new             
 Priority:  normal                     |      Component:  Compiler        
  Version:  7.0.4                      |       Keywords:  link            
       Os:  Linux                      |   Architecture:  Unknown/Multiple
  Failure:  GHC rejects valid program  |       Testcase:                  
Blockedby:                             |       Blocking:                  
  Related:                             |  
---------------------------------------+------------------------------------
 This simple program fails to link:

 import System

 main = putStrLn "Hallo, Welt"


 This is the compiler output:

 $ ghc -c test.hs

 $ ghc -o test test.o

 test.o: In function `sds_info':
 (.text+0x1e7): undefined reference to
 `__stginit_haskell98zm1zi1zi0zi1_System_'

 collect2: ld returned 1 exit status


 When you compile test.hs directly to test (without the step test.o), then
 it works:

 $ ghc -o test test.hs

 Linking test ...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5950>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list