Error loading program 'hello.bc': Invalid bytecode signature: DEC04342 (Vers=0, Pos=4)

Hello everybody,

So I am having some problems with llvm. When I’ve tried a lot of times to run and re-install the llvm, but the same error appears, so:

esbox@embedded2i:~/llvm/projects/teste$ llvm-gcc hello.c -o hello
esbox@embedded2i:~/llvm/projects/teste$ ls
hello hello.c
esbox@embedded2i:~/llvm/projects/teste$ ./hello
Hello World
esbox@embedded2i:~/llvm/projects/teste$ llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc
esbox@embedded2i:~/llvm/projects/teste$ ls
hello hello.bc hello.c
esbox@embedded2i:~/llvm/projects/teste$ lli hello.bc
Error loading program ‘hello.bc’: Invalid bytecode signature: DEC04342 (Vers=0, Pos=4)
esbox@embedded2i:~/llvm/projects/teste$ llvm-dis < hello.bc[
bash: hello.bc[: No such file or directory
esbox@embedded2i:~/llvm/projects/teste$ llvm-dis < hello.bc
llvm-dis: Invalid bytecode signature: DEC04342 (Vers=0, Pos=4)

Some weeks ago i talked to someone at #LLVM and he told me that versions of llvm and gcc aren’t sycronized. But i don’t know how to do this.

some helps???

thanks
italo

Some weeks ago i talked to someone at #LLVM and he told me that versions of
llvm and gcc aren't sycronized. But i don't know how to do this.

If you are using svn, you should keep llvm and llvm-gcc both at the same rev number to be safe. For llvm-gcc 2.3, you should use llvm 2.3. You can't use llvm-gcc 2.3 with llvm svn TOT for example.

What version of llvm and llvm-gcc are you using?

-Tanya

I am not using svn and llvm version is 2.3 and llvm-gcc is 4.2.1

2008/7/3 Tanya M. Lattner <tonic@nondot.org>:

I am not using svn and llvm version is 2.3 and llvm-gcc is 4.2.1

And llvm-gcc is also from the 2.3 release? If so, I'm guessing
you have an older version of llvm or llvm-gcc in your path somewhere
and that is being used instead.

Ciao,

Duncan.

Yeah! Now i am solving the problem. I don’t know where comes from an old version of it. When i runned llc -version it was 1.8, so someone from irc helps me to remove it.

thanks for everyone

2008/7/3 Duncan Sands <baldrick@free.fr>: