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