Seung Jae Lee
2007-Mar-28 19:47 UTC
[LLVMdev] "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio
I followed the steps in "Getting Started with the LLVM System using Microsoft Visual Studio" in the document in LLVM page. I made hello.c file exactly same shown in the page. I made hello.bc on UNIX and transferred it to my Windows computer. And I typed "llc -march=c hello.bc" (Of course, I downloaded the latest version of LLVM and compiled with VS before this.) But my command prompt can't run this with the following statement. llc: bytecode didn't read correctly Reason: Don't know how to deserialize primitive type 16 (vers=0, pos=15) Hmmmm... Is there any body having been exposed to this? Thanks, Seung Jae Lee
Jeff Cohen
2007-Mar-28 20:01 UTC
[LLVMdev] "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio
Seung Jae Lee wrote:> I followed the steps in "Getting Started with the LLVM System using Microsoft Visual Studio" in the document in LLVM page. > > I made hello.c file exactly same shown in the page. > I made hello.bc on UNIX and transferred it to my Windows computer. > And I typed "llc -march=c hello.bc" > (Of course, I downloaded the latest version of LLVM and compiled with VS before this.) > But my command prompt can't run this with the following statement. > > llc: bytecode didn't read correctly > Reason: Don't know how to deserialize primitive type 16 (vers=0, pos=15) > > Hmmmm... Is there any body having been exposed to this? > > Thanks, > Seung Jae LeeAssuming that you are using the same version of LLVM on both Windows and Unix, the most likely explanation is that you transfered the file hello.bc as a text file instead of a binary file. Note that the last time I tried this, it no longer works. There are gcc runtime dependencies in the generated C code that will not link with VC++.
Jeff Cohen
2007-Mar-28 20:16 UTC
[LLVMdev] "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio
Jeff Cohen wrote:> Seung Jae Lee wrote: > >> I followed the steps in "Getting Started with the LLVM System using Microsoft Visual Studio" in the document in LLVM page. >> >> I made hello.c file exactly same shown in the page. >> I made hello.bc on UNIX and transferred it to my Windows computer. >> And I typed "llc -march=c hello.bc" >> (Of course, I downloaded the latest version of LLVM and compiled with VS before this.) >> But my command prompt can't run this with the following statement. >> >> llc: bytecode didn't read correctly >> Reason: Don't know how to deserialize primitive type 16 (vers=0, pos=15) >> >> Hmmmm... Is there any body having been exposed to this? >> >> Thanks, >> Seung Jae Lee >> > > Assuming that you are using the same version of LLVM on both Windows and > Unix, the most likely explanation is that you transfered the file > hello.bc as a text file instead of a binary file. > > Note that the last time I tried this, it no longer works. There are gcc > runtime dependencies in the generated C code that will not link with VC++. > >I just tried it myself, and it still doesn't work. There are no apparent GCC runtime dependencies this time, but the generated C code is relying on inline functions which are not supported by MS C. This could be fixed easily enough, but I'm not sure it's worth the effort. Any non-trivial program is going to have dependencies on the GCC runtime. I'll update the documentation.
Chris Lattner
2007-Mar-28 22:01 UTC
[LLVMdev] "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio
On Wed, 28 Mar 2007, Jeff Cohen wrote:>> Hmmmm... Is there any body having been exposed to this? > > Assuming that you are using the same version of LLVM on both Windows and > Unix, the most likely explanation is that you transfered the file > hello.bc as a text file instead of a binary file.It is also possible that your CFE doesn't match your LLVM tree. They are version locked. If you have the 1.9 LLVM tree you must use LLVM 1.9 llvm-gcc. If you have LLVM CVS, you must use llvm-gcc svn. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Maybe Matching Threads
- [LLVMdev] "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio
- [LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?
- [LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?
- [LLVMdev] LLVM command options in Visual Studio
- [LLVMdev] LLVM with Microsoft Visual Studio