Hi all.
I'm having a hard time due to scons building errors. Thanks in advance for your
help!I am using CentOS 6.9, gcc 4.9.2, python 2.7.12 and swig 3.0.12.When I was
typed "scons build/ARM/gem5.opt", The build aborts with the following error:
scons: Building targets ...
[NEW DEPS] ARM/arch/arm/generated/inc.d -> arm-deps
[ENVIRONS] arm-deps -> arm-environs
[ CXX] ARM/sim/main.cc -> .o
In file included from ext/pybind11/include/pybind11/cast.h:13:0,
from ext/pybind11/include/pybind11/attr.h:13,
from ext/pybind11/include/pybind11/pybind11.h:36,
from build/ARM/sim/init.hh:46,
from build/ARM/sim/main.cc:33:
ext/pybind11/include/pybind11/pytypes.h: In member function 'bool
pybind11::capsule::check() const':
ext/pybind11/include/pybind11/pytypes.h:681:78: error: 'PyCapsule_CheckExact'
was not declared in this scope
bool check() const { return m_ptr != nullptr && (bool)
CheckFun(m_ptr); } \
^
ext/pybind11/include/pybind11/pytypes.h:690:5: note: in expansion of macro
'PYBIND11_OBJECT_COMMON'
PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun) \
^
ext/pybind11/include/pybind11/pytypes.h:696:5: note: in expansion of macro
'PYBIND11_OBJECT'
PYBIND11_OBJECT(Name, Parent, CheckFun) \
^
ext/pybind11/include/pybind11/pytypes.h:1004:5: note: in expansion of macro
'PYBIND11_OBJECT_DEFAULT'
PYBIND11_OBJECT_DEFAULT(capsule, object, PyCapsule_CheckExact)
^
ext/pybind11/include/pybind11/pytypes.h: In static member function 'static bool
pybind11::capsule::check_(pybind11::handle)':
ext/pybind11/include/pybind11/pytypes.h:682:85: error: 'PyCapsule_CheckExact'
was not declared in this scope
static bool check_(handle h) { return h.ptr() != nullptr &&
CheckFun(h.ptr()); }
^
ext/pybind11/include/pybind11/pytypes.h:690:5: note: in expansion of macro
'PYBIND11_OBJECT_COMMON'
PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun) \
^
ext/pybind11/include/pybind11/pytypes.h:696:5: note: in expansion of macro
'PYBIND11_OBJECT'
PYBIND11_OBJECT(Name, Parent, CheckFun) \
^
ext/pybind11/include/pybind11/pytypes.h:1004:5: note: in expansion of macro
'PYBIND11_OBJECT_DEFAULT'
PYBIND11_OBJECT_DEFAULT(capsule, object, PyCapsule_CheckExact)
^
In file included from ext/pybind11/include/pybind11/cast.h:13:0,
from ext/pybind11/include/pybind11/attr.h:13,
from ext/pybind11/include/pybind11/pybind11.h:36,
from build/ARM/sim/init.hh:46,
from build/ARM/sim/main.cc:33:
ext/pybind11/include/pybind11/pytypes.h: In constructor
'pybind11::capsule::capsule(const void*)':
ext/pybind11/include/pybind11/pytypes.h:1009:75: error: 'PyCapsule_New' was not
declared in this scope
: object(PyCapsule_New(const_cast<void *>(value), nullptr,
nullptr), stolen) {
^
ext/pybind11/include/pybind11/pytypes.h: In constructor
'pybind11::capsule::capsule(const void*, void (*)(PyObject*))':
ext/pybind11/include/pybind11/pytypes.h:1016:75: error: 'PyCapsule_New' was not
declared in this scope
: object(PyCapsule_New(const_cast<void*>(value), nullptr,
destruct), stolen) {
^
ext/pybind11/include/pybind11/pytypes.h: In lambda function:
ext/pybind11/include/pybind11/pytypes.h:1023:88: error: 'PyCapsule_GetContext'
was not declared in this scope
auto destructor = reinterpret_cast<void (*)(void
*)>(PyCapsule_GetContext(o));
^
ext/pybind11/include/pybind11/pytypes.h:1024:56: error: 'PyCapsule_GetPointer'
was not declared in this scope
void *ptr = PyCapsule_GetPointer(o, nullptr);
^
ext/pybind11/include/pybind11/pytypes.h: In constructor
'pybind11::capsule::capsule(const void*, void (*)(void*))':
ext/pybind11/include/pybind11/pytypes.h:1026:10: error: 'PyCapsule_New' was not
declared in this scope
});
^
ext/pybind11/include/pybind11/pytypes.h:1031:60: error: 'PyCapsule_SetContext'
was not declared in this scope
if (PyCapsule_SetContext(m_ptr, (void *) destructor) != 0)
^
ext/pybind11/include/pybind11/pytypes.h: In lambda function:
ext/pybind11/include/pybind11/pytypes.h:1037:91: error: 'PyCapsule_GetPointer'
was not declared in this scope
auto destructor = reinterpret_cast<void
(*)()>(PyCapsule_GetPointer(o, nullptr));
^
ext/pybind11/include/pybind11/pytypes.h: In constructor
'pybind11::capsule::capsule(void (*)())':
ext/pybind11/include/pybind11/pytypes.h:1039:10: error: 'PyCapsule_New' was not
declared in this scope
});
^
ext/pybind11/include/pybind11/pytypes.h: In member function
'pybind11::capsule::operator T*() const':
ext/pybind11/include/pybind11/pytypes.h:1046:74: error: there are no arguments
to 'PyCapsule_GetPointer' that depend on a template parameter, so a declaration
of 'PyCapsule_GetPointer' must be available [-fpermissive]
T * result = static_cast<T *>(PyCapsule_GetPointer(m_ptr,
nullptr));
^
ext/pybind11/include/pybind11/pytypes.h:1046:74: note: (if you use
'-fpermissive', G++ will accept your code, but allowing the use of an
undeclared name is deprecated)
ext/pybind11/include/pybind11/pytypes.h: In constructor
'pybind11::memoryview::memoryview(const pybind11::buffer_info&)':
ext/pybind11/include/pybind11/pytypes.h:1179:45: error:
'PyMemoryView_FromBuffer' was not declared in this scope
m_ptr = PyMemoryView_FromBuffer(&buf);
^
In file included from ext/pybind11/include/pybind11/cast.h:13:0,
from ext/pybind11/include/pybind11/attr.h:13,
from ext/pybind11/include/pybind11/pybind11.h:36,
from build/ARM/sim/init.hh:46,
from build/ARM/sim/main.cc:33:
ext/pybind11/include/pybind11/pytypes.h: In member function 'bool
pybind11::memoryview::check() const':
ext/pybind11/include/pybind11/pytypes.h:681:78: error: 'PyMemoryView_Check' was
not declared in this scope
bool check() const { return m_ptr != nullptr && (bool)
CheckFun(m_ptr); } \
^
ext/pybind11/include/pybind11/pytypes.h:685:5: note: in expansion of macro
'PYBIND11_OBJECT_COMMON'
PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun) \
^
ext/pybind11/include/pybind11/pytypes.h:1184:5: note: in expansion of macro
'PYBIND11_OBJECT_CVT'
PYBIND11_OBJECT_CVT(memoryview, object, PyMemoryView_Check,
PyMemoryView_FromObject)
^
ext/pybind11/include/pybind11/pytypes.h: In static member function 'static bool
pybind11::memoryview::check_(pybind11::handle)':
ext/pybind11/include/pybind11/pytypes.h:682:85: error: 'PyMemoryView_Check' was
not declared in this scope
static bool check_(handle h) { return h.ptr() != nullptr &&
CheckFun(h.ptr()); }
^
ext/pybind11/include/pybind11/pytypes.h:685:5: note: in expansion of macro
'PYBIND11_OBJECT_COMMON'
PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun) \
^
ext/pybind11/include/pybind11/pytypes.h:1184:5: note: in expansion of macro
'PYBIND11_OBJECT_CVT'
PYBIND11_OBJECT_CVT(memoryview, object, PyMemoryView_Check,
PyMemoryView_FromObject)
^
ext/pybind11/include/pybind11/pytypes.h: In constructor
'pybind11::memoryview::memoryview(const pybind11::object&)':
ext/pybind11/include/pybind11/pytypes.h:687:54: error:
'PyMemoryView_FromObject' was not declared in this scope
Name(const object &o) : Parent(ConvertFun(o.ptr()), stolen) { if
(!m_ptr) throw error_already_set(); }
^
ext/pybind11/include/pybind11/pytypes.h:1184:5: note: in expansion of macro
'PYBIND11_OBJECT_CVT'
PYBIND11_OBJECT_CVT(memoryview, object, PyMemoryView_Check,
PyMemoryView_FromObject)
^
In file included from ext/pybind11/include/pybind11/attr.h:13:0,
from ext/pybind11/include/pybind11/pybind11.h:36,
from build/ARM/sim/init.hh:46,
from build/ARM/sim/main.cc:33:
ext/pybind11/include/pybind11/cast.h: In function 'std::string
pybind11::detail::error_string()':
ext/pybind11/include/pybind11/cast.h:159:53: error: 'PyFrame_GetLineNumber' was
not declared in this scope
int lineno = PyFrame_GetLineNumber(frame);
^
In file included from build/ARM/sim/init.hh:46:0,
from build/ARM/sim/main.cc:33:
ext/pybind11/include/pybind11/pybind11.h: In static member function 'static
PyObject* pybind11::cpp_function::dispatcher(PyObject*, PyObject*, PyObject*)':
ext/pybind11/include/pybind11/pybind11.h:399:92: error: 'PyCapsule_GetPointer'
was not declared in this scope
function_record *overloads = (function_record *)
PyCapsule_GetPointer(self, nullptr),
^
ext/pybind11/include/pybind11/pybind11.h:416:37: error: 'it' was not declared
in this scope
const bool overloaded = it != nullptr && it->next !=
nullptr;
^
ext/pybind11/include/pybind11/pybind11.h:687:20: error: 'it' was not declared
in this scope
msg += it->signature;
^
In file included from ext/pybind11/include/pybind11/cast.h:13:0,
from ext/pybind11/include/pybind11/attr.h:13,
from ext/pybind11/include/pybind11/pybind11.h:36,
from build/ARM/sim/init.hh:46,
from build/ARM/sim/main.cc:33:
ext/pybind11/include/pybind11/pytypes.h: In instantiation of
'pybind11::capsule::operator T*() const [with T = pybind11::detail::internals]':
ext/pybind11/include/pybind11/cast.h:50:23: required from here
ext/pybind11/include/pybind11/pytypes.h:1046:74: error: 'PyCapsule_GetPointer'
was not declared in this scope
T * result = static_cast<T *>(PyCapsule_GetPointer(m_ptr,
nullptr));
^
ext/pybind11/include/pybind11/pytypes.h: In instantiation of
'pybind11::capsule::operator T*() const [with T = void]':
ext/pybind11/include/pybind11/cast.h:590:19: required from here
ext/pybind11/include/pybind11/pytypes.h:1046:74: error: 'PyCapsule_GetPointer'
was not declared in this scope
ext/pybind11/include/pybind11/pytypes.h: In instantiation of
'pybind11::capsule::operator T*() const [with T =
pybind11::detail::function_record]':
ext/pybind11/include/pybind11/pybind11.h:277:53: required from here
ext/pybind11/include/pybind11/pytypes.h:1046:74: error: 'PyCapsule_GetPointer'
was not declared in this scope
scons: *** [build/ARM/sim/main.o] Error 1
scons: building terminated because of errors._______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users