[LLVMdev] (external) library issues

Chris Lattner sabre at nondot.org
Fri Sep 28 10:50:14 PDT 2007


> llvm-link -v -o chgrp chgrp.o chown-core.o ../lib/libfetish.a ../ 
> lib/libfetish.a
>
>
>
> I added the -v option after it failed.  Here's the whole output  
> from llvm-link:
>
>
>
> Loading 'chgrp.o'
>
> Locading 'chown-core.o'
>
> Linking on 'chown-core.o'
>
> Loading '..\lib\libfetish.a'
>
> Error opening bytecode file '../lib/libfetish.a': Invalid bytecode  
> signature: 72613C21 (Vers=0, Pos=4)
>
> llvm-link:error loading file '../lib/libfetish.a'
This is because llvm-link doesn't know anything about archives.  I'd  
suggest using llvm-ld, which does.

> I repeated the same thing with llvm-2.0.
Why not 2.1? :)
>   The commands are the same, but the output differs:
>
> Llvm-bcanalyzer: Bitcode stream should be a multiple of 4 bytes in  
> length
>
> Llvm-dis: Bitcode stream should be a multiple of 4 bytes in length
>
> Llvm-ar t: list of .o files
>
> Llvm-nm: list of .o files and their symbols
>
> Llvm-ranlib: nothing (shell prompt just comes back)
> llvm-link: Bitcode stream should be a multiple of 4 bytes in length
llvm 2.0 doesn't work with llvm 1.9 .bc files, make sure to rebuild  
clean.

-Chris



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070928/724a8e8f/attachment.html>


More information about the llvm-dev mailing list