"deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio

Seung Jae Lee
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
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio

Jeff Cohen
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++.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio

Jeff Cohen
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.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: "deserialize primitive type 16 (vers=0, pos=15)" with Visual Studio

Chris Lattner
In reply to this post by Jeff Cohen
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/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev