lli can't read .bc files

Hi all

I’m a new to LLVM. I was unable to browse all the archive since I couldn’t locate any search option.
So here is my issue:

I installed LLVM under openSUSE 11.3 with the following llvm tools

Hi Toussaint,

llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2.8)

version 2.8

Low Level Virtual Machine (http://llvm.org/):
   llvm version 2.6

version 2.6

You need lli from version 2.8 or later.

Ciao,

Duncan.

Ntwali Bashige <ntbashige@gmail.com> writes:

[snip]

I installed LLVM under openSUSE 11.3 with the following llvm tools
----------
llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2.8)
----------
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.6
  Optimized build.
  Built Jul 24 2010(08:41:55).

  Registered Targets:
    x86 - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64
---------

The issue is that the LLI can't read the .bc file generated using:

% llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc

It issues the following error message:
LLVM ERROR: Error reading function 'main' from bitcode file: Unknown instruction

Probably the problem consists on using lli from LLVM 2.6 with a llvm-gcc
based on LLVM 2.8.

[snip]

hi

Thanks, ti was due to different versions.
problem solved.

Regards
Toussaint