[protobuf] Re: Cross compiling protobuf for ARM on Windows machine

2019-06-05 Thread Dibet Garcia
 Hi, i have the same problem. iam using on linux the following command

 cmake -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=RELEASE 
-DCMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabihf-g++ 
-DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc 
-DCMAKE_AR=/usr/bin/arm-linux-gnueabihf-ar  ..

But i dont know how to especify the protoc binary file.

Do you fix your problem?


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/8b879fb0-4731-435b-b086-bc84150c25aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Cross-compiling protobuf to 32-bit

2016-03-07 Thread Kevin L
Hi SyRenity. I've been running into this same issue on CentOS 5. Were you 
able to fix the problem?

On Thursday, January 28, 2010 at 5:12:09 AM UTC-8, SyRenity wrote:
>
> Hi.
>
> I'm trying to compile a 32-bit protobuf on 64-bit machine.
>
> No matter what I tried (changing build option, host option or setting -
> m32 flag), I couldn't get it working. Either I stuck on compile stage,
> or the resulting binaries are 64-bit.
>
> I do able to compile other apps via -m32 flag.
>
> (I solved this for now by compiling on another 32-bit machine, which
> is awfully inconvenient, plus may cause the strings issue I wrote
> earlier.)
>
> Any advice how to sort it out?
>
> Thanks!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Cross Compiling Protobuf For Raspberry Pi

2014-11-13 Thread Andrew Capodieci
I took a look at the specific lines for the errors, and the /usr/bin/protoc 
I built for the build machine is having issues on the following lines:

172   // For oneof test
*173   oneof oneof_field {*
174 uint32 oneof_uint32 = 111;
175 NestedMessage oneof_nested_message = 112;
176 string oneof_string = 113;
177 bytes oneof_bytes = 114;
178   }

// Test oneofs.
609 message TestOneof {
*610   oneof foo {*
611 int32 foo_int = 1;
612 string foo_string = 2;
613 TestAllTypes foo_message = 3;
614 group FooGroup = 4 {
615   optional int32 a = 5;
616   optional string b = 6;
617 }
618   }
619 }

