I got the following as error after doing a fresh clone and fresh build in
the following case for RISCV . The error also persist while building for
X86 and ARM
scons build/RISCV/gem5.opt -j4

In file included from build/RISCV/mem/probes/mem_trace.cc:46:0:
build/RISCV/proto/packet.pb.h:324:6: error:
"PROTOBUF_INLINE_NOT_IN_HEADERS" is not defined [-Werror=undef]
 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
scons: *** [build/RISCV/mem/probes/mem_trace.o] Error 1
scons: building terminated because of errors.

The above error can be rectified by making the following changes in
SConstruct file in the root of repo

@@ -652,7 +652,7 @@
     # Enable -Wall and -Wextra and then disable the few warnings that
     # we consistently violate
     main.Append(CCFLAGS=['-Wall', '-Wundef', '-Wextra',
-                         '-Wno-sign-compare', '-Wno-unused-parameter'])
+                         '-Wno-sign-compare',
'-Wno-unused-parameter','-DPROTOBUF_INLINE_NOT_IN_HEADERS=0'])
     # We always compile using C++11
     main.Append(CXXFLAGS=['-std=c++11'])

For more context on the above error
http://stackoverflow.com/questions/34474091/protobuf-inline-not-in-headers/34485004#34485004

https://github.com/Open-Transactions/opentxs/issues/647

I request to please verify the above changes by compiling it on Ubuntu
16.10 and make the appropriate changes to SConscript since it might save
some time for new non MAC users.

I also checked that version of libprotobuf-dev and other associated
packages installed on my system is the latest from
https://launchpad.net/ubuntu/+source/protobuf
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to