Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 423 by s...@oax.com: Cannot compile protobuf example code on AIX 6.1
http://code.google.com/p/protobuf/issues/detail?id=423

What steps will reproduce the problem?
1. Install Google Protocol Buffers on AIX 6.1
2. export PKG_CONFIG_PATH=/PATH/protobuf-2.4.1
3. cd /PATH/protobuf-2.4.1/examples
4. make

What is the expected output? What do you see instead?
On Linux, the compilation of the protobuf example code succeeds. On AIX, I get many errors. I've pasted the errors below that I get with the g++ compiler and the xlC_r compiler.

What version of the product are you using? On what operating system?
protobuf-2.4.1 on AIX 6.1

Please provide any additional information below.

Here are a sampling of the compilation errors I'm getting:

Errors with g++ compiler
In file included from addressbook.pb.h:9,
                 from add_person.cc:6:
/usr/include/google/protobuf/stubs/common.h:305: error: template with C linkage /usr/include/google/protobuf/stubs/common.h:328: error: template with C linkage
...
There are about 100 of these errors.

$ xlC_r add_person.cc addressbook.pb.cc -c `pkg-config --cflags --libs protobuf`
add_person.cc:
"/usr/include/google/protobuf/stubs/common.h", line 306.11: 1540-0121 (S) A template cannot have "C" linkage. "/usr/include/google/protobuf/stubs/common.h", line 329.11: 1540-0121 (S) A template cannot have "C" linkage.
...
"/usr/include/google/protobuf/stubs/common.h", line 348.7: 1540-0130 (S) "internal::implicit_cast" is not declared. "/usr/include/google/protobuf/stubs/common.h", line 349.7: 1540-0130 (S) "internal::down_cast" is not declared.
...
"/usr/include/google/protobuf/stubs/common.h", line 1145.43: 1540-0063 (S) The text "<" is unexpected. "/usr/include/google/protobuf/stubs/common.h", line 1146.43: 1540-0063 (S) The text "<" is unexpected. "/usr/include/google/protobuf/stubs/common.h", line 1147.43: 1540-0063 (S) The text "<" is unexpected.
...
"/usr/include/google/protobuf/repeated_field.h", line 422.21: 1540-0140 (S) The text "<" is unexpected. "RepeatedField" may be undeclared, ambiguous, or may require "typename" qualification.
...
"/usr/include/google/protobuf/repeated_field.h", line 571.8: 1540-0063 (S) The text "typename" is unexpected.
...
"/usr/include/google/protobuf/wire_format_lite_inl.h", line 55.13: 1540-0120 (S) The out-of-line member definition "google::protobuf::internal::WireFormatLite" of an explicit specialization should not use a template prefix.
...
"addressbook.pb.cc", line 391.5: 1540-0130 (S) "::google::protobuf::internal::dynamic_cast_if_available" is not declared. "addressbook.pb.cc", line 445.25: 1540-0216 (S) An expression of type "const google::protobuf::internal::GeneratedMessageReflection *" cannot be converted to type "const google::protobuf::Reflection *". "addressbook.pb.h", line 56.71: 1540-0157 (S) The text ">" is unexpected. It may be that this token was intended as a template argument list terminator but the name is not known to be a template. "/usr/include/google/protobuf/descriptor.pb.h", line 89.80: 1540-0157 (S) The text ">" is unexpected. It may be that this token was intended as a template argument list terminator but the name is not known to be a template.


Thanks in advance!

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