Link failures using GHC 6.8.2 on OS X 10.1.11 (PPC)

This morning I downloaded and installed ghc-6.8.2-powerpc-apple-darwin.tar.bz2. I'm now getting link errors when I use ghc. For example, the simple program import qualified Data.IntSet as IntSet main = print $ IntSet.empty gives the errors: /usr/bin/ld: Undefined symbols: ___stginit_containerszm0zi1zi0zi1_DataziIntSet_ _containerszm0zi1zi0zi1_DataziIntSet_empty_closure _containerszm0zi1zi0zi1_DataziIntSet_zdf3_closure These symbols are defined in /usr/local/lib/ghc-6.8.2/lib/containers-0.1.0.1/libHScontainers-0.1.0.1.a, so apparently the linker is not finding this library. The same program does work in ghci, and in ghc-6.6 (which I was using previously). I've searched the list archives, and I haven't found any mention of this problem. Any help would be much appreciated! Robin

If you're building something that has leftover *.o and *.hi files from a
previous version of ghc, that might cause the problem. Try to rm *.o *.hi
? This seemed to work for me one time.
- Phil
On Jan 23, 2008 8:38 AM, Robin Houston
This morning I downloaded and installed ghc-6.8.2-powerpc-apple-darwin.tar.bz2. I'm now getting link errors when I use ghc. For example, the simple program
import qualified Data.IntSet as IntSet main = print $ IntSet.empty
gives the errors:
/usr/bin/ld: Undefined symbols: ___stginit_containerszm0zi1zi0zi1_DataziIntSet_ _containerszm0zi1zi0zi1_DataziIntSet_empty_closure _containerszm0zi1zi0zi1_DataziIntSet_zdf3_closure
These symbols are defined in /usr/local/lib/ghc-6.8.2/lib/containers-0.1.0.1/libHScontainers-0.1.0.1.a, so apparently the linker is not finding this library.
The same program does work in ghci, and in ghc-6.6 (which I was using previously).
I've searched the list archives, and I haven't found any mention of this problem. Any help would be much appreciated!
Robin _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Hi Robin, On Wed, Jan 23, 2008 at 04:38:25PM +0000, Robin Houston wrote:
import qualified Data.IntSet as IntSet main = print $ IntSet.empty
gives the errors:
/usr/bin/ld: Undefined symbols: ___stginit_containerszm0zi1zi0zi1_DataziIntSet_ _containerszm0zi1zi0zi1_DataziIntSet_empty_closure _containerszm0zi1zi0zi1_DataziIntSet_zdf3_closure
You don't say what commandline you are using, but it sounds like you need to add either --make or -package containers. Thanks Ian

On 23/01/2008, Ian Lynagh
You don't say what commandline you are using, but it sounds like you need to add either --make or -package containers.
Aha, that works! Thanks. It worked without, using ghc-6.6. I guess that's because the containers stuff was moved into a separate library in 6.8.1. Robin
participants (3)
-
Ian Lynagh
-
Philip Weaver
-
Robin Houston