Weird symbol prevents GHCi from loading my package.

Axel Simon
Wed, 13 Feb 2002 20:41:15 +0000 (GMT)


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
/ /_\\/ __  / /___| |
\____/\/ /_/\____/|_|      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
whilst processing object file
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,

P.S.: Output from

~/source/mogul/fpDemo:$ ghc-pkg -s gtk2
   {name = "gtk2",
    import_dirs = ["/home/as49/local/lib/gtk2hs/hi"],
    source_dirs = [],
    library_dirs =
    hs_libraries = ["gtk2hs"],
    extra_libraries =
    include_dirs =
    c_includes =
    package_deps = ["lang"],
    extra_ghc_opts = ["-fglasgow-exts"],
    extra_cc_opts = [],
    extra_ld_opts = ["-u TreeSelection_dwzw", "-u TreeSelection_dwzx"]}