[LLVMdev] External function 'pthread_once' could not be resolved

Henrik Bach
Thu, 07 Jul 2005 16:15:40 -0000

>From: Andrew Lenharth
>Date: Thu, 07 Jul 2005 10:37:53 -0500
>
>On Thu, 2005-07-07 at 13:52 +0200, Henrik Bach wrote:
> > make[1]: Entering directory
>`/home/hb/projects/build/LLVM/pnet-1-1/samples'
> > ../ilasm/ilasm -o evenodd.exe
> > /home/hb/projects/src/pnet-1/pnet-0.7.0/samples/evenodd.il
> > ERROR: Program used external function 'pthread_once' which
could not be
> > resolved!
> >
>lli(_ZN85_GLOBAL__N__home_hb_projects_src_llvm_1_llvm_lib_System_Signals.cpp_17E02520_F7D322F615PrintStackTraceEv+0x1f)[0x835c40f]
> > /lib/tls/libc.so.6(abort+0x1d2)[0x201302]
> > lli[0x8116dbb]
> > make[1]: *** [evenodd.exe] Aborted
> >
> > The 'pthread_once' is located in the native library binary
file:
> > /usr/lib/libpthread.a. I've also included the path to the library
in
> > LLVM_LIB_SEARCH_PATH environment variable.
>
>is there a .so of this?

Yes.

>
> > When LLVM tool gccld is linking above program, it doesn't complain
that
>it
> > cannot find the function or library.
>
>The problem is, I believe, that you are running things through the
>interpreter.  If you compiled to native code you shouldn't have this
>problem.  (If there is a .so of pthreads, try linking with that one).

The idea is to move the bytecode files between systems and thus have llvm
backends to compile or interprete these. Hence, I don't want to compile to
native code, other than what the systems provide through native libraries.

Henrik

>
>Andrew
>
>_______________________________________________
>LLVM Developers mailing list
>LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

_________________________________________________________________
F� alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/