#2824: Duplicate symbols generated when Generics flag and syb-with-class
"derive"
used simultaneously
-------------------------------------+--------------------------------------
Reporter: jcheney | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: normal
Keywords: generics, syb-with-class | Testcase:
Os: Linux | Architecture: x86
-------------------------------------+--------------------------------------
Attached file Foo.hs compiles fine using
{{{
ghc -c Foo.hs
}}}
But compiling using the -XGenerics flag yields duplicate symbols errors
from the assembler:
{{{
[EMAIL PROTECTED]:~/src/FreshLib/bug$ ghc -c -v -XGenerics Foo.hs
Glasgow Haskell Compiler, Version 6.10.1, for Haskell 98, stage 2 booted
by GHC version 6.6
Using package config file: /usr/local/lib/ghc-6.10.1/./package.conf
Using package config file:
/home/jcheney/.ghc/i386-linux-6.10.1/package.conf
hiding package base-3.0.3.0 to avoid conflict with later version
base-4.0.0.0
wired-in package ghc-prim mapped to ghc-prim-0.1.0.0
wired-in package integer mapped to integer-0.1.0.0
wired-in package base mapped to base-4.0.0.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0.1.0
wired-in package syb mapped to syb-0.1.0.0
wired-in package template-haskell mapped to template-haskell-2.3.0.0
wired-in package dph-seq mapped to dph-seq-0.3
wired-in package dph-par mapped to dph-par-0.3
Hsc static flags: -static
Created temporary directory: /tmp/ghc15945_0
*** Checking old interface for main:Foo:
*** Parser:
*** Renamer/typechecker:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package array-0.2.0.0 ... linking ... done.
Loading package packedstring-0.1.0.1 ... linking ... done.
Loading package containers-0.2.0.0 ... linking ... done.
Loading package pretty-1.0.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package bytestring-0.9.1.4 ... linking ... done.
Loading package syb-with-class-0.4 ... linking ... done.
*** Desugar:
Result size = 230
*** Simplify:
Result size = 141
Result size = 141
*** Tidy Core:
Result size = 141
writeBinIface: 9 Names
writeBinIface: 42 dict entries
*** CorePrep:
Result size = 187
*** Stg2Stg:
*** CodeGen:
*** CodeOutput:
*** Assembler:
gcc -I. -c /tmp/ghc15945_0/ghc15945_0.s -o Foo.o
/tmp/ghc15945_0/ghc15945_0.s: Assembler messages:
/tmp/ghc15945_0/ghc15945_0.s:224:0:
Error: symbol `Foo_zdgtoFoo_closure' is already defined
/tmp/ghc15945_0/ghc15945_0.s:233:0:
Error: symbol `Foo_zdgtoFoo_info' is already defined
/tmp/ghc15945_0/ghc15945_0.s:273:0:
Error: symbol `Foo_zdgfromFoo_closure' is already defined
/tmp/ghc15945_0/ghc15945_0.s:291:0:
Error: symbol `Foo_zdgfromFoo_info' is already defined
*** Deleting temp files:
Deleting: /tmp/ghc15945_0/ghc15945_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc15945_0
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2824>
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