Ubuntu-22.04 python-3.10 ns-3.40
I can build all the ns3-ai example except
multi-bss. When I build
'multi-bss' , I came across the problem below and failed to solve it. By the way, I can build this example successfully on VMware(with Ubuntu-24.04 ns-3.40 python-3.12), but cuda can't be employed on VMware-Ubuntu and the latest supported ubuntu version is 22.04. So I need to run it on pure Ubuntu system, then I came across the problem.
kjni@Ub:~/ns-allinone-3.40/ns-3.40$ ./ns3 build ns3ai_multibss
Consolidate compiler generated dependencies of target libvr-app-obj
[ 0%] Building CXX object contrib/ai/examples/multi-bss/vr-app/CMakeFiles/libvr-app-obj.dir/model/vr-burst-generator.cc.o
Consolidate compiler generated dependencies of target ns3ai_multibss_py
/home/kjni/ns-allinone-3.40/ns-3.40/contrib/ai/examples/multi-bss/vr-app/model/vr-burst-generator.cc: In static member function ‘static ns3::TypeId ns3::VrBurstGenerator::GetTypeId()’:
/home/kjni/ns-allinone-3.40/ns-3.40/contrib/ai/examples/multi-bss/vr-app/model/vr-burst-generator.cc:64:54: error: no matching function for call to ‘MakeEnumAccessor<ns3::VrBurstGenerator::VrAppName>(ns3::VrBurstGenerator::VrAppName ns3::VrBurstGenerator::*)’
64 | MakeEnumAccessor<VrAppName>(&VrBurstGenerator::m_appName),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/kjni/ns-allinone-3.40/ns-3.40/build/include/ns3/enum.h:1,
from /home/kjni/ns-allinone-3.40/ns-3.40/contrib/ai/examples/multi-bss/vr-app/model/vr-burst-generator.cc:24:
/home/kjni/ns-allinone-3.40/ns-3.40/src/core/model/enum.h:205:1: note: candidate: ‘ns3::Ptr<const ns3::AttributeAccessor> ns3::MakeEnumAccessor(T1) [with T1 = VrBurstGenerator::VrAppName]’
205 | MakeEnumAccessor(T1 a1)
| ^~~~~~~~~~~~~~~~
/home/kjni/ns-allinone-3.40/ns-3.40/src/core/model/enum.h:205:21: note: no known conversion for argument 1 from ‘ns3::VrBurstGenerator::VrAppName ns3::VrBurstGenerator::*’ to ‘ns3::VrBurstGenerator::VrAppName’
205 | MakeEnumAccessor(T1 a1)
| ~~~^~
/home/kjni/ns-allinone-3.40/ns-3.40/src/core/model/enum.h:212:1: note: candidate: ‘template<class T1, class T2> ns3::Ptr<const ns3::AttributeAccessor> ns3::MakeEnumAccessor(T1, T2)’
212 | MakeEnumAccessor(T1 a1, T2 a2)
| ^~~~~~~~~~~~~~~~
/home/kjni/ns-allinone-3.40/ns-3.40/src/core/model/enum.h:212:1: note: candidate expects 2 arguments, 1 provided
gmake[3]: *** [contrib/ai/examples/multi-bss/vr-app/CMakeFiles/libvr-app-obj.dir/build.make:190:contrib/ai/examples/multi-bss/vr-app/CMakeFiles/libvr-app-obj.dir/model/vr-burst-generator.cc.o] 错误 1
gmake[2]: *** [CMakeFiles/Makefile2:5147:contrib/ai/examples/multi-bss/vr-app/CMakeFiles/libvr-app-obj.dir/all] 错误 2
gmake[1]: *** [CMakeFiles/Makefile2:5102:contrib/ai/examples/multi-bss/CMakeFiles/ns3ai_multibss.dir/rule] 错误 2
gmake: *** [Makefile:1168:ns3ai_multibss] 错误 2
Finished executing the following commands:
cd cmake-cache; /usr/bin/cmake --build . -j 15 --target ns3ai_multibss ; cd ..