#2083: linker reports missing symbols Main.c:(.text+0x12): undefined reference 
to
`__stginit_ZCMain'
-----------------------------+----------------------------------------------
 Reporter:  Andrew U. Frank  |          Owner:         
     Type:  bug              |         Status:  new    
 Priority:  normal           |      Milestone:         
Component:  Compiler         |        Version:  6.8.2  
 Severity:  normal           |     Resolution:         
 Keywords:                   |     Difficulty:  Unknown
 Testcase:                   |   Architecture:  Unknown
       Os:  Unknown          |  
-----------------------------+----------------------------------------------
Old description:

> i use 6.8.2 on linux (ubuntu 7.10).
> i use mainly eclipse and ghci, but when i try to compile a program, the
> linker reports
> the undefined references.
> for the minimal program 'hello world' i get
> Main.c:(.text+0x12): undefined reference to `__stginit_ZCMain'
> Main.c:(.text+0x2c): undefined reference to `ZCMain_main_closure'
> for more interesting programs i get a lot more (i have experimented with
> wxhaskell and phooey, tv, eros -- and some problems with compiling them
> in the right order etc..)
>
> suprisingly the problem goes away if the program is called Main.hs - then
> it links properly, but not when it is called Test.hs. the same program
> with
> main = putStr....
>
> according to the ghc documentation, it is permitted to have in file
> Test.hs the module main.
> (and it works properly in ghci)

New description:

 i use 6.8.2 on linux (ubuntu 7.10).
 i use mainly eclipse and ghci, but when i try to compile a program, the
 linker reports
 the undefined references.
 for the minimal program 'hello world' i get
 {{{
 Main.c:(.text+0x12): undefined reference to `__stginit_ZCMain'
 Main.c:(.text+0x2c): undefined reference to `ZCMain_main_closure'
 }}}
 for more interesting programs i get a lot more (i have experimented with
 wxhaskell and phooey, tv, eros -- and some problems with compiling them in
 the right order etc..)

 suprisingly the problem goes away if the program is called Main.hs - then
 it links properly, but not when it is called Test.hs. the same program
 with
 {{{
 main = putStr....
 }}}
 according to the ghc documentation, it is permitted to have in file
 Test.hs the module main.
 (and it works properly in ghci)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2083#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to