631 message TestOneof2 {
*632   oneof foo {*
633 int32 foo_int = 1;
634 string foo_string = 2;
635 string foo_cord = 3 [ctype=CORD];
636 string foo_string_piece = 4 [ctype=STRING_PIECE];
637 bytes foo_bytes = 5;
638 NestedEnum foo_enum = 6;
639 NestedMessage foo_message = 7;
640 group FooGroup = 8 {
641   optional int32 a = 9;
642   optional string b = 10;
643 }
644 NestedMessage foo_lazy_message = 11 [lazy=true];
645   }
646 
*647   oneof bar {*
648 int32 bar_int = 12 [default = 5];
649 string bar_string = 13 [default = STRING];
650 string bar_cord = 14 [ctype=CORD, default = CORD];
651 string bar_string_piece = 15 [ctype=STRING_PIECE, default = SPIECE
];
652 bytes bar_bytes = 16 [default = BYTES];
653 NestedEnum bar_enum = 17 [default = BAR];
654   }

671 message TestRequiredOneof {
*672   oneof foo {*
673 int32 foo_int = 1;
674 string foo_string = 2;
675 NestedMessage foo_message = 3;
676   }
677   message NestedMessage {
678 required double required_double = 1;
679   }
680 }

*853 service TestService {*
854   rpc Foo(FooRequest) returns (FooResponse);
855   rpc Bar(BarRequest) returns (BarResponse);
856 }

On Thursday, November 13, 2014 8:57:59 AM UTC-5, Andrew Capodieci wrote:

 I'm trying to cross compile google Protocol buffers for the Raspberry Pi, 
 so I can cross compile my own software which links to protobuf.

 I've installed protobuf-2.6.0 to the directory 
 ~/ExternalLibs/protobuf-2.6.0, where I perform the following steps:

 cd ~/ExternalLibs/protobuf-2.6.0
 ./configure --disable-shared
 make
 make check

  -- all (5/5) tests pass

 sudo make install
 make distclean

 This should set up the initial protoc executable that can be run by my 
 build machine (Lenovo w540 laptop running Ubuntu 12.04) during the cross 
 compiling for my host, the raspberry pi.

 I then run:

 ./configure --host=arm-linux-gnueabi CC=/opt/cross/x-tools/arm-unknown
 -linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc CXX=/opt/cross/x-tools/
 arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++ --with-protoc=
 /usr/bin/protoc --prefix=/home/andrewc1204/raspberrypi_crosscompile/
 protobuf_xtools/

 My cross compiler was built following this tutorial: 
 http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/.
  
 The only extra thing I did was enable an additional c++ compiler on top of 
 building the c compiler in the ct-ng menus, which is why I'm able to use 
 the g++ compiler on top of the gcc compiler.

 This ./configure seems to run, and then I call
 
 make

 The output is as follows:

 
 make  all-recursive
 make[1]: Entering directory 
 `/home/andrewc1204/ExternalLibs/protobuf-2.6.0'
 Making all in .
 make[2]: Entering directory `/home/andrewc1204/ExternalLibs/protobuf-
 2.6.0'
 make[2]: Leaving directory 
 `/home/andrewc1204/ExternalLibs/protobuf-2.6.0'
 Making all in src
 make[2]: Entering directory 
 `/home/andrewc1204/ExternalLibs/protobuf-2.6.0/src'
 /usr/bin/protoc -I. --cpp_out=. google/protobuf/unittest.proto 
 google/protobuf/unittest_empty.proto google/protobuf/unittest_import.proto 
 google/protobuf/unittest_import_public.proto 
 google/protobuf/unittest_mset.proto 
 google/protobuf/unittest_optimize_for.proto 
 google/protobuf/unittest_embed_optimize_for.proto 
 google/protobuf/unittest_custom_options.proto 
 google/protobuf/unittest_lite.proto 
 google/protobuf/unittest_import_lite.proto 
 google/protobuf/unittest_import_public_lite.proto 
 google/protobuf/unittest_lite_imports_nonlite.proto 
 google/protobuf/unittest_no_generic_services.proto 
 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
 google/protobuf/unittest.proto:173:3: Expected required, optional, 
 or repeated.
 google/protobuf/unittest.proto:173:21: Missing field number.
 google/protobuf/unittest.proto:610:3: Expected required, optional, 
 or repeated.
 google/protobuf/unittest.proto:610:13: Missing field number.
 google/protobuf/unittest.proto:632:3: Expected required, optional, 
 or repeated.
 google/protobuf/unittest.proto:632:13: Missing field number.
 google/protobuf/unittest.proto:647:3: Expected required, optional, 
 or repeated.
 

Re: Fwd: [protobuf] Re: Cross-compiling protobuf to 32-bit

2010-02-01 Thread SyRenity
Hi.

Any idea of the issue below?

I'm currently using static libraries compiled on another (virtual) 32-
bit machine, which seems to be working fine, but I really would prefer
a native solution.

Regards.

On Jan 29, 11:28 pm, Stas Oskin stas.os...@gmail.com wrote:
 Sorry, forwarding to list as well.

 -- Forwarded message --
 From: Stas Oskin stas.os...@gmail.com
 Date: Fri, Jan 29, 2010 at 11:27 PM
 Subject: Re: [protobuf] Re: Cross-compiling protobuf to 32-bit
 To: Kenton Varda ken...@google.com

 Hi.

  And when you configure other autotool-based packages the same way, it
  works?

 Yes, it is.

   You said you were using the -m32 flag.  Where is it?

 It actually broke the compilation, and didn't let it finish.

 Is there any one using a correct cross-architecture compile on RedHat?

 Regards.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@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.



Re: Fwd: [protobuf] Re: Cross-compiling protobuf to 32-bit

2010-02-01 Thread Kenton Varda
I don't think anyone here is likely to have any idea what the problem is.  I
cannot reproduce it, so I can't be of any help.  You'll need to debug it
yourself.  Try examining the build logs to see exactly how your compiler is
being invoked and figure out how it is *supposed* to be invoked to get the
results you want.  Maybe if you post those, we might be able to figure out
how to invoke configure to get what you want.

On Mon, Feb 1, 2010 at 1:13 PM, SyRenity stas.os...@gmail.com wrote:

 Hi.

 Any idea of the issue below?

 I'm currently using static libraries compiled on another (virtual) 32-
 bit machine, which seems to be working fine, but I really would prefer
 a native solution.

 Regards.

 On Jan 29, 11:28 pm, Stas Oskin stas.os...@gmail.com wrote:
  Sorry, forwarding to list as well.
 
  -- Forwarded message --
  From: Stas Oskin stas.os...@gmail.com
  Date: Fri, Jan 29, 2010 at 11:27 PM
  Subject: Re: [protobuf] Re: Cross-compiling protobuf to 32-bit
  To: Kenton Varda ken...@google.com
 
  Hi.
 
   And when you configure other autotool-based packages the same way, it
   works?
 
  Yes, it is.
 
You said you were using the -m32 flag.  Where is it?
 
  It actually broke the compilation, and didn't let it finish.
 
  Is there any one using a correct cross-architecture compile on RedHat?
 
  Regards.

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



-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@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.



Fwd: [protobuf] Re: Cross-compiling protobuf to 32-bit

2010-01-29 Thread Stas Oskin
Sorry, forwarding to list as well.

-- Forwarded message --
From: Stas Oskin stas.os...@gmail.com
Date: Fri, Jan 29, 2010 at 11:27 PM
Subject: Re: [protobuf] Re: Cross-compiling protobuf to 32-bit
To: Kenton Varda ken...@google.com


Hi.


 And when you configure other autotool-based packages the same way, it
 works?


Yes, it is.


  You said you were using the -m32 flag.  Where is it?


It actually broke the compilation, and didn't let it finish.

Is there any one using a correct cross-architecture compile on RedHat?

Regards.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@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.



Re: [protobuf] Re: Cross-compiling protobuf to 32-bit

2010-01-28 Thread Kenton Varda
On Thu, Jan 28, 2010 at 11:45 AM, SyRenity stas.os...@gmail.com wrote:

 CentOS 5.4
 GCC 4.1.2

 Configure for example:
 ./configure --prefix=/tmp/protobuf --host i386-redhat-linux


And when you configure other autotool-based packages the same way, it works?

You said you were using the -m32 flag.  Where is it?



 On Jan 28, 9:22 pm, Kenton Varda ken...@google.com wrote:
  What OS?  What compiler?  What is your ./configure command line?
 
  On Thu, Jan 28, 2010 at 5:12 AM, SyRenity stas.os...@gmail.com wrote:
   Hi.
 
   I'm trying to compile a 32-bit protobuf on 64-bit machine.
 
   No matter what I tried (changing build option, host option or setting -
   m32 flag), I couldn't get it working. Either I stuck on compile stage,
   or the resulting binaries are 64-bit.
 
   I do able to compile other apps via -m32 flag.
 
   (I solved this for now by compiling on another 32-bit machine, which
   is awfully inconvenient, plus may cause the strings issue I wrote
   earlier.)
 
   Any advice how to sort it out?
 
   Thanks!
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Protocol Buffers group.
   To post to this group, send email to proto...@googlegroups.com.
   To unsubscribe from this group, send email to
   protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com
 protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/protobuf?hl=en.

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



-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@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.



Re: Cross Compiling Protobuf

2009-05-12 Thread Kenton Varda
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

http://groups.google.com/group/protobuf/filesPlease let me know if it
works.

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
 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
-~--~~~~--~~--~--~---



Re: Cross Compiling Protobuf

2009-05-12 Thread Peter K.

Thanks, Kenton, I'll try it out tomorrow and post the results.

We're sticking with 2.0.3 for now, but will switch once 2.1 goes to
full release.

Ciao,

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
-~--~~~~--~~--~--~---