Undefined symbol in shared dynamic library?

Captain Freako capn.freako at gmail.com
Sat Sep 10 02:10:39 CEST 2011

Hi all,

I'm trying to build a shared, dynamic library for use with a C program.
I'm getting an `undefined symbol' error, when I try to run that C
and was hoping that the last line in the output, below, might mean
something to someone.
I include the entire output of a `make rebuild' command, below, hoping
that, maybe, I just have my command line options a little wrong.


dbanas at dbanas-eeepc:~/prj/haskell/AMIParse/trunk$ make rebuild
make clean
make[1]: Entering directory `/home/dbanas/prj/haskell/AMIParse/trunk'
rm -f *.hi *.o *.out ami_test *.so
make[1]: Leaving directory `/home/dbanas/prj/haskell/AMIParse/trunk'
make all
make[1]: Entering directory `/home/dbanas/prj/haskell/AMIParse/trunk'
gcc -I/usr/lib/ghc-6.12.3/include/ -g -fPIC   -c -o ami_test.o
gcc -rdynamic -o ami_test ami_test.o -ldl
ghc -c ApplicativeParsec.hs -cpp -package parsec-3.1.1 -package dsp
-dynamic -fPIC
ghc -c AMIParse.hs -cpp -package parsec-3.1.1 -package dsp -dynamic
ghc -c ExmplUsrModel.hs -cpp -package parsec-3.1.1 -package dsp -dynamic
ghc -c AMIModel.hs -cpp -package parsec-3.1.1 -package dsp -dynamic
gcc -I/usr/lib/ghc-6.12.3/include/ -g -fPIC   -c -o ami_model.o
rm -f libami.so
ghc -o libami.so -shared -dynamic -package parsec-3.1.1 -package dsp
AMIParse.o AMIModel.o ami_model.o AMIModel_stub.o ApplicativeParsec.o
make[1]: Leaving directory `/home/dbanas/prj/haskell/AMIParse/trunk'
dbanas at dbanas-eeepc:~/prj/haskell/AMIParse/trunk$ ./ami_test test.ami
undefined symbol: stg_newByteArrayzh

More information about the Glasgow-haskell-users mailing list