Re: [protobuf] Error when build universal binary on Mac OS Tiger 10.4 sdk

660 views
Skip to first unread message

Kenton Varda

unread,
Feb 22, 2011, 1:14:54 PM2/22/11
to pick_tim, Protocol Buffers
From the error message, it seems like GCC doesn't like being passed "/Volumes/Data/XCode/SDKs/MacOSX10.4u.sdk" in CXXFLAGS.  Are you sure this is needed at all?  If so, maybe this should be passed as LIBS or LDFLAGS instead?

On Tue, Feb 22, 2011 at 3:50 AM, pick_tim <nguyenq...@gmail.com> wrote:
I tried compile protobuf on Mac OS Tiger,

My command :

./configure CXXFLAGS="/Volumes/Data/XCode/SDKs/MacOSX10.4u.sdk -arch
i386 -arch ppc -mmacosx-version-min=10.4" --disable-dependency-
tracking.

- output :
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... no
checking C++ compiler flags...... use user-supplied: /Volumes/Data/
XCode/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -mmacosx-version-
min=10.4
checking whether __SUNPRO_CC is declared... no
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld)
is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to
reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... failed
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... no
checking for dlfcn.h... no
checking whether we are using the GNU C++ compiler... (cached) no
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) none
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether the g++ linker (/usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld) supports shared libraries... no
libtool.m4: error: problem compiling CXX test program
checking for g++ option to produce PIC...  -DPIC
checking if g++ PIC flag  -DPIC works... no
checking if g++ static flag  works... no
checking if g++ supports -c -o file.o... no
checking if g++ supports -c -o file.o... (cached) no
checking whether the g++ linker (/usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld) supports shared libraries... no
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) no
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h:     check for missing prerequisite
headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: fcntl.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------------- ##
configure: WARNING:     ## Report this to prot...@googlegroups.com ##
configure: WARNING:     ## ---------------------------------------- ##
checking for fcntl.h... no
checking for inttypes.h... (cached) no
checking limits.h usability... no
checking limits.h presence... yes
configure: WARNING: limits.h: present but cannot be compiled
configure: WARNING: limits.h:     check for missing prerequisite
headers?
configure: WARNING: limits.h: see the Autoconf documentation
configure: WARNING: limits.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: limits.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------------- ##
configure: WARNING:     ## Report this to prot...@googlegroups.com ##
configure: WARNING:     ## ---------------------------------------- ##
checking for limits.h... no
checking for stdlib.h... (cached) no
checking for unistd.h... (cached) no
checking for working memcmp... no
checking for working strtod... no
checking for pow... no
checking for pow in -lm... no
configure: WARNING: cannot find library containing definition of pow
checking for ftruncate... no
checking for memset... no
checking for mkdir... no
checking for strchr... no
checking for strerror... no
checking for strtol... no
checking zlib version... headers missing or too old (requires 1.2.0.4)
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -
D_THREAD_SAFE
checking whether to check for GCC pthread/shared inconsistencies... no
checking whether what we have so far is sufficient with -nostdlib...
no
checking whether -lpthread saves the day... no
configure: WARNING: Impossible to determine how to use pthreads with
shared libraries and -nostdlib
checking the location of hash_map...
configure: WARNING: could not find an STL hash_map
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating protobuf.pc
config.status: creating protobuf-lite.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in gtest (/Users/viethuynh/downloads/protobuf-2.4.0a/
gtest)
configure: running /bin/sh ./configure --disable-option-checking '--
prefix=/usr/local'  'CXXFLAGS=/Volumes/Data/XCode/SDKs/MacOSX10.4u.sdk
-arch i386 -arch ppc -mmacosx-version-min=10.4' '--disable-dependency-
tracking' '--without-java' '--without-python' --cache-file=/dev/null --
srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld)
is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to
reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... failed
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) no
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) none
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether the g++ linker (/usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld) supports shared libraries... no
libtool.m4: error: problem compiling CXX test program
checking for g++ option to produce PIC...  -DPIC
checking if g++ PIC flag  -DPIC works... no
checking if g++ static flag  works... no
checking if g++ supports -c -o file.o... no
checking if g++ supports -c -o file.o... (cached) no
checking whether the g++ linker (/usr/libexec/gcc/i686-apple-
darwin10/4.2.1/ld) supports shared libraries... no
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for python... /usr/bin/python
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -
D_THREAD_SAFE
checking whether to check for GCC pthread/shared inconsistencies... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating scripts/gtest-config
config.status: creating build-aux/config.h
config.status: build-aux/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

----------------------------------
then,

- sudo  make :

- output:

make  all-recursive
Making all in .
Making all in src
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-I..    -D_THREAD_SAFE  -Wall -Wwrite-strings -Woverloaded-virtual -
Wno-sign-compare  /Volumes/Data/XCode/SDKs/MacOSX10.4u.sdk -arch i386 -
arch ppc -mmacosx-version-min=10.4 -c -o common.lo `test -f 'google/
protobuf/stubs/common.cc' || echo './'`google/protobuf/stubs/common.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -Wall -
Wwrite-strings -Woverloaded-virtual -Wno-sign-compare /Volumes/Data/
XCode/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -mmacosx-version-
min=10.4 -c google/protobuf/stubs/common.cc
i686-apple-darwin10-g++-4.2.1: /Volumes/Data/XCode/SDKs/
MacOSX10.4u.sdk: linker input file unused because linking not done
powerpc-apple-darwin10-g++-4.2.1: /Volumes/Data/XCode/SDKs/
MacOSX10.4u.sdk: linker input file unused because linking not done
lipo: can't figure out the architecture type of: /var/folders/KP/
KPRx7sfLG2aJErSMJTjj9U+++TI/-Tmp-//ccYxUgo9.out
make[2]: *** [common.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Does  protobuf library have support on GCC 4.0?

Thanks for help.
Cuong


--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
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.


pick_tim

unread,
Feb 22, 2011, 11:19:47 PM2/22/11
to Protocol Buffers
Ok, i missed -isysroot

./configure CXXFLAGS="-sysroot /Volumes/Data/XCode/SDKs/
MacOSX10.4u.sdk -arch i386 -arch ppc " --disable-dependency-tracking.

sudo make

then it show error:

Making all in .
Making all in src
g++ -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -Wall -Wwrite-strings -
Woverloaded-virtual -Wno-sign-compare -isysroot /Volumes/Data/XCode/
SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -c -o main.o `test -f
'google/protobuf/compiler/main.cc' || echo './'`google/protobuf/
compiler/main.cc
In file included from ./google/protobuf/compiler/
command_line_interface.h:41,
from google/protobuf/compiler/main.cc:33:
./google/protobuf/stubs/common.h:40:19: error: cstddef: No such file
or directory
./google/protobuf/stubs/common.h:41:18: error: string: No such file or
directory
In file included from google/protobuf/compiler/main.cc:33:
./google/protobuf/compiler/command_line_interface.h:43:18: error:
vector: No such file or directory
./google/protobuf/compiler/command_line_interface.h:44:15: error: map:
No such file or directory
./google/protobuf/compiler/command_line_interface.h:45:15: error: set:
No such file or directory
./google/protobuf/compiler/command_line_interface.h:46:19: error:
utility: No such file or directory
In file included from ./google/protobuf/compiler/
command_line_interface.h:41,
from google/protobuf/compiler/main.cc:33:
./google/protobuf/stubs/common.h:111: error: ‘string’ does not name a
type
./google/protobuf/stubs/common.h:533: error: declaration of
‘operator[]’ as non-function
./google/protobuf/stubs/common.h:533: error: expected ‘;’ before ‘(’
token
./google/protobuf/stubs/common.h:541: error: expected `;' before ‘C’
./google/protobuf/stubs/common.h:621: error: expected ‘,’ or ‘...’
before ‘&’ token
./google/protobuf/stubs/common.h:621: error: ISO C++ forbids
declaration of ‘string’ with no type
./google/protobuf/stubs/common.h:624: error:
‘google::protobuf::internal::LogMessage&
google::protobuf::internal::LogMessage::operator<<(int)’ cannot be
overloaded
./google/protobuf/stubs/common.h:621: error: with
‘google::protobuf::internal::LogMessage&
google::protobuf::internal::LogMessage::operator<<(int)’
./google/protobuf/stubs/common.h:637: error: ‘string’ does not name a
type
./google/protobuf/stubs/common.h:716: error: expected ‘,’ or ‘...’
before ‘&’ token
./google/protobuf/stubs/common.h:716: error: ISO C++ forbids
declaration of ‘string’ with no type
In file included from google/protobuf/compiler/main.cc:33:
./google/protobuf/compiler/command_line_interface.h:111: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:113: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:144: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:144: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:168: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:168: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:203: error:
‘string’ has not been declared
./google/protobuf/compiler/command_line_interface.h:203: error:
‘string’ has not been declared
./google/protobuf/compiler/command_line_interface.h:206: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:206: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:213: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:215: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:216: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:220: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:226: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:226: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:236: error: ‘set’
has not been declared
./google/protobuf/compiler/command_line_interface.h:236: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:242: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:245: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:250: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:252: error: ISO C+
+ forbids declaration of ‘map’ with no type
./google/protobuf/compiler/command_line_interface.h:252: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:253: error:
‘GeneratorMap’ does not name a type
./google/protobuf/compiler/command_line_interface.h:256: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:261: error: ISO C+
+ forbids declaration of ‘map’ with no type
./google/protobuf/compiler/command_line_interface.h:261: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:279: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:279: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:280: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:280: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:285: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:287: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:288: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:290: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:290: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:294: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:298: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h: In member
function ‘void
google::protobuf::compiler::CommandLineInterface::SetVersionInfo(int)’:
./google/protobuf/compiler/command_line_interface.h:169: error:
‘version_info_’ was not declared in this scope
./google/protobuf/compiler/command_line_interface.h:169: error: ‘text’
was not declared in this scope
In file included from ./google/protobuf/compiler/cpp/cpp_generator.h:
41,
from google/protobuf/compiler/main.cc:34:
./google/protobuf/compiler/code_generator.h: At global scope:
./google/protobuf/compiler/code_generator.h:78: error: expected ‘,’ or
‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:80: error: ISO C++ forbids
declaration of ‘string’ with no type
./google/protobuf/compiler/code_generator.h:104: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:104: error: ISO C++
forbids declaration of ‘string’ with no type
./google/protobuf/compiler/code_generator.h:113: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:113: error: ISO C++
forbids declaration of ‘string’ with no type
./google/protobuf/compiler/code_generator.h:125: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:126: error: ISO C++
forbids declaration of ‘string’ with no type
In file included from google/protobuf/compiler/main.cc:34:
./google/protobuf/compiler/cpp/cpp_generator.h:59: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/cpp/cpp_generator.h:61: error: ISO C++
forbids declaration of ‘string’ with no type
In file included from google/protobuf/compiler/main.cc:35:
./google/protobuf/compiler/python/python_generator.h:68: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/python/python_generator.h:70: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/python/python_generator.h:87: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/python/python_generator.h:89: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/python/python_generator.h:106: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/python/python_generator.h:106: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/python/python_generator.h:107: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:126: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:131: error:
expected constructor, destructor, or type conversion before
‘ModuleLevelDescriptorName’
./google/protobuf/compiler/python/python_generator.h:132: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:133: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:144: error:
‘string’ does not name a type
In file included from google/protobuf/compiler/main.cc:36:
./google/protobuf/compiler/java/java_generator.h:59: error: expected
‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/java/java_generator.h:61: error: ISO C++
forbids declaration of ‘string’ with no type
google/protobuf/compiler/main.cc: In function ‘int main(int, char**)’:
google/protobuf/compiler/main.cc:42: error: invalid conversion from
‘const char*’ to ‘int’
google/protobuf/compiler/main.cc:42: error: initializing argument 1
of ‘void
google::protobuf::compiler::CommandLineInterface::AllowPlugins(int)’
google/protobuf/compiler/main.cc:47: error: no matching function for
call to
‘google::protobuf::compiler::CommandLineInterface::RegisterGenerator(const
char [10], google::protobuf::compiler::cpp::CppGenerator*, const char
[32])’
./google/protobuf/compiler/command_line_interface.h:113: note:
candidates are: void
google::protobuf::compiler::CommandLineInterface::RegisterGenerator(int)
google/protobuf/compiler/main.cc:52: error: no matching function for
call to
‘google::protobuf::compiler::CommandLineInterface::RegisterGenerator(const
char [11], google::protobuf::compiler::java::JavaGenerator*, const
char [27])’
./google/protobuf/compiler/command_line_interface.h:113: note:
candidates are: void
google::protobuf::compiler::CommandLineInterface::RegisterGenerator(int)
google/protobuf/compiler/main.cc:58: error: no matching function for
call to
‘google::protobuf::compiler::CommandLineInterface::RegisterGenerator(const
char [13], google::protobuf::compiler::python::Generator*, const char
[29])’
./google/protobuf/compiler/command_line_interface.h:113: note:
candidates are: void
google::protobuf::compiler::CommandLineInterface::RegisterGenerator(int)
In file included from ./google/protobuf/compiler/
command_line_interface.h:41,
from google/protobuf/compiler/main.cc:33:
./google/protobuf/stubs/common.h:40:19: error: cstddef: No such file
or directory
./google/protobuf/stubs/common.h:41:18: error: string: No such file or
directory
In file included from google/protobuf/compiler/main.cc:33:
./google/protobuf/compiler/command_line_interface.h:43:18: error:
vector: No such file or directory
./google/protobuf/compiler/command_line_interface.h:44:15: error: map:
No such file or directory
./google/protobuf/compiler/command_line_interface.h:45:15: error: set:
No such file or directory
./google/protobuf/compiler/command_line_interface.h:46:19: error:
utility: No such file or directory
In file included from ./google/protobuf/compiler/
command_line_interface.h:41,
from google/protobuf/compiler/main.cc:33:
./google/protobuf/stubs/common.h:111: error: ‘string’ does not name a
type
./google/protobuf/stubs/common.h:533: error: declaration of
‘operator[]’ as non-function
./google/protobuf/stubs/common.h:533: error: expected ‘;’ before ‘(’
token
./google/protobuf/stubs/common.h:541: error: expected `;' before ‘C’
./google/protobuf/stubs/common.h:621: error: expected ‘,’ or ‘...’
before ‘&’ token
./google/protobuf/stubs/common.h:621: error: ISO C++ forbids
declaration of ‘string’ with no type
./google/protobuf/stubs/common.h:624: error:
‘google::protobuf::internal::LogMessage&
google::protobuf::internal::LogMessage::operator<<(int)’ cannot be
overloaded
./google/protobuf/stubs/common.h:621: error: with
‘google::protobuf::internal::LogMessage&
google::protobuf::internal::LogMessage::operator<<(int)’
./google/protobuf/stubs/common.h:637: error: ‘string’ does not name a
type
./google/protobuf/stubs/common.h:716: error: expected ‘,’ or ‘...’
before ‘&’ token
./google/protobuf/stubs/common.h:716: error: ISO C++ forbids
declaration of ‘string’ with no type
In file included from google/protobuf/compiler/main.cc:33:
./google/protobuf/compiler/command_line_interface.h:111: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:113: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:144: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:144: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:168: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:168: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:203: error:
‘string’ has not been declared
./google/protobuf/compiler/command_line_interface.h:203: error:
‘string’ has not been declared
./google/protobuf/compiler/command_line_interface.h:206: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/command_line_interface.h:206: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/command_line_interface.h:213: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:215: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:216: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:220: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:226: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:226: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:236: error: ‘set’
has not been declared
./google/protobuf/compiler/command_line_interface.h:236: error:
expected ‘,’ or ‘...’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:242: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:245: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:250: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:252: error: ISO C+
+ forbids declaration of ‘map’ with no type
./google/protobuf/compiler/command_line_interface.h:252: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:253: error:
‘GeneratorMap’ does not name a type
./google/protobuf/compiler/command_line_interface.h:256: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:261: error: ISO C+
+ forbids declaration of ‘map’ with no type
./google/protobuf/compiler/command_line_interface.h:261: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:279: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:279: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:280: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:280: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:285: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:287: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:288: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:290: error: ISO C+
+ forbids declaration of ‘vector’ with no type
./google/protobuf/compiler/command_line_interface.h:290: error:
expected ‘;’ before ‘<’ token
./google/protobuf/compiler/command_line_interface.h:294: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h:298: error:
‘string’ does not name a type
./google/protobuf/compiler/command_line_interface.h: In member
function ‘void
google::protobuf::compiler::CommandLineInterface::SetVersionInfo(int)’:
./google/protobuf/compiler/command_line_interface.h:169: error:
‘version_info_’ was not declared in this scope
./google/protobuf/compiler/command_line_interface.h:169: error: ‘text’
was not declared in this scope
In file included from ./google/protobuf/compiler/cpp/cpp_generator.h:
41,
from google/protobuf/compiler/main.cc:34:
./google/protobuf/compiler/code_generator.h: At global scope:
./google/protobuf/compiler/code_generator.h:78: error: expected ‘,’ or
‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:80: error: ISO C++ forbids
declaration of ‘string’ with no type
./google/protobuf/compiler/code_generator.h:104: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:104: error: ISO C++
forbids declaration of ‘string’ with no type
./google/protobuf/compiler/code_generator.h:113: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:113: error: ISO C++
forbids declaration of ‘string’ with no type
./google/protobuf/compiler/code_generator.h:125: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/code_generator.h:126: error: ISO C++
forbids declaration of ‘string’ with no type
In file included from google/protobuf/compiler/main.cc:34:
./google/protobuf/compiler/cpp/cpp_generator.h:59: error: expected ‘,’
or ‘...’ before ‘&’ token
./google/protobuf/compiler/cpp/cpp_generator.h:61: error: ISO C++
forbids declaration of ‘string’ with no type
In file included from google/protobuf/compiler/main.cc:35:
./google/protobuf/compiler/python/python_generator.h:68: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/python/python_generator.h:70: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/python/python_generator.h:87: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/python/python_generator.h:89: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/python/python_generator.h:106: error:
expected ‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/python/python_generator.h:106: error: ISO C+
+ forbids declaration of ‘string’ with no type
./google/protobuf/compiler/python/python_generator.h:107: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:126: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:131: error:
expected constructor, destructor, or type conversion before
‘ModuleLevelDescriptorName’
./google/protobuf/compiler/python/python_generator.h:132: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:133: error:
‘string’ does not name a type
./google/protobuf/compiler/python/python_generator.h:144: error:
‘string’ does not name a type
In file included from google/protobuf/compiler/main.cc:36:
./google/protobuf/compiler/java/java_generator.h:59: error: expected
‘,’ or ‘...’ before ‘&’ token
./google/protobuf/compiler/java/java_generator.h:61: error: ISO C++
forbids declaration of ‘string’ with no type
google/protobuf/compiler/main.cc: In function ‘int main(int, char**)’:
google/protobuf/compiler/main.cc:42: error: invalid conversion from
‘const char*’ to ‘int’
google/protobuf/compiler/main.cc:42: error: initializing argument 1
of ‘void
google::protobuf::compiler::CommandLineInterface::AllowPlugins(int)’
google/protobuf/compiler/main.cc:47: error: no matching function for
call to
‘google::protobuf::compiler::CommandLineInterface::RegisterGenerator(const
char [10], google::protobuf::compiler::cpp::CppGenerator*, const char
[32])’
./google/protobuf/compiler/command_line_interface.h:113: note:
candidates are: void
google::protobuf::compiler::CommandLineInterface::RegisterGenerator(int)
google/protobuf/compiler/main.cc:52: error: no matching function for
call to
‘google::protobuf::compiler::CommandLineInterface::RegisterGenerator(const
char [11], google::protobuf::compiler::java::JavaGenerator*, const
char [27])’
./google/protobuf/compiler/command_line_interface.h:113: note:
candidates are: void
google::protobuf::compiler::CommandLineInterface::RegisterGenerator(int)
google/protobuf/compiler/main.cc:58: error: no matching function for
call to
‘google::protobuf::compiler::CommandLineInterface::RegisterGenerator(const
char [13], google::protobuf::compiler::python::Generator*, const char
[29])’
./google/protobuf/compiler/command_line_interface.h:113: note:
candidates are: void
google::protobuf::compiler::CommandLineInterface::RegisterGenerator(int)
lipo: can't figure out the architecture type of: /var/tmp//
cca8Rfap.out

Any helps is appreciated.
Thanks,
Cuong



On Feb 23, 1:14 am, Kenton Varda <ken...@google.com> wrote:
> From the error message, it seems like GCC doesn't like being passed
> "/Volumes/Data/XCode/SDKs/MacOSX10.4u.sdk" in CXXFLAGS.  Are you sure this
> is needed at all?  If so, maybe this should be passed as LIBS or LDFLAGS
> instead?
>

pick_tim

unread,
Feb 22, 2011, 6:50:34 AM2/22/11
to Protocol Buffers
Reply all
Reply to author
Forward
0 new messages