[Haskell-cafe] How can I get rid of this link error?

Amy de Buitléir amy at nualeargais.ie
Fri Nov 11 13:06:42 CET 2011

I wrote a library called AmysGeometry. The only modules in it (so far) are:


The library compiles just fine, and I've been using it with other programs for a
while. Then yesterday, I started getting the following error.

Linking dist/build/add-centroids/add-centroids ...
In function `s3c6_info':
(.text+0x4557): undefined reference to 
undefined reference to `AmysGeometryzm1zi0_AmyziGeometry_DZCLocation_static_info'
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:

I think this started because I recompiled some stuff with profiling. So I wiped
out my current GHC and Haskell installation, re-installed it, and rebuilt
AmysGeometry. But I'm still getting this error when I try to link with it. I
would be grateful for any advice on how to diagnose this and fix it.

Oh, and "ghc-pkg check" doesn't report any errors.

More information about the Haskell-Cafe mailing list