Weird symbol prevents GHCi from loading my package.
Axel Simon
A.Simon@ukc.ac.uk
Wed, 13 Feb 2002 20:41:15 +0000 (GMT)
Hi,
I built quite a big library and turned it into a package. It works fine if
use ghc -package gtk2 Blah.hs to compile things. But when I convert all
the libraries to object files as described in the documentation, GHCi
refuses to load the whole machinery:
~/source/mogul/fpDemo:$ ghci -package gtk2 Arabic.hs
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 5.02.2, for Haskell
98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package std ... linking ... done.
Loading package lang ... linking ... done.
Loading package gtk2 ...
GHCi runtime linker: fatal error: I found a duplicate definition for
symbol
gcc2_compiled.
whilst processing object file
/home/as49/local/lib/gtk2hs/gtk2hs.o
This could be caused by:
* Loading two different object files which export the same symbol
* Specifying the same object file twice on the GHCi command line
* An incorrect `package.conf' entry, causing some object to be
loaded twice.
GHCi cannot safely continue in this situation. Exiting now. Sorry.
The symbol obviously has nothing to do with GHCi, but I don't have a clue
how it got there and it probably does not matter as long as I don't use
GHCi. Does anybody know where it comes from? My library consists of a huge
bunch of modules, most of them having C calls and callbacks.
Thanks for hints,
Axel.
P.S.: Output from
~/source/mogul/fpDemo:$ ghc-pkg -s gtk2
Package
{name = "gtk2",
import_dirs = ["/home/as49/local/lib/gtk2hs/hi"],
source_dirs = [],
library_dirs =
["/home/as49/local/lib",
"/home/as49/local/lib/gtk2hs",
"/usr/X11R6/lib",
"/usr/local/lib"],
hs_libraries = ["gtk2hs"],
extra_libraries =
["X11",
"Xext",
"atk",
"gdk-x11-1.3",
"gdk_pixbuf-1.3",
"glib-1.3",
"gmodule-1.3",
"gobject-1.3",
"gtk-x11-1.3",
"iconv",
"intl",
"m",
"pango",
"pangox"],
include_dirs =
["/home/as49/local/include/atk-1.0",
"/home/as49/local/include/glib-2.0",
"/home/as49/local/include/gtk-2.0",
"/home/as49/local/include/pango-1.0",
"/home/as49/local/lib/glib-2.0/include",
"/home/as49/local/lib/gtk-2.0/include",
"/home/as49/local/lib/gtk2hs/hi",
"/usr/X11R6/include"],
c_includes =
["Container_stub.h",
"General_stub.h",
"Signal_stub.h",
"TreeSelection_stub.h",
"gtk/gtk.h"],
package_deps = ["lang"],
extra_ghc_opts = ["-fglasgow-exts"],
extra_cc_opts = [],
extra_ld_opts = ["-u TreeSelection_dwzw", "-u TreeSelection_dwzx"]}