Issue 423 in protobuf: Cannot compile protobuf example code on AIX 6.1

401 views
Skip to first unread message

prot...@googlecode.com

unread,
Sep 27, 2012, 10:44:51 AM9/27/12
to prot...@googlegroups.com
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!

prot...@googlecode.com

unread,
Sep 27, 2012, 10:49:23 AM9/27/12
to prot...@googlegroups.com

Comment #1 on issue 423 by s...@oax.com: Cannot compile protobuf example
The xlC_r compiler version I'm using is:

$ xlC_r -qversion
IBM XL C/C++ for AIX, V10.1
Version: 10.01.0000.0000


prot...@googlecode.com

unread,
Dec 5, 2012, 5:59:08 PM12/5/12
to prot...@googlegroups.com
Updates:
Status: NeedPatchFromUser
Labels: -Priority-Medium Priority-Low

Comment #2 on issue 423 by liu...@google.com: Cannot compile protobuf
Sorry we don't have the resource to test it on AIX. Feel free to submit a
patch.

prot...@googlecode.com

unread,
Oct 14, 2014, 9:41:38 PM10/14/14
to prot...@googlegroups.com
Updates:
Status: WontFix
Owner: xiaof...@google.com

Comment #3 on issue 423 by xiaof...@google.com: Cannot compile protobuf
example code on AIX 6.1
https://code.google.com/p/protobuf/issues/detail?id=423

Marking this as "Won't Fix" as we don't have the environment to test/fix
the problem. If you have a fix, feel free to send us a patch to our github
site:
https://github.com/google/protobuf

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages