Re-opening a very old thread here! I am trying to build protocol buffers 2.3.0 on solaris using CC: Sun C++ 5.7 2005/03/01.
The configure command I have used is: ./configure --prefix=/usr/local/protobuf-2.2.0 --without-zlib --disable-64bit-solaris CFLAGS=-m32 PROTOBUF_OPT_FLAG=-O3 CXXFLAGS="-m32 -g -DNDEBUG -fno-exceptions -library=stlport4 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=Crun -template=no%extdef" LDFLAGS=-m32 I get a fair way through on the compilation but then get the unexpected type errors as above, even though I am using stlport4 - my error output is: libtool: compile: CC -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -O3 -m32 -g -DNDEBUG -fno-exceptions -library=stlport4 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=Crun -template=no%extdef -c google/protobuf/descriptor.cc CC: Warning: Option -m32 passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored otherwise "./google/protobuf/descriptor.h", line 324: Warning: Identifier expected instead of "}". "./google/protobuf/descriptor.h", line 343: Warning: Identifier expected instead of "}". "./google/protobuf/descriptor.h", line 354: Warning: Identifier expected instead of "}". "./google/protobuf/descriptor.pb.h", line 87: Error: Unexpected type name "google::protobuf::FieldDescriptorProto_Type" encountered. "./google/protobuf/descriptor.pb.h", line 107: Error: Unexpected type name "google::protobuf::FieldDescriptorProto_Label" encountered. "./google/protobuf/descriptor.pb.h", line 127: Error: Unexpected type name "google::protobuf::FileOptions_OptimizeMode" encountered. "./google/protobuf/descriptor.pb.h", line 147: Error: Unexpected type name "google::protobuf::FieldOptions_CType" encountered. "./google/protobuf/wire_format_lite.h", line 95: Warning: Identifier expected instead of "}". "./google/protobuf/wire_format_lite.h", line 118: Warning: Identifier expected instead of "}". "./google/protobuf/wire_format_lite.h", line 133: Warning: Identifier expected instead of "}". "./google/protobuf/wire_format.h", line 227: Warning: Identifier expected instead of "}". "./google/protobuf/stubs/once.h", line 115: Warning (Anachronism): Formal argument 2 of type extern "C" void(*)() in call to pthread_once(_once*, extern "C" void(*)()) is being passed void(*)(). 4 Error(s) and 8 Warning(s) detected. *** Error code 1 make: Fatal error: Command failed for target `descriptor.lo' Can anyone offer any ideas on what I need to do to get this sorted out? Thanks. On Wednesday, 11 November 2009 22:55:02 UTC, Monty Taylor wrote: > > I use 2.1.0 on solaris with sun studio compiler all the time. The thing > is, you cannot use Cstd, you must use stlport4. I already have the protobuf > configure script injecting the CXXFLAGS for that, but if you are overriding > them, it's gonna get ugly. Grep through the m4 files for stlport4 and you > should see what they are (I'm on a plane else I would paste the flags you > need) > > If there is another issue here, I'll be interested to hear about it. If > that doesn't fix it, could you show the entire compiler invocation line? > > "Kenton Varda" <[email protected] <javascript:>> wrote: > > >The warnings look harmless (it's complaining about the trailing comma > after > >the last value in an enum). > > > >The errors suggest that your compiler is not very good with templates. > The > >line of code is: > > > > return > >::google::protobuf::internal::ParseNamedEnum<FieldDescriptorProto_Type>( > > > >Apparently your compiler doesn't recognize that ParseNamedEnum is a > >template. What compiler are you using? > > > >On Mon, Nov 9, 2009 at 7:27 PM, vikram <[email protected] <javascript:>> > wrote: > > > >> > >> > >> Hello Guys, > >> > >> I have generated protocol buffer header files and source files > >> from proto and compiled those with include files on linux without any > >> issues. Here I am trying to use same source files with same include > >> directory but on solaris so I have encountered following problems. > >> Does anyone have same issues while working with protobuf 2.1.0 > >> > >> (*)() in call to pthread_once(_once*, extern "C" void(*)()) is being > >> passed void(*)(). > >> "/work/$$$$/SunBuild/Server/../Tools/protobuf/include/google/protobuf/ > >> descriptor.h", line 324: Warning: Identifier expected instead of "}". > >> "/work/$$$$/SunBuild/Server/../Tools/protobuf/include/google/protobuf/ > >> descriptor.h", line 343: Warning: Identifier expected instead of "}". > >> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/ > >> protobuf/descriptor.h", line 354: Warning: Identifier expected instead > >> of "}". > >> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/ > >> protobuf/wire_format.h", line 177: Warning: Identifier expected > >> instead of "}". > >> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/ > >> protobuf/descriptor.pb.h", line 83: Error: Unexpected type name > >> "google::protobuf::FieldDescriptorProto_Type" encountered. > >> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/ > >> protobuf/descriptor.pb.h", line 102: Error: Unexpected type name > >> "google::protobuf::FieldDescriptorProto_Label" encountered. > >> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/ > >> protobuf/descriptor.pb.h", line 120: Error: Unexpected type name > >> "google::protobuf::FileOptions_OptimizeMode" encountered. > >> "/work//$$$$//SunBuild/Server/../Tools/protobuf/include/google/ > >> protobuf/descriptor.pb.h", line 138: Error: Unexpected type name > >> "google::protobuf::FieldOptions_CType" encountered. > >> 4 Error(s) and 5 Warning(s) detected. > >> > >> Thanks & Regards, > >> Vikram > >> > > >> > > > >> > > Sent from my Android phone with K-9. Please excuse my brevity. > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
