Cross compiling for PowerPC

962 views
Skip to first unread message

Tergeist P

unread,
Oct 20, 2011, 8:49:20 AM10/20/11
to prot...@googlegroups.com
Hi,

I'm using protobuf-2.4.1 and I would like to make cross compiling for PowerPC. I've a linux box (Linux 2.6.10). So :

./configure --host=powerpc-405-linux-gnu CC=powerpc-405-linux-gnu-gcc CXX=powerpc-405-linux-gnu-g++

make

=> protobuf/src/protoc :line 136: /protobuf/src/.libs/lt-protoc :cannot execute binay file
=> protobuf/src/protoc :line 136: /protobuf/src/.libs/lt-protoc :success
=> make: ***[unittest_proto_middleman] Error 1

Would you mind helping me please?

Best regards,

Tergeist P.

Eyal Farago

unread,
Oct 20, 2011, 3:21:38 PM10/20/11
to prot...@googlegroups.com
you have to use the '--with-protoc' option when configuring, please have a look at readme.txt (line 80).

enjoy,
Eyal

Tergeist P

unread,
Oct 21, 2011, 3:38:27 AM10/21/11
to prot...@googlegroups.com
Hi,

Thanks, I hadn't seen the "Note for cross-compiling" in the README! But now, I have a new problem :

./configure --host=powerpc-405-linux-gnu CC=powerpc-405-linux-gnu-gcc CXX=powerpc-405-linux-gnu-g++ --with-protoc=protoc

make

make install

=>No problem. But then I try to use protoc cross-compiled :

protoc Data.proto

     =>tools/bin/protoc: 1: Syntax error: word unexpected (expecting ")")


Would you mind helping me please? I'm using google protocol buffer since several months without any problem but it's the fisrt time
I try to use protoc in cross-compiling so i have some dificulties...

Thanks,

Tergeist P.



2011/10/20 Eyal Farago <eyal....@gmail.com>


    you have to use the '--with-protoc' option when configuring, please have a look at readme.txt (line 80).

    enjoy,
    Eyal

    --
    You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/5N_w6HJcaAsJ.
    To post to this group, send email to prot...@googlegroups.com.
    To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Tergeist P

unread,
Oct 21, 2011, 3:59:58 AM10/21/11
to prot...@googlegroups.com
Hi,

I try again with a make check this time and I have some errors :

make uninstall


./configure --host=powerpc-405-linux-gnu CC=powerpc-405-linux-gnu-gcc CXX=powerpc-405-linux-gnu-g++ --with-protoc=protoc

make

make check

=>some errors :

...
...
powerpc-405-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../gtest/include -I../gtest/include  -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -DNDEBUG -MT protobuf_test-descriptor_unittest.o -MD -MP -MF .deps/protobuf_test-descriptor_unittest.Tpo -c -o protobuf_test-descriptor_unittest.o `test -f 'google/protobuf/descriptor_unittest.cc' || echo './'`google/protobuf/descriptor_unittest.cc
google/protobuf/descriptor_unittest.cc: In member function `virtual void
   google::protobuf::descriptor_unittest::CustomOptions_OptionTypes_Test::TestBody()
   ':
google/protobuf/descriptor_unittest.cc:2030: warning: cannot pass objects of
   non-POD type `struct std::string' through `...'; call will abort at runtime
google/protobuf/descriptor_unittest.cc: In member function `void
   google::protobuf::descriptor_unittest::ValidationErrorTest::BuildFileWithErrors(const
   std::string&, const std::string&)':
google/protobuf/descriptor_unittest.cc:2314: warning: cannot pass objects of
   non-POD type `const struct std::basic_string<char, std::char_traits<char>,
   std::allocator<char> >' through `...'; call will abort at runtime
google/protobuf/descriptor_unittest.cc: In member function `virtual void
   google::protobuf::descriptor_unittest::DatabaseBackedPoolTest_UnittestProto_Test::TestBody()
   ':
google/protobuf/descriptor_unittest.cc:3931: warning: cannot pass objects of
   non-POD type `struct std::string' through `...'; call will abort at runtime
