[LLVMdev] lli problem in llvm

Reid Spencer rspencer at reidspencer.com
Thu Feb 1 13:19:42 PST 2007


Hi Joy,

On Thu, 2007-02-01 at 15:52 -0500, Joy W. Kamunyori wrote:
> Hi,
> 
> I've just downloaded and installed LLVM, and am trying to invoke the JIT 
> using the "lli" command. Using the example given on the LLVM webpage, I 
> created a simple hello.c file as follows:
> 
>  #include <stdio.h>
>    int main() {
>      printf("hello world\n");
>      return 0;
>    }
> 
> I was able to successfully compile it using llvm-gcc and to run the 
> resulting executable. The problem comes in when I try to invoke the JIT. 
> As instructed, I created a hello.bc file in the following way: 
> llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc
> 
> When I try to run "lli hello.bc", I get the following error:
> Error loading program 'hello.bc': Don't know how to deserialize 
> primitive type 16 (Vers=0, Pos=15)
> 
> I also tried invoking the JIT using the example .bc file in the test 
> suite (very-long-byte-name.bc), but I get the same error.
> 
> Do you know what this means, and how I can fix it?

The error message indicates that the bytecode format produced by
llvm-gcc is not what lli expects. This can happen when your LLVM and
llvm-gcc versions do not match. I'm assuming from your command that
you're using llvm-gcc4. If you compiled this from the latest version of
llvm-gcc SVN repository, then you also need the latest version of LLVM
from the CVS repository.

Which versions of these tools are you using?

Reid.

> 
> Thanks,
> Joy Kamunyori
> 




More information about the llvm-dev mailing list