[Haskell-cafe] Linker errors when using the Hipmunk library

Ulrik Rasmussen haskell at utr.dk
Tue Nov 2 17:39:11 EDT 2010


I have installed the Hipmunk physics library ( using
cabal-install, but whenever I try to compile a program that uses it
(e.g. the HipmunkPlayground package), I get the following linker error:

> $ cabal install hipmunkplayground
> Resolving dependencies...
> Configuring HipmunkPlayground-5.2.0...
> Preprocessing executables for HipmunkPlayground-5.2.0...
> Building HipmunkPlayground-5.2.0...
> [1 of 1] Compiling Main             ( Playground.hs, dist/build/HipmunkPlayground/HipmunkPlayground-tmp/Main.o )
> Linking dist/build/HipmunkPlayground/HipmunkPlayground ...
> /home/ulrik/.cabal/lib/Hipmunk- In function `sr0l_info':
> (.text+0x1062): undefined reference to `cpArbiterIsFirstContact'
> /home/ulrik/.cabal/lib/Hipmunk- In function `srBn_info':
> (.text+0x37f8): undefined reference to `cpArbiterGetShapes'
> collect2: ld returned 1 exit status
> cabal: Error: some packages failed to install:
> HipmunkPlayground-5.2.0 failed during the building phase. The exception was:
> ExitFailure 1

The problem does not seem to be with HipmunkPlayground, since loading
Hipmunk in ghci and evaluating `initChipmunk' also generates an error:

> Prelude> import Physics.Hipmunk
> Prelude Physics.Hipmunk> initChipmunk
> Loading package StateVar- ... linking ... done.
> Loading package array- ... linking ... done.
> Loading package containers- ... linking ... done.
> Loading package transformers- ... linking ... done.
> Loading package Hipmunk- ... linking ... <interactive>: /home/ulrik/.cabal/lib/Hipmunk- unknown symbol `cpArbiterIsFirstContact'
> ghc: unable to load package `Hipmunk-'

Does anyone have a clue as to what might be wrong? I am using Ubuntu
10.10, gcc 4.4.5 and ghc 6.12.3.

Thanks :)

/Ulrik Rasmussen

More information about the Haskell-Cafe mailing list