mv -f .deps/protobuf_test-descriptor_unittest.Tpo .deps/protobuf_test-descriptor_unittest.Po
powerpc-405-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../gtest/include -I../gtest/include  -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -DNDEBUG -MT protobuf_test-dynamic_message_unittest.o -MD -MP -MF .deps/protobuf_test-dynamic_message_unittest.Tpo -c -o protobuf_test-dynamic_message_unittest.o `test -f 'google/protobuf/dynamic_message_unittest.cc' || echo './'`google/protobuf/dynamic_message_unittest.cc
mv -f .deps/protobuf_test-dynamic_message_unittest.Tpo .deps/protobuf_test-dynamic_message_unittest.Po
powerpc-405-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../gtest/include -I../gtest/include  -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -DNDEBUG -MT protobuf_test-extension_set_unittest.o -MD -MP -MF .deps/protobuf_test-extension_set_unittest.Tpo -c -o protobuf_test-extension_set_unittest.o `test -f 'google/protobuf/extension_set_unittest.cc' || echo './'`google/protobuf/extension_set_unittest.cc
google/protobuf/extension_set_unittest.cc: In member function `virtual void
   google::protobuf::internal::<unnamed>::ExtensionSetTest_DynamicExtensions_Test::TestBody()
   ':
google/protobuf/extension_set_unittest.cc:607: warning: cannot pass objects of
   non-POD type `struct std::string' through `...'; call will abort at runtime
mv -f .deps/protobuf_test-extension_set_unittest.Tpo .deps/protobuf_test-extension_set_unittest.Po
powerpc-405-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../gtest/include -I../gtest/include  -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -DNDEBUG -MT protobuf_test-generated_message_reflection_unittest.o -MD -MP -MF .deps/protobuf_test-generated_message_reflection_unittest.Tpo -c -o protobuf_test-generated_message_reflection_unittest.o `test -f 'google/protobuf/generated_message_reflection_unittest.cc' || echo './'`google/protobuf/generated_message_reflection_unittest.cc
../gtest/include/gtest/internal/gtest-port.h: In member function `virtual void
   google::protobuf::<unnamed>::GeneratedMessageReflectionTest_UsageErrors_Test::TestBody()
   ':
../gtest/include/gtest/internal/gtest-port.h:683: error: `
   testing::internal::RE::RE(const testing::internal::RE&)' is private
google/protobuf/generated_message_reflection_unittest.cc:350: error: within
   this context
google/protobuf/generated_message_reflection_unittest.cc:350: error:  
   initializing temporary from result of `testing::internal::RE::RE(const
   char*)'
../gtest/include/gtest/internal/gtest-port.h:683: error: `
   testing::internal::RE::RE(const testing::internal::RE&)' is private
google/protobuf/generated_message_reflection_unittest.cc:358: error: within
   this context
google/protobuf/generated_message_reflection_unittest.cc:358: error:  
   initializing temporary from result of `testing::internal::RE::RE(const
   char*)'
../gtest/include/gtest/internal/gtest-port.h:683: error: `
   testing::internal::RE::RE(const testing::internal::RE&)' is private
google/protobuf/generated_message_reflection_unittest.cc:366: error: within
   this context
google/protobuf/generated_message_reflection_unittest.cc:366: error:  
   initializing temporary from result of `testing::internal::RE::RE(const
   char*)'
../gtest/include/gtest/internal/gtest-port.h:683: error: `
   testing::internal::RE::RE(const testing::internal::RE&)' is private
google/protobuf/generated_message_reflection_unittest.cc:374: error: within
   this context
google/protobuf/generated_message_reflection_unittest.cc:374: error:  
   initializing temporary from result of `testing::internal::RE::RE(const
   char*)'
make[3]: *** [protobuf_test-generated_message_reflection_unittest.o] Error 1
make[3]: Leaving directory `/home/omni/ECC/protobuf-2.4.1/src'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/home/omni/ECC/protobuf-2.4.1/src'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/omni/ECC/protobuf-2.4.1/src'
make: *** [check-recursive] Error 1


Any support is greatly appreciated!

Best regards,

Tergeist P.
Reply all
Reply to author
Forward
0 new messages