Could you try to narrow it down to one file or the other? The atomicops.h header <https://github.com/google/protobuf/blob/ce5160b83b03c29fd27fc9f58370092b321bf2bc/src/google/protobuf/stubs/atomicops.h#L195> pulls in the right atomic operations implementation based on the platform, so with a little debugging it should be possible to see whether it's pulling the _power.h implementation or the _ppc_gcc.h implementation for your build.
On Wed, Nov 9, 2016 at 6:59 AM, Bob Wilkinson <[email protected]> wrote: > I am trying to build version 3.1 of the cpp protobuffer on AIX (with g++) > and see the build fail. I think it is due to incorrect inline assembler > code in google/protobuf/stubs/atomicops_internals_power.h or > google/protobuf/stubs/atomicops_internals_ppc_gcc.h? > > bash-4.4$ cd - > /home/bob/src/protobuf-3.1.0/src > bash-4.4$ make > depbase=`echo google/protobuf/stubs/common.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/common.lo -MD > -MP -MF $depbase.Tpo -c -o google/protobuf/stubs/common.lo > google/protobuf/stubs/common.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/common.lo -MD -MP -MF > google/protobuf/stubs/.deps/common.Tpo > -c google/protobuf/stubs/common.cc -DPIC -o google/protobuf/stubs/.libs/ > common.o > Assembler: > /tmp//ccSswhyP.s: line 2762: Error In Syntax > /tmp//ccSswhyP.s: line 2764: Error In Syntax > /tmp//ccSswhyP.s: line 6784: Error In Syntax > /tmp//ccSswhyP.s: line 6786: Error In Syntax > /tmp//ccSswhyP.s: line 8729: Error In Syntax > /tmp//ccSswhyP.s: line 8731: Error In Syntax > /tmp//ccSswhyP.s: line 8911: Error In Syntax > /tmp//ccSswhyP.s: line 8913: Error In Syntax > /tmp//ccSswhyP.s: line 9144: Error In Syntax > /tmp//ccSswhyP.s: line 9146: Error In Syntax > /tmp//ccSswhyP.s: line 9745: Error In Syntax > /tmp//ccSswhyP.s: line 9747: Error In Syntax > Makefile:3922: recipe for target 'google/protobuf/stubs/common.lo' failed > make: *** [google/protobuf/stubs/common.lo] Error 1 > bash-4.4$ 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/common.lo -MD -MP -MF > google/protobuf/stubs/.deps/common.Tpo > -S google/protobuf/stubs/common.cc -DPIC -o google/protobuf/stubs/.libs/ > common.s > bash-4.4$ as -a64 google/protobuf/stubs/.libs/common.s > Assembler: > google/protobuf/stubs/.libs/common.s: line 2762: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 2764: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 6784: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 6786: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8729: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8731: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8911: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8913: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9144: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9146: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9745: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9747: 1252-142 Syntax error. > bash-4.4$ cd - > /home/bob/src/protobuf-3.1.0/src > bash-4.4$ make > depbase=`echo google/protobuf/stubs/common.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/common.lo -MD > -MP -MF $depbase.Tpo -c -o google/protobuf/stubs/common.lo > google/protobuf/stubs/common.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/common.lo -MD -MP -MF > google/protobuf/stubs/.deps/common.Tpo > -c google/protobuf/stubs/common.cc -DPIC -o google/protobuf/stubs/.libs/ > common.o > Assembler: > /tmp//ccSswhyP.s: line 2762: Error In Syntax > /tmp//ccSswhyP.s: line 2764: Error In Syntax > /tmp//ccSswhyP.s: line 6784: Error In Syntax > /tmp//ccSswhyP.s: line 6786: Error In Syntax > /tmp//ccSswhyP.s: line 8729: Error In Syntax > /tmp//ccSswhyP.s: line 8731: Error In Syntax > /tmp//ccSswhyP.s: line 8911: Error In Syntax > /tmp//ccSswhyP.s: line 8913: Error In Syntax > /tmp//ccSswhyP.s: line 9144: Error In Syntax > /tmp//ccSswhyP.s: line 9146: Error In Syntax > /tmp//ccSswhyP.s: line 9745: Error In Syntax > /tmp//ccSswhyP.s: line 9747: Error In Syntax > Makefile:3922: recipe for target 'google/protobuf/stubs/common.lo' failed > make: *** [google/protobuf/stubs/common.lo] Error 1 > > Looking at the generated assembler code ... > > bash-4.4$ 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/common.lo -MD -MP -MF > google/protobuf/stubs/.deps/common.Tpo > -S google/protobuf/stubs/common.cc -DPIC -o google/protobuf/stubs/.libs/ > common.s > bash-4.4$ as -a64 google/protobuf/stubs/.libs/common.s > Assembler: > google/protobuf/stubs/.libs/common.s: line 2762: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 2764: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 6784: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 6786: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8729: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8731: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8911: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 8913: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9144: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9146: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9745: 1252-142 Syntax error. > google/protobuf/stubs/.libs/common.s: line 9747: 1252-142 Syntax error. > bash-4.4$ sed -n -e '9745,9747p' google/protobuf/stubs/.libs/common.s > 1: lwz 9, 12(31) > cmpw 9, 9 > bne- 1b > bash-4.4$ grep -l bne- google/protobuf/stubs/*.h > google/protobuf/stubs/atomicops_internals_power.h > google/protobuf/stubs/atomicops_internals_ppc_gcc.h > bash-4.4$ > > -- > 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 https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- 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 https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
