YeWR / EfficientZero

Open-source codebase for EfficientZero, from "Mastering Atari Games with Limited Data" at NeurIPS 2021.
GNU General Public License v3.0
847 stars 131 forks source link

"bash make.sh" failed #8

Closed geekyutao closed 2 years ago

geekyutao commented 2 years ago

Hi Weirui, I tried to build the depandency but failed. Is there a requirement on GCC version? The log is as belows. I also tried to modify ">>" to "> >", but the "nullptr" problem was still out of there. Did you have any suggestions? Thank you!

Best, Tao

running build_ext building 'cytree' extension gcc -pthread -B /home/v-ty/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/home/v-ty/anaconda3/lib/python3.8/site-packages/numpy/core/include -I/home/v-ty/anaconda3/include/python3.8 -c cytree.cpp -o build/temp.linux-x86_64-3.8/cytree.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from cytree.cpp:653:0: cnode.cpp:31:9: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat] this->ptr_node_pool = nullptr; ^ In file included from /home/v-ty/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0, from /home/v-ty/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /home/v-ty/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4, from cytree.cpp:659: /home/v-ty/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it with " \

^ In file included from cnode.cpp:2:0, from cytree.cpp:653: cnode.h:47:42: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> node_pools; ^ cnode.h:53:94: error: ‘>>’ should be ‘> >’ within a nested template argument list void prepare(float root_exploration_fraction, const std::vector<std::vector> &noises, const std::vector &value_prefixs, const std::vector<std::vector> &policies); ^ cnode.h:53:182: error: ‘>>’ should be ‘> >’ within a nested template argument list void prepare(float root_exploration_fraction, const std::vector<std::vector> &noises, const std::vector &value_prefixs, const std::vector<std::vector> &policies); ^ cnode.h:54:111: error: ‘>>’ should be ‘> >’ within a nested template argument list void prepare_no_noise(const std::vector &value_prefixs, const std::vector<std::vector> &policies); ^ cnode.h:56:40: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> get_trajectories(); ^ cnode.h:57:40: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> get_distributions(); ^ cnode.h:67:43: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector<CNode>> search_paths; ^ cnode.h:79:184: error: ‘>>’ should be ‘> >’ within a nested template argument list void cbatch_back_propagate(int hidden_state_index_x, float discount, const std::vector &value_prefixs, const std::vector &values, const std::vector<std::vector> &policies, tools::CMinMaxStatsList min_max_s ^ In file included from cytree.cpp:653:0: cnode.cpp: In constructor ‘tree::CNode::CNode()’: cnode.cpp:31:31: error: ‘nullptr’ was not declared in this scope this->ptr_node_pool = nullptr; ^ In file included from cytree.cpp:653:0: cnode.cpp: At global scope: cnode.cpp:204:94: error: ‘>>’ should be ‘> >’ within a nested template argument list void CRoots::prepare(float root_exploration_fraction, const std::vector<std::vector> &noises, const std::vector &value_prefixs, const std::vector<std::vector> &policies){ ^ cnode.cpp:204:182: error: ‘>>’ should be ‘> >’ within a nested template argument list void CRoots::prepare(float root_exploration_fraction, const std::vector<std::vector> &noises, const std::vector &value_prefixs, const std::vector<std::vector> &policies){ ^ cnode.cpp:213:111: error: ‘>>’ should be ‘> >’ within a nested template argument list void CRoots::prepare_no_noise(const std::vector &value_prefixs, const std::vector<std::vector> &policies){ ^ cnode.cpp:226:32: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> CRoots::get_trajectories(){ ^ cnode.cpp: In member function ‘std::vector<std::vector > tree::CRoots::get_trajectories()’: cnode.cpp:227:36: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> trajs; ^ cnode.cpp: At global scope: cnode.cpp:236:32: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> CRoots::get_distributions(){ ^ cnode.cpp: In member function ‘std::vector<std::vector > tree::CRoots::get_distributions()’: cnode.cpp:237:36: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector> distributions; ^ cnode.cpp: At global scope: cnode.cpp:317:184: error: ‘>>’ should be ‘> >’ within a nested template argument list void cbatch_back_propagate(int hidden_state_index_x, float discount, const std::vector &value_prefixs, const std::vector &values, const std::vector<std::vector> &policies, tools::CMinMaxStatsList min_max_s ^ cytree.cpp:3382:12: warning: ‘int pyx_pw_6cytree_4Node_1cinit__(PyObject, PyObject, PyObject)’ defined but not used [-Wunused-function] static int pyx_pw_6cytree_4Node_1cinit(PyObject *pyx_v_self, PyObject __pyx_args, PyObject __pyx_kwds) { ^ error: command 'gcc' failed with exit status 1

josephrocca commented 2 years ago

Related to this pull request?

YeWR commented 2 years ago

The version of GCC is recommended to be higher than 7.5. Have you ever tried a higher version of GCC?

geekyutao commented 2 years ago

The version of GCC is recommended to be higher than 7.5. Have you ever tried a higher version of GCC?

Thanks Weirui! It worked when I upgraded my GCC above 7.5.