Dan Connors
2008-Mar-20 22:15 UTC
[LLVMdev] LLVM error: "Bitcode stream should be a multiple of 4 bytes in length" (fwd)
Do you know why I might be getting this error? [dconnors at eces-shell Hello]$ llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc [dconnors at eces-shell Hello]$ llc hello.bc -o hello.s llc: bitcode didn't read correctly. Reason: Bitcode stream should be a multiple of 4 bytes in length I am using: LLVM-GCC 4.2 Front End Binaries for Red Hat Enterprise Linux4/x86 LLVM source code 2.2 I've looked everywhere for possible error explanations, and only find code logs having the line regarding bitcode. All of the tools lli, etc also report the problem of 4 bytes in length. thanks! Dan
Duncan Sands
2008-Mar-21 08:23 UTC
[LLVMdev] LLVM error: "Bitcode stream should be a multiple of 4 bytes in length" (fwd)
Hi,> Do you know why I might be getting this error? > > > [dconnors at eces-shell Hello]$ llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc > [dconnors at eces-shell Hello]$ llc hello.bc -o hello.s > llc: bitcode didn't read correctly. > Reason: Bitcode stream should be a multiple of 4 bytes in lengththis means that hello.bc doesn't contain bitcode, though I suppose it might contain an out-of-date version of bitcode. My guess is that you have an old llvm-gcc or llc floating around in your path, which is getting used accidentally. You might want to look inside hello.bc, and see what the first 10 characters or so look like. Also, try doing "file hello.bc". If it is bitcode you should get "hello.bc: data". Ciao, Duncan. PS: I tried your command lines here and it worked fine (ubuntu x86-32).
Maybe Matching Threads
- rpcclient / adddriver returns WERR_ACCESS_DENIED
- FreeBSD Security Advisory FreeBSD-SA-04:13.linux
- FreeBSD Security Advisory FreeBSD-SA-04:13.linux
- Seeking suggestions about interfacing of LLVM DataFlowSanitizer library with KLEE in C code.
- [RFC] Should we bump the bitcode version in LLVM 6.0?