Henrik Bach
2005-Jul-07 19:26 UTC
[LLVMdev] External function 'pthread_once' could not be resolved
>From: Chris Lattner >Date: Thu, 7 Jul 2005 11:26:48 -0500 (CDT) > >On Thu, 7 Jul 2005, Henrik Bach wrote: >>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. > >If libpthread.a is a static library, lli won't be successful loading it. >Try relinking lli, but add this to its tools/lli/Makefile: > >TOOLLINKOPTS := -lpthreadThere is both a static (.a) and dynamic (.so) version of the library. The above advise worked for the static library. However, I think it is more convenient to use the dynamic version. How do I achieve that? Henrik.> >-Chris > >-- >http://nondot.org/sabre/ >http://llvm.cs.uiuc.edu/ > >_______________________________________________ >LLVM Developers mailing list >LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev_________________________________________________________________ Undg� pop-ups med MSN Toolbar - http://toolbar.msn.dk/ hent den gratis!
Chris Lattner
2005-Jul-08 00:19 UTC
[LLVMdev] External function 'pthread_once' could not be resolved
On Thu, 7 Jul 2005, Henrik Bach wrote:>> TOOLLINKOPTS := -lpthread > > There is both a static (.a) and dynamic (.so) version of the library. The > above advise worked for the static library. However, I think it is more > convenient to use the dynamic version. How do I achieve that?lli -load /path/to/libpthread.so foo.bc -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
I am attempting to get started with LLVM passes by running the Hello pass. On my FreeBSD 5.x box, I've written and compiled (with llvm-gcc) a Hello program, and also compiled the Hello pass in the lib/Transforms/Hello directory. I know that this results in a number of files, as follows:> ls -l LLVM/llvm/lib/Transforms/Hello/Debug/total 128 -rw-r--r-- 1 sean staff 11004 Jul 8 16:25 Hello.d -rw-r--r-- 1 sean staff 358 Jul 8 16:25 Hello.lo -rw-r--r-- 1 sean staff 115984 Jul 8 16:25 Hello.o However, running the opt command results in the following error:> opt -load LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo < hello.bc > /dev/nullError opening 'LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo': Can't open :LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo: Cannot open "LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo.so" -load request ignored. Is there some sort of debugging output that can show why opt is actualy having trouble opening the Hello.lo file? I did try to run with the -debug flag, but that also resulted in an error complaining about a missing .so file, which is true, but perhaps also correct??> opt -debug -load LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo < hello.bc > /dev/nullError opening 'LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo': Can't open :LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo: Cannot open "LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo.so" -load request ignored. Thanks, Sean