I got compile errors when compiling the code. It seems two MACROs are
redefined, _POSIX_C_SOURCE and _XOPEN_SOURCE. How to fix this problem?
SWIG Version 2.0.11
Python 2.7.3
scons: Reading SConscript files ...
Warning: Protocol buffer compiler (protoc) not found.
Please install protobuf-compiler for tracing support.
Checking for C header file Python.h... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None...
(cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt...
(cached) yes
Checking for C library tcmalloc... (cached) no
Checking for C library tcmalloc_minimal... (cached) no
You can get a 12% performance improvement by installing tcmalloc
(libgoogle-perftools-dev package on Ubuntu or RedHat).
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None... (cached)
yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file linux/kvm.h... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Building in /home/gaojin/gem5-git/build/POWER
Variables file /home/gaojin/gem5-git/build/variables/POWER not found,
using defaults in /home/gaojin/gem5-git/build_opts/POWER
Info: KVM support disabled due to unsupported host and target ISA combination
scons: done reading SConscript files.
scons: Building targets ...
[ISA DESC] POWER/arch/power/isa/main.isa -> generated/inc.d
[NEW DEPS] POWER/arch/power/generated/inc.d -> power-deps
[ENVIRONS] power-deps -> power-environs
[ CXX] POWER/sim/main.cc -> .o
[ TRACING] -> POWER/debug/Event.hh
[ CXX] POWER/python/swig/pyevent.cc -> .o
In file included from /usr/local/include/python2.7/Python.h:8:0,
from build/POWER/sim/init.hh:34,
from build/POWER/python/swig/pyevent.hh:35,
from build/POWER/python/swig/pyevent.cc:31:
/usr/local/include/python2.7/pyconfig.h:1161:0: error: "_POSIX_C_SOURCE"
redefined [-Werror]
#define _POSIX_C_SOURCE 200112L
^
In file included from
/usr/include/x86_64-linux-gnu/c++/4.8/bits/os_defines.h:39:0,
from
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h:426,
from /usr/include/c++/4.8/utility:68,
from /usr/include/c++/4.8/algorithm:60,
from build/POWER/sim/eventq.hh:41,
from build/POWER/python/swig/pyevent.hh:34,
from build/POWER/python/swig/pyevent.cc:31:
/usr/include/features.h:230:0: note: this is the location of the previous
definition
# define _POSIX_C_SOURCE 200809L
^
In file included from /usr/local/include/python2.7/Python.h:8:0,
from build/POWER/sim/init.hh:34,
from build/POWER/python/swig/pyevent.hh:35,
from build/POWER/python/swig/pyevent.cc:31:
/usr/local/include/python2.7/pyconfig.h:1183:0: error: "_XOPEN_SOURCE"
redefined [-Werror]
#define _XOPEN_SOURCE 600
^
In file included from
/usr/include/x86_64-linux-gnu/c++/4.8/bits/os_defines.h:39:0,
from
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h:426,
from /usr/include/c++/4.8/utility:68,
from /usr/include/c++/4.8/algorithm:60,
from build/POWER/sim/eventq.hh:41,
from build/POWER/python/swig/pyevent.hh:34,
from build/POWER/python/swig/pyevent.cc:31:
/usr/include/features.h:162:0: note: this is the location of the previous
definition
# define _XOPEN_SOURCE 700
^
cc1plus: all warnings being treated as errors
scons: *** [build/POWER/python/swig/pyevent.o] Error 1
scons: building terminated because of errors.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users