Hello,
I try to build latest gem5 master branch from github but get the error below
with protobuf
In file included from build/X86/cpu/o3/probe/elastic_trace.hh:61:0,
from build/X86/cpu/o3/probe/elastic_trace.cc:42:
build/X86/proto/inst_dep_record.pb.h:453:6: error:
"PROTOBUF_INLINE_NOT_IN_HEADERS" is not defined [-Werror=undef]
#if !PROTOBUF_INLINE_NOT_IN_HEADERS
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from build/X86/cpu/o3/probe/elastic_trace.hh:62:0,
from build/X86/cpu/o3/probe/elastic_trace.cc:42:
build/X86/proto/packet.pb.h:335: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/X86/cpu/o3/probe/elastic_trace.o] Error 1
scons: building terminated because of errors.
Trying to fix the above with a change like below
https://github.com/SanchayanMaity/gem5/commit/a8cf9e1fc6e840e83721b41b1a7ac6badeccef43
which I found in some earlier post on gem5 ML, then gives me the following error
<snip>
[ TRACING] -> X86/debug/ThermalDomain.hh
[ CXX] X86/sim/power/thermal_domain.cc -> .o
[SO PARAM] ThermalNode -> X86/params/ThermalNode.hh
[ CXX] X86/sim/power/thermal_model.cc -> .o
[ CXX] X86/python/swig/pyevent.cc -> .o
In file included from /usr/include/python2.7/Python.h:8:0,
from build/X86/sim/init.hh:34,
from build/X86/python/swig/pyevent.hh:35,
from build/X86/python/swig/pyevent.cc:31:
/usr/include/python2.7/pyconfig.h:1190:0: error: "_POSIX_C_SOURCE" redefined
[-Werror]
#define _POSIX_C_SOURCE 200112L
In file included from
/usr/include/c++/6.3.1/x86_64-pc-linux-gnu/bits/os_defines.h:39:0,
from
/usr/include/c++/6.3.1/x86_64-pc-linux-gnu/bits/c++config.h:507,
from /usr/include/c++/6.3.1/utility:68,
from /usr/include/c++/6.3.1/algorithm:60,
from build/X86/sim/eventq.hh:41,
from build/X86/python/swig/pyevent.hh:34,
from build/X86/python/swig/pyevent.cc:31:
/usr/include/features.h:225:0: note: this is the location of the previous
definition
# define _POSIX_C_SOURCE 200809L
In file included from /usr/include/python2.7/Python.h:8:0,
from build/X86/sim/init.hh:34,
from build/X86/python/swig/pyevent.hh:35,
from build/X86/python/swig/pyevent.cc:31:
/usr/include/python2.7/pyconfig.h:1212:0: error: "_XOPEN_SOURCE" redefined
[-Werror]
#define _XOPEN_SOURCE 600
In file included from
/usr/include/c++/6.3.1/x86_64-pc-linux-gnu/bits/os_defines.h:39:0,
from
/usr/include/c++/6.3.1/x86_64-pc-linux-gnu/bits/c++config.h:507,
from /usr/include/c++/6.3.1/utility:68,
from /usr/include/c++/6.3.1/algorithm:60,
from build/X86/sim/eventq.hh:41,
from build/X86/python/swig/pyevent.hh:34,
from build/X86/python/swig/pyevent.cc:31:
/usr/include/features.h:166:0: note: this is the location of the previous
definition
# define _XOPEN_SOURCE 700
cc1plus: all warnings being treated as errors
scons: *** [build/X86/python/swig/pyevent.o] Error 1
scons: building terminated because of errors.
I use Arch Linux with gcc 6.3.1 with below protobuf libs installed
libprotobuf-c.so
libprotobuf-c.so.1
libprotobuf-c.so.1.0.0
libprotobuf-lite.so
libprotobuf-lite.so.11
libprotobuf-lite.so.11.0.0
libprotobuf.so
libprotobuf.so.11
libprotobuf.so.11.0.0
While I have a working gem5 branch which has top commit as
commit 1738a7d2601ba757ae6ab36f0549a50396d73e45
Author: Andreas Sandberg <[email protected]>
Date: Tue Jan 3 17:31:39 2017 +0000
sim: Remove declaration of unused CountedDrainEvent
and then the patch to fix build issue on Arch Linux I shared
earlier.
So this is not a critical issue for me but I did like to know if
someone else faced the same issue and if there is a known simple
fix to this.
Thanks for your help and listening.
Regards,
Sanchayan.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users