hust-diangroup / ns3-ai

Enable the interaction between ns-3 and popular frameworks using Python, which mean you can train and test your AI algorithms in ns-3 without changing any frameworks you are using now!
GNU General Public License v2.0
233 stars 83 forks source link

how to solve #116

Open 296933604 opened 5 months ago

296933604 commented 5 months ago

I encountered a problem at the ./ns3 ai step, but I don't understand the reason. How can I solve it? Thank you

[0/2] Re-checking globbed directories... [1/3] Building CXX object contrib/ai/m...3ai_gym_msg_py.dir/msg_py_binding.cc.o FAILED: contrib/ai/model/gym-interface/py/CMakeFiles/ns3ai_gym_msg_py.dir/msg_py_binding.cc.o /usr/bin/ccache /usr/bin/c++ -DEIGEN_MPL2_ONLY -DHAVE_EIGEN3 -DHAVE_GSL -DHAVE_LIBXML2 -DHAVE_SQLITE3 -DHAVE_STDINT_H -DNS3_ASSERT_ENABLE -DNS3_BUILD_PROFILE_DEBUG -DNS3_LOG_ENABLE -DPROJECT_SOURCE_PATH=\"/home/miao/tarballs/ns-allinone-3.41/ns-3.41\" -DLINUX -Dns3ai_gym_msg_py_EXPORTS -I../build/include -I/usr -I/usr/include/eigen3 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtk-3.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/libxml2 -I/usr/include/python3.8 -I/home/miao/anaconda3/envs/ns3ai_env/include/python3.8 -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -fno-semantic-interposition -fdiagnostics-color=always -Wall -flto -fno-fat-lto-objects -std=c++2a -MD -MT contrib/ai/model/gym-interface/py/CMakeFiles/ns3ai_gym_msg_py.dir/msg_py_binding.cc.o -MF contrib/ai/model/gym-interface/py/CMakeFiles/ns3ai_gym_msg_py.dir/msg_py_binding.cc.o.d -o contrib/ai/model/gym-interface/py/CMakeFiles/ns3ai_gym_msg_py.dir/msg_py_binding.cc.o -c ../contrib/ai/model/gym-interface/py/msg_py_binding.cc ../contrib/ai/model/gym-interface/py/msg_py_binding.cc: In lambda function: ../contrib/ai/model/gym-interface/py/msg_py_binding.cc:36:41: error: ‘from_memory’ is not a member of ‘pybind11::memoryview’ 36 | return py::memoryview::from_memory((void)msg.buffer, msg.size); | ^~~ ../contrib/ai/model/gym-interface/py/msg_py_binding.cc: In lambda function: ../contrib/ai/model/gym-interface/py/msg_py_binding.cc:40:36: error: ‘from_memory’ is not a member of ‘pybind11::memoryview’ 40 | return py::memoryview::from_memory((void)msg.buffer, MSG_BUFFER_SIZE); | ^~~ ninja: build stopped: subcommand failed. Finished executing the following commands: /usr/bin/cmake --build /home/miao/tarballs/ns-allinone-3.41/ns-3.41/cmake-cache -j 7 --target libai