conflicting global symbols
I was confronted to the following problem when
building a package: it appears that when compiling
modules with the -O flag for optimization, GHC
produces a visible symbol named "_module_registered"
in each object file. When linking modules into a
package, it thus produces an error (duplicate symbol)
when GHCi tries to load the package. Strangely
enough, this error does not occur when using GHC to
compile a program using this package into an
executable. Moreover, the problem occurs only when
compiling through C, and not when using "-fasm"
(though the header files used in compilation via C
explicitly declare the variable "_module_registered"
as static).
My system is the following:
- Linux i386 (Debian)
- GHC 5.02.2
- GCC 2.95.4
Maybe the problem is related to GCC and not to GHC,
after all. I hope this helped anyway...
Trac metadata
Trac field |
Value |
Version |
5.02 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|