#6107: GHCi runtime linker cannot link with duplicate common symbols
--------------------------+-------------------------------------------------
Reporter: exFalso | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.1 | Keywords:
Os: Linux | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
--------------------------+-------------------------------------------------
Comment(by exFalso):
meanwhile, to anyone experiencing this problem, there is a quick hack to
get around the runtime linker: define an object file with dummy symbols
that you need:
{{{
#define DUM(SYM) SYM(void){}
DUM(commonSym);
}}}
then compile
{{{
$ gcc -o commonSymDummy.o commonSymDummy.c -c
$ nm commonSymDummy.o
0000000000000000 T commonSym
$ ghc DoesntWork.hs commonSymDummy.o
(...)
$ ghc Main.hs DoesntWork.o commonSym.o commonSym2.o
(...)
}}}
note, that the dummy symbols won't actually be used, they just need to be
there for the runtime linker
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6107#comment:1>
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