Hi, I am using Ubuntu wubi and the version of the llvm is 2.8. I followd the instruction in the llvm site ("http://llvm.org/docs/GettingStarted.html") and tried to run the hello program. Then I compiled the C file to llvm bitcode (clang -O3 -emit-llvm hello.c -c -o hello.bc). But when I wanted to run the bitcode file (lli hello.bc), it says: "lli: hello.bc: Invalid MODULE_CODE_GLOBALVAR record". So the botcode is not generated correctly. I also tried to run the other examples, but i could not run them either. I can run the executable file though. So the gcc works correctly. Could you please help me to solve this problem and get it work? Regards, Reza -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120914/9cbe6f7b/attachment.html>
On Fri, Sep 14, 2012 at 9:24 AM, Reza Sheykhi <hajishey at msu.edu> wrote:> Hi, > > I am using Ubuntu wubi and the version of the llvm is 2.8. I followd the > instruction in the llvm site ("http://llvm.org/docs/GettingStarted.html") > and tried to run the hello program. Then I compiled the C file to llvm > bitcode (clang -O3 -emit-llvm hello.c -c -o hello.bc). But when I wanted to > run the bitcode file (lli hello.bc), it says: "lli: hello.bc: Invalid > MODULE_CODE_GLOBALVAR record". So the botcode is not generated correctly. I > also tried to run the other examples, but i could not run them either. I can > run the executable file though. So the gcc works correctly. > > Could you please help me to solve this problem and get it work?That sounds like you're not using matching versions of clang and LLVM. -Eli