protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Preprocessor error on OSX with 3.2.0rc2

Open yingzong opened this issue 9 years ago • 2 comments

Output of make:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in .
make[2]: Nothing to be done for `all-am'.
Making all in src
depbase=`echo google/protobuf/compiler/main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	g++ -DHAVE_CONFIG_H -I. -I..    -D_THREAD_SAFE  -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -DNDEBUG -MT google/protobuf/compiler/main.o -MD -MP -MF $depbase.Tpo -c -o google/protobuf/compiler/main.o google/protobuf/compiler/main.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo google/protobuf/stubs/atomicops_internals_x86_gcc.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -D_THREAD_SAFE  -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -DNDEBUG -MT google/protobuf/stubs/atomicops_internals_x86_gcc.lo -MD -MP -MF $depbase.Tpo -c -o google/protobuf/stubs/atomicops_internals_x86_gcc.lo google/protobuf/stubs/atomicops_internals_x86_gcc.cc &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -DNDEBUG -MT google/protobuf/stubs/atomicops_internals_x86_gcc.lo -MD -MP -MF google/protobuf/stubs/.deps/atomicops_internals_x86_gcc.Tpo -c google/protobuf/stubs/atomicops_internals_x86_gcc.cc  -fno-common -DPIC -o google/protobuf/stubs/.libs/atomicops_internals_x86_gcc.o
In file included from google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:0:
./google/protobuf/stubs/atomicops.h:199:18: error: missing binary operator before token "("
 #if __has_feature(cxx_atomic) || _GNUC_VER >= 407
                  ^
make[2]: *** [google/protobuf/stubs/atomicops_internals_x86_gcc.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

OS info: 14.5.0 Darwin Kernel Version 14.5.0: Sun Sep 25 22:07:15 PDT 2016; root:xnu-2782.50.9~1/RELEASE_X86_64 x86_64

build tools are from MacPorts

This does not occur on release 3.1.0.

yingzong avatar Jan 25 '17 00:01 yingzong

http://stackoverflow.com/questions/26527077/compiling-with-accelerate-framework-on-osx-yosemite Could you try using clang to build it?

TeBoring avatar Jan 25 '17 00:01 TeBoring

clang works, thanks.

yingzong avatar Jan 25 '17 01:01 yingzong