can't load .so/.DLL - undefined symbol

Henning Thielemann lemming at henning-thielemann.de
Tue Mar 11 22:11:25 UTC 2014


I am trying to understand the following linker message. I have started 
GHCi, loaded a program and try to run it:

Main> main
...
Loading package poll-0.0 ... linking ... done.
Loading package alsa-seq-0.6.0.3 ... can't load .so/.DLL for: 
/var/cabal/lib/x86_64-linux-ghc-7.8.0.20140228/alsa-seq-0.6.0.3/libHSalsa-seq-0.6.0.3-ghc7.8.0.20140228.so 
(/var/cabal/lib/x86_64-linux-ghc-7.8.0.20140228/alsa-seq-0.6.0.3/libHSalsa-seq-0.6.0.3-ghc7.8.0.20140228.so: 
undefined symbol: 
alsazmseqzm0zi6zi0zi3_SystemziPosixziPoll_zdfStorableFd_closure)


I assume that GHCi wants to say the following: The instance Storable Fd 
defined in module System.Posix.Poll cannot be found in the shared object 
file of the alsa-seq package. That's certainly true because that module 
is in the package 'poll' and not in 'alsa-seq'. But 'alsa-seq' imports 
'poll'. What might be the problem?

It's a rather big example that fails here, whereas the small examples in 
alsa-seq package work. Thus I first like to know what the message really 
means, before investigating further. I installed many packages at once 
with cabal-install using a single build directory, like:

$ cabal install --builddir=/tmp/dist --with-ghc=ghc7.8.0.20140228 poll 
alsa-seq pkg1 pkg2 pkg3 ...

? Can this cause problems?


More information about the Glasgow-haskell-users mailing list