[Haskell-cafe] Undefined symbol error coming from shared, dynamic library.

Sergiy Nazarenko nazarenko.sergiy at gmail.com
Thu Sep 8 11:36:41 CEST 2011


Hi David!

I've got same problem. As I see that happens before I've updated
following packages. I needed it because I compile ghc702.
mtl
transformers
regex-base
regex-compat
regex-posix
hslogger network parsec hslogger HUnit MissingH
datetime

If this information helps you to figure out this errors.

Cheers,
Sergiy

On 6 September 2011 18:52, David Banas <dbanas at banasfamily.net> wrote:
> 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
> program,
> 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.
>
> Thanks!
> -db
>
> 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
> ami_test.c
> 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
> -fPIC
> ghc -c ExmplUsrModel.hs -cpp -package parsec-3.1.1 -package dsp -dynamic
> -fPIC
> ghc -c AMIModel.hs -cpp -package parsec-3.1.1 -package dsp -dynamic
> -fPIC
> gcc -I/usr/lib/ghc-6.12.3/include/ -g -fPIC   -c -o ami_model.o
> ami_model.c
> 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
> ExmplUsrModel.o
> make[1]: Leaving directory `/home/dbanas/prj/haskell/AMIParse/trunk'
> dbanas at dbanas-eeepc:~/prj/haskell/AMIParse/trunk$ ./ami_test test.ami
> /usr/lib/ghc-6.12.3/ghc-prim-0.2.0.0/libHSghc-prim-0.2.0.0-ghc6.12.3.so:
> undefined symbol: stg_newByteArrayzh
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list