On May 12, 1:43 pm, "ry.n...@gmail.com" <ry.n...@gmail.com> wrote:
> Hello,
>
> I am reasonably new to the embedded world but I am trying to use
> protobufs on a virtex5 ppc.  I have a xcompiler and was wondering what
> steps/flags I would need to create appropriate libraries to use.
>
> The setup:
>   I have some proto files that I want to use.
>   I have the 2.0.3 tarball.
>   I have the xcomp.
>
> Do i call something like ./configure --target=<TYPE>?  What is the
> TYPE that I put in?
>
> That should generate a protoc (the proto compiler) that will generate
> the c/h files appropriately correct?  It will also generate the
> libprotobuf.so files that have the right binary format.  Correct?
>
> Thanks for your help, I am just getting lost in the layers of
> compilers.

My experience is that the protobuf libraries don't support cross-
compilation well.

We've been using an ARM, with an Intel build machine.  We haven't
figured out (quite) the right way for "protoc" to be built for the
Intel machine, whereas the libraries etc. need to be built for the
ARM.

This is all under Linux.

Our builds fail because protoc is compiled for the target, but it is
run on the build machine.

What we tend to do is install the Intel version (e.g. /usr/local/bin/
protoc), re-configure for cross-compiling.  Make.  Wait for make to
break.  Move the ./src/protoc to ./src/protoc.cross.  Copy /usr/local/
bin/protoc to ./src/protoc.  Make again.  Copy ./src/protoc.cross back
to ./src/protoc. Then make install.

As for configure, we use:

./configure --host=arm-linux--prefix=/srv/rootfs/usr/local/

where the gcc compiler is arm-linux-gcc.

HTH,

Peter K.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to