Hi Patrick,
You need to modify your makefile for building your version of lli so
that it includes the LLVMBCWriter.o library. You can do this with a line
like:
LLVM_LIBS=LLVMBCWriter
if you're using the LLVM Makefile system. Otherwise you just need to
make sure that {Debug,Release}/lib/LLVMBCWriter.o gets added to the link
line.
Reid.
On Thu, 2005-02-24 at 16:37, Patrick Meredith wrote:> Linking lli debug executable (without symbols)
>
/mounts/zion/disks/0/localhome/pmeredit/llvm/lib/Debug/lli-interpreter.o(.te
> xt+0x643a): In function
> `llvm::Interpreter::callExternalFunction(llvm::Function*,
> std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue>
>
> const&)':
>
/localhome/pmeredit/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.c
> pp:98: undefined reference to `llvm::WriteBytecodeToFile(llvm::Module
> const*, std::basic_ostream<char, std::char_traits<char>
>&)'
> collect2: ld returned 1 exit status
> make: *** [/mounts/zion/disks/0/localhome/pmeredit/llvm/tools/Debug/lli]
> Error 1
>
> So, it's not linking in Writer.o, which is understandable since lli, as
is,
> has no use for Writer.o. My question is where in this system of Makefiles
> are the object files to be linked into lli specified? I've looked
through
> all the Makefiles and I can't find anything :(
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20050224/18d961c1/attachment.sig>
Where do I add that line? Just putting it in the vanilla Makefile in tools/lli doesn't work. ----- Original Message ----- From: "Reid Spencer" <reid at x10sys.com> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Thursday, February 24, 2005 6:50 PM Subject: Re: [LLVMdev]Linker error building (modified) lli> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >
I forgot that lli was "special". It uses the "JIT" keywoard which means "figure out the right libraries to use for a JIT compiler and runtime". So, just add this, to tools/lli/Makefile: USEDLIBS := LLVMBCWriter That worked for me. Reid. On Thu, 2005-02-24 at 16:58, Patrick Meredith wrote:> Where do I add that line? Just putting it in the vanilla Makefile in > tools/lli doesn't work. > > ----- Original Message ----- > From: "Reid Spencer" <reid at x10sys.com> > To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Thursday, February 24, 2005 6:50 PM > Subject: Re: [LLVMdev]Linker error building (modified) lli > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050224/87abe8c1/attachment.sig>
> Where do I add that line? Just putting it in the vanilla Makefile in > tools/lli doesn't work.It should be USEDLIBS = LLVMBCWriter In the lli Makefile. See the llc Makefile as an example. -Tanya> > ----- Original Message ----- > From: "Reid Spencer" <reid at x10sys.com> > To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Thursday, February 24, 2005 6:50 PM > Subject: Re: [LLVMdev]Linker error building (modified) lli > > >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >