Mao Ye
2018-06-05 15:20:42 UTC
Hi Oscar,
I think it is because of in one of the header files I had the issue as you
described. It is solved already. Thanks!
Mao
I think it is because of in one of the header files I had the issue as you
described. It is solved already. Thanks!
Mao
Hi,
Most (if not all) of the errors are just a consequence of the first one so
they don't really matter. Most probably, you're missing a ";" somewhere
before the "namespace py = pybind11;" line.
Regards,
Oscar
Hi all,
I have been using gem5 for a while without any problem. But today I met a
problem with my new modification and it failed at compilation stage.
However, I diff the following file with the one under another directory of
mine, showing no difference at all. So what might be the reason causing so
many errors? Any suggestion will be appreciated.
[VER TAGS] -> X86/sim/tags.cc
[ CXX] X86/python/_m5/param_DRAMCtrl.cc -> .o
build/X86/python/_m5/param_DRAMCtrl.cc:53:1: error: expected
unqualified-id before 'namespace'
namespace py = pybind11;
^
build/X86/python/_m5/param_DRAMCtrl.cc:56:13: error: 'py' has not been
declared
module_init(py::module &m_internal)
^
build/X86/python/_m5/param_DRAMCtrl.cc:56:24: error: expected ',' or
'...' before '&' token
module_init(py::module &m_internal)
^
build/X86/python/_m5/param_DRAMCtrl.cc:137:33: error: expected identifier
before string constant
static EmbeddedPyBind embed_obj("DRAMCtrl", module_init,
"AbstractMemory");
^
build/X86/python/_m5/param_DRAMCtrl.cc:137:33: error: expected ',' or
'...' before string constant
build/X86/python/_m5/param_DRAMCtrl.cc:137:75: error: expected '}' at end
of input
static EmbeddedPyBind embed_obj("DRAMCtrl", module_init,
"AbstractMemory");
^
build/X86/python/_m5/param_DRAMCtrl.cc: In static member function 'static
build/X86/python/_m5/param_DRAMCtrl.cc:58:5: error: 'py' has not been
declared
py::module m = m_internal.def_submodule("param_DRAMCtrl");
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:5: error: 'py' has not been
declared
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:30: error: expected
primary-expression before ',' token
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:52: error: expected
primary-expression before ',' token
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:86: error: 'py' was not
declared in this scope
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:98: error: template argument 2
is invalid
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "DRAM
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:101: error: 'm' was not
declared in this scope
:class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "DRAMCtr
^
build/X86/python/_m5/param_DRAMCtrl.cc:60:14: error: 'py' is not a class,
namespace, or enumeration
.def(py::init<>())
^
build/X86/python/_m5/param_DRAMCtrl.cc:60:23: error: expected
primary-expression before '>' token
.def(py::init<>())
^
build/X86/python/_m5/param_DRAMCtrl.cc:60:25: error: expected
primary-expression before ')' token
.def(py::init<>())
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:5: error: 'py' is not a class,
namespace, or enumeration
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:24: error: expected
primary-expression before ',' token
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:40: error: expected
primary-expression before ',' token
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:68: error: the value of 'py'
is not usable in a constant expression
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:86: note: 'py' was not declared
'constexpr'
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:80: error: type/value mismatch
at argument 2 in template parameter list for 'template<class _Tp, class
_Dp> class std::unique_ptr'
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:80: note: expected a type,
got 'py'
build/X86/python/_m5/param_DRAMCtrl.cc:135:1: error: expected
unqualified-id at end of input
};
^
scons: *** [build/X86/python/_m5/param_DRAMCtrl.o] Error 1
scons: building terminated because of errors.
--
Mao Ye,
_______________________________________________
Most (if not all) of the errors are just a consequence of the first one so
they don't really matter. Most probably, you're missing a ";" somewhere
before the "namespace py = pybind11;" line.
Regards,
Oscar
Hi all,
I have been using gem5 for a while without any problem. But today I met a
problem with my new modification and it failed at compilation stage.
However, I diff the following file with the one under another directory of
mine, showing no difference at all. So what might be the reason causing so
many errors? Any suggestion will be appreciated.
[VER TAGS] -> X86/sim/tags.cc
[ CXX] X86/python/_m5/param_DRAMCtrl.cc -> .o
build/X86/python/_m5/param_DRAMCtrl.cc:53:1: error: expected
unqualified-id before 'namespace'
namespace py = pybind11;
^
build/X86/python/_m5/param_DRAMCtrl.cc:56:13: error: 'py' has not been
declared
module_init(py::module &m_internal)
^
build/X86/python/_m5/param_DRAMCtrl.cc:56:24: error: expected ',' or
'...' before '&' token
module_init(py::module &m_internal)
^
build/X86/python/_m5/param_DRAMCtrl.cc:137:33: error: expected identifier
before string constant
static EmbeddedPyBind embed_obj("DRAMCtrl", module_init,
"AbstractMemory");
^
build/X86/python/_m5/param_DRAMCtrl.cc:137:33: error: expected ',' or
'...' before string constant
build/X86/python/_m5/param_DRAMCtrl.cc:137:75: error: expected '}' at end
of input
static EmbeddedPyBind embed_obj("DRAMCtrl", module_init,
"AbstractMemory");
^
build/X86/python/_m5/param_DRAMCtrl.cc: In static member function 'static
build/X86/python/_m5/param_DRAMCtrl.cc:58:5: error: 'py' has not been
declared
py::module m = m_internal.def_submodule("param_DRAMCtrl");
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:5: error: 'py' has not been
declared
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:30: error: expected
primary-expression before ',' token
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:52: error: expected
primary-expression before ',' token
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:86: error: 'py' was not
declared in this scope
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:98: error: template argument 2
is invalid
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "DRAM
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:101: error: 'm' was not
declared in this scope
:class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "DRAMCtr
^
build/X86/python/_m5/param_DRAMCtrl.cc:60:14: error: 'py' is not a class,
namespace, or enumeration
.def(py::init<>())
^
build/X86/python/_m5/param_DRAMCtrl.cc:60:23: error: expected
primary-expression before '>' token
.def(py::init<>())
^
build/X86/python/_m5/param_DRAMCtrl.cc:60:25: error: expected
primary-expression before ')' token
.def(py::init<>())
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:5: error: 'py' is not a class,
namespace, or enumeration
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:24: error: expected
primary-expression before ',' token
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:40: error: expected
primary-expression before ',' token
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:68: error: the value of 'py'
is not usable in a constant expression
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:59:86: note: 'py' was not declared
'constexpr'
py::class_<DRAMCtrlParams, AbstractMemoryParams,
std::unique_ptr<DRAMCtrlParams, py::nodelete>>(m, "
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:80: error: type/value mismatch
at argument 2 in template parameter list for 'template<class _Tp, class
_Dp> class std::unique_ptr'
py::class_<DRAMCtrl, AbstractMemory, std::unique_ptr<DRAMCtrl,
py::nodelete>>(m, "DRAMCtrl")
^
build/X86/python/_m5/param_DRAMCtrl.cc:132:80: note: expected a type,
got 'py'
build/X86/python/_m5/param_DRAMCtrl.cc:135:1: error: expected
unqualified-id at end of input
};
^
scons: *** [build/X86/python/_m5/param_DRAMCtrl.o] Error 1
scons: building terminated because of errors.
--
Mao Ye,
_______________________________________________
--
Mao Ye,
Mao Ye,