#3042: rts defines "real_main" which can clash with user C code
-----------------------------+----------------------------------------------
Reporter:  duncan            |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Runtime System  
 Version:  6.10.1            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 I was just about to file a bug about `ghc -no-hs-main` not working but it
 turns out it is just because I had a `real_main` C function in my `.c`
 file. This ends up clashing with the C function of the same name from the
 rts package. This means that when linking we pull in the wrong one and the
 rts one needs `__stginit_ZCMain` and `ZCMain_main_closure` which is what
 the linker error message reports (which is rather confusing).

 Suggestion: rename the rts `real_main` to something less likely to clash
 with user code.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3042>
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