In v2.1.0 I've added a parameter to the configure script --with-protoc=
which lets you specify an alternate protoc binary to use when compiling.
This way, the makefiles won't invoke the protoc they just built. So,
cross-compiling should work.
However, I haven't actually tested this with cross-compiling as I don't
actually have a cross-compiling setup available to me. It would be great if
one of you could test this feature.
The release candidate (2.1.0rc1) can be found here:
<http://groups.google.com/group/protobuf/files>Please let me know if it
On Tue, May 12, 2009 at 11:59 AM, Peter K. <koots...@gmail.com> wrote:
> 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
> 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.
> 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 firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at