Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium
New issue 530 by bbca...@gmail.com: On protobuf 2.4.1, make check fails on
AIX because symbols are not found
http://code.google.com/p/protobuf/issues/detail?id=530
What steps will reproduce the problem?
1. After compiling, protobuf; run make check
2.
3.
What is the expected output? What do you see instead?
The following error message is displayed when compiling :
/usr/bin/ksh ./libtool --tag=CXX --mode=compile /usr/vacpp/bin/xlC_r
-DHAVE_CONFIG_H -I. -I./build-aux -I. -I./include -qnamemangling=v5 -qrtti
-I/opt/freeware/src/packages/BUILD/protobuf-2.4.1/include
-I/opt/freeware/include -I/usr/include
-I/opt/freeware/src/packages/BUILD/protobuf-2.4.1/include
-I/opt/freeware/include -I/usr/include -c -o src/gtest.lo src/gtest.cc
libtool: compile: /usr/vacpp/bin/xlC_r -DHAVE_CONFIG_H -I. -I./build-aux
-I. -I./include -qnamemangling=v5 -qrtti
-I/opt/freeware/src/packages/BUILD/protobuf-2.4.1/include
-I/opt/freeware/include -I/usr/include
-I/opt/freeware/src/packages/BUILD/protobuf-2.4.1/include
-I/opt/freeware/include -I/usr/include -c -M src/gtest.cc -DPIC -o
src/.libs/gtest.o
"src/gtest.cc", line 4106.7: 1540-2947 (I) The function "Int32
Int32FromEnvOrDie(const char * const, Int32)" has a previous declaration
with different top-level cv-qualifiers, which may cause link errors when
used in another compilation unit under the option "-qnamemangling=v5".
"./src/gtest-internal-inl.h", line 234.7: 1540-0424 (I) "Int32
Int32FromEnvOrDie(const char *, Int32)" is declared on line 234
of "./src/gtest-internal-inl.h".
"./include/gtest/internal/gtest-port.h", line 884.36: 1540-0274 (S) The
name lookup for "isatty" did not find a declaration.
"/usr/include/unistd.h", line 170.12: 1540-1298 (I) "extern "C" int
isatty(int)" needs to be declared in the containing scope to be found by
name lookup.
"./include/gtest/internal/gtest-port.h", line 890.44: 1540-0274 (S) The
name lookup for "rmdir" did not find a declaration.
"/usr/include/unistd.h", line 183.12: 1540-1298 (I) "extern "C" int
rmdir(const char *)" needs to be declared in the containing scope to be
found by name lookup.
"./include/gtest/internal/gtest-port.h", line 912.44: 1540-0274 (S) The
name lookup for "chdir" did not find a declaration.
"/usr/include/unistd.h", line 143.12: 1540-1298 (I) "extern "C" int
chdir(const char *)" needs to be declared in the containing scope to be
found by name lookup.
"./include/gtest/internal/gtest-port.h", line 926.27: 1540-0274 (S) The
name lookup for "read" did not find a declaration.
"/usr/include/unistd.h", line 182.16: 1540-1298 (I) "extern "C" ssize_t
read(int, void *, size_t)" needs to be declared in the containing scope to
be found by name lookup.
"./include/gtest/internal/gtest-port.h", line 929.27: 1540-0274 (S) The
name lookup for "write" did not find a declaration.
"/usr/include/unistd.h", line 194.16: 1540-1298 (I) "extern "C" ssize_t
write(int, const void *, size_t)" needs to be declared in the containing
scope to be found by name lookup.
"./include/gtest/internal/gtest-port.h", line 931.35: 1540-0274 (S) The
name lookup for "close" did not find a declaration.
"/usr/include/unistd.h", line 145.12: 1540-1298 (I) "extern "C" int
close(int)" needs to be declared in the containing scope to be found by
name lookup.
gmake[3]: *** [src/gtest.lo] Error 1
gmake[3]: Leaving directory
`/opt/freeware/src/packages/BUILD/protobuf-2.4.1/gtest'
gmake[2]: *** [check-local] Error 2
gmake[2]: Leaving directory
`/opt/freeware/src/packages/BUILD/protobuf-2.4.1'
gmake[1]: *** [check-am] Error 2
gmake[1]: Leaving directory
`/opt/freeware/src/packages/BUILD/protobuf-2.4.1'
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.
The error is corrected by adding:
#include <unistd.h>
in ./gtest/include/gtest/internal/gtest-port.h
The following patch resolves the problem:
Index: protobuf-2.4.1/gtest/include/gtest/internal/gtest-port.h
===================================================================
--- protobuf-2.4.1.orig/gtest/include/gtest/internal/gtest-port.h
2013-05-02 09:44:58.00000
0000 +0200
+++ protobuf-2.4.1/gtest/include/gtest/internal/gtest-port.h 2013-05-02
09:45:54.000000000 +02
00
@@ -161,6 +161,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef _AIX
+#include <unistd.h>
+#endif
#ifndef _WIN32_WCE
#include <sys/stat.h>
#endif // !_WIN32_WCE
--
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
--
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 http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.