Missing Data.Map library? GHC 6.8.2 under OS X

Jeremy Shaw jeremy at n-heptane.com
Mon Jun 9 16:21:09 EDT 2008

At Mon, 9 Jun 2008 15:42:40 -0400,
Thomas Krauss wrote:
> I seem to be having trouble using GHC 6.8.2 and OS X (10.5).  It seems
> that any use of anything from Data.Map results in a link error like
> Undefined symbols:
>   "___stginit_containerszm0zi1zi0zi1_DataziMap_", referenced from:
>       ___stginit_Main_ in tst_parse.o
> ld: symbol(s) not found

In my experience, you will get this error if you have some libraries
which were built against an older version of Data.Map and then you
upgraded to the new Data.Map without rebuilding those libraries. Or,
if you just have some .o/.hi files in your local directory that were
built against the old Data.Map.

Have you tried creating a very simple new project like:

> module Main where
> import Data.Map
> main = print (empty :: Map Int Int)

$ ghc --make Main.hs -o test

If that fails, then the problem is likely with your GHC 6 installation
itself, not some stale third party library.

Have you previously installed GHC 6 on this machine? If so, perhaps
the old version was not completely removed and the compiler is getting
mixed up.

Alternatively, perhaps the new version requires you to install some
extra package to get all the libraries, instead of just the core
libraries ? Looking at the binary distribution page, that does not
appear to be the case.


More information about the Glasgow-haskell-users mailing list