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

Andrew Lenharth andrewl at lenharth.org
Thu Jul 7 08:37:53 PDT 2005


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?

> 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).

Andrew




More information about the llvm-dev mailing list