Comments (9)
Hi Orfeas (@prototact),
Thank you for the provided files. I have applied your changes to the start_sim.py file and pushed it into a new branch.
BR,
Piotr
from ns3-gym.
I second this. I tried installing NS3-Gym in NS3-3.36.1 (including converting wscript files to CMakeLists.txt), but I am facing to many errors while building it.
(Just a note, using NS3-3.35 is OK, however, I am using other tools that are built for NS3-3.36 and it is difficult for me to convert them to work on NS3-3.35)
I hope the developers consider this soon
from ns3-gym.
I worked on it a bit, and currently it is good enough. I attach two files, a CMakeLists.txt that needs to be added in the opengym
directory and a start_sim script that goes into the opengym/model/ns3gym/ns3gym
subdirectory.
from ns3-gym.
Thank you, prototact, for the files. They were very helpful to me (I am a beginner in the CMake world). However, I still get the same errors:
_> In file included from /home/*******/ns-allinone-3.36.1/ns-3.36.1/contrib/opengym/model/opengym_interface.h:26,
from /home/*******/ns-allinone-3.36.1/ns-3.36.1/contrib/opengym/model/opengym_interface.cc:27:
/usr/include/zmq.hpp:638:14: error: ‘ZMQ_BLOCKY’ was not declared in this scope; did you mean ‘ZMQ_NOBLOCK’?
638 | blocky = ZMQ_BLOCKY,
| ^~~~~~~~~~
| ZMQ_NOBLOCK
/usr/include/zmq.hpp:642:31: error: ‘ZMQ_THREAD_AFFINITY_CPU_ADD’ was not declared in this scope
642 | thread_affinity_cpu_add = ZMQ_THREAD_AFFINITY_CPU_ADD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:643:34: error: ‘ZMQ_THREAD_AFFINITY_CPU_REMOVE’ was not declared in this scope
643 | thread_affinity_cpu_remove = ZMQ_THREAD_AFFINITY_CPU_REMOVE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:644:26: error: ‘ZMQ_THREAD_NAME_PREFIX’ was not declared in this scope
644 | thread_name_prefix = ZMQ_THREAD_NAME_PREFIX,
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:645:17: error: ‘ZMQ_MAX_MSGSZ’ was not declared in this scope; did you mean ‘ZMQ_MAXMSGSIZE’?
645 | max_msgsz = ZMQ_MAX_MSGSZ,
| ^~~~~~~~~~~~~
| ZMQ_MAXMSGSIZE
/usr/include/zmq.hpp:652:18: error: ‘ZMQ_MSG_T_SIZE’ was not declared in this scope
652 | msg_t_size = ZMQ_MSG_T_SIZE
| ^~~~~~~~~~~~~~
In file included from /home//ns-allinone-3.36.1/ns-3.36.1/contrib/opengym/model/opengym_interface.h:26,
from /home//ns-allinone-3.36.1/ns-3.36.1/contrib/opengym/model/opengym_env.cc:27:
/usr/include/zmq.hpp:638:14: error: ‘ZMQ_BLOCKY’ was not declared in this scope; did you mean ‘ZMQ_NOBLOCK’?
638 | blocky = ZMQ_BLOCKY,
| ^~~~~~~~~~
| ZMQ_NOBLOCK
/usr/include/zmq.hpp:642:31: error: ‘ZMQ_THREAD_AFFINITY_CPU_ADD’ was not declared in this scope
642 | thread_affinity_cpu_add = ZMQ_THREAD_AFFINITY_CPU_ADD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:643:34: error: ‘ZMQ_THREAD_AFFINITY_CPU_REMOVE’ was not declared in this scope
643 | thread_affinity_cpu_remove = ZMQ_THREAD_AFFINITY_CPU_REMOVE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:644:26: error: ‘ZMQ_THREAD_NAME_PREFIX’ was not declared in this scope
644 | thread_name_prefix = ZMQ_THREAD_NAME_PREFIX,
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/zmq.hpp:645:17: error: ‘ZMQ_MAX_MSGSZ’ was not declared in this scope; did you mean ‘ZMQ_MAXMSGSIZE’?
645 | max_msgsz = ZMQ_MAX_MSGSZ,
| ^~~~~~~~~~~~~
| ZMQ_MAXMSGSIZE
/usr/include/zmq.hpp:652:18: error: ‘ZMQ_MSG_T_SIZE’ was not declared in this scope
652 | msg_t_size = ZMQ_MSG_T_SIZE
| ^~~~~~~~~~~~~~
make[2]: *** [contrib/opengym/CMakeFiles/libopengym-obj.dir/build.make:115: contrib/opengym/CMakeFiles/libopengym-obj.dir/model/opengym_env.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [contrib/opengym/CMakeFiles/libopengym-obj.dir/build.make:63: contrib/opengym/CMakeFiles/libopengym-obj.dir/model/opengym_interface.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5064: contrib/opengym/CMakeFiles/libopengym-obj.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Finished executing the following commands:
cd cmake-cache; cmake --build . -j 11 ; cd .._
This error happened after I also copied the zmq.hpp file from the ZeroMQ repository.
Anyone is facing these errors? it only occurs with NS3-3.36.x version, not with previous versions (e.g., 3.35)
from ns3-gym.
I'm also not succeeding to patch the porting with the examples you provided @prototact
The image below shows the output of ./ns3 configure
after moving the files to the directories you mentioned.
from ns3-gym.
I'm also not succeeding to patch the porting with the examples you provided @prototact The image below shows the output of
./ns3 configure
after moving the files to the directories you mentioned.
Here is the corrected CMakeLists.txt file. @prototact had a couple of missed brackets :) However, NS3-Gym still won't work.
Another point: NS3-Gym requires SQLite to be installed.
from ns3-gym.
I'm also not succeeding to patch the porting with the examples you provided @prototact The image below shows the output of
./ns3 configure
after moving the files to the directories you mentioned.Here is the corrected CMakeLists.txt file. @prototact had a couple of missed brackets :) However, NS3-Gym still won't work.
Another point: NS3-Gym requires SQLite to be installed.
Thank you for the quick reply @ahmadmr81 ... I decided to run an older version of ns-3.35 as i have no experience in porting software. I'd be glad to help contributing if someone could provide me some guidelines on how to do it.
from ns3-gym.
I have a problem porting the module to ns3.36 even with the two files provided.
I get the following error when I run "./ns3"
../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::internal::WireFormatLite::SkipField(google::protobuf::io::CodedInputStream*, unsigned int)'
../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::MessageLite::ParseFromArray(void const*, int)'
../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::internal::VerifyVersion(int, int, char const*)'
The complete output of "./ns3 build" can be found here.
And in the output of "./ns3 configure" :
-- Processing src/opengym
-- find_external_library: zmq was found.
Protobuf messages generated, good!
Protobuf messages generated, good!
...
More in detail, I have successfully compiled opengym in previous versions of ns3 using waf on the same machine, so I guess there should be sth wrong with new CMake stuff.
from ns3-gym.
I have a problem porting the module to ns3.36 even with the two files provided.
I get the following error when I run "./ns3"
../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::internal::WireFormatLite::SkipField(google::protobuf::io::CodedInputStream*, unsigned int)' ../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::MessageLite::ParseFromArray(void const*, int)' ../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ../../build/lib/libns3.36.1-opengym-default.so: undefined reference to `google::protobuf::internal::VerifyVersion(int, int, char const*)'
The complete output of "./ns3 build" can be found here.
And in the output of "./ns3 configure" :
-- Processing src/opengym -- find_external_library: zmq was found. Protobuf messages generated, good! Protobuf messages generated, good! ...
More in detail, I have successfully compiled opengym in previous versions of ns3 using waf on the same machine, so I guess there should be sth wrong with new CMake stuff.
I opened a new issue but actually im having exactly the same errors...
from ns3-gym.
Related Issues (20)
- protobuf messages are not generated during build configuration HOT 13
- using gdb to debug ns3-script in a separate shell results into the script restarting HOT 1
- protobuf messages are generated but could not be found during build configuration HOT 1
- Using ns3gym in Sable-Baseline3's Vevtorized Environment HOT 1
- some problem in run cognitive-agent-v1.py HOT 2
- Missing header messages.pb.h for opengym HOT 2
- GNU version still not meets requirement after updating gcc/g++
- ./ns3 configure -d release --enable-examples --enable-tests HOT 2
- ubuntu2210
- implementation of reward and penalty HOT 1
- The `info` returned by `step()` must be a python dictionary, actual type: <class 'str'> HOT 1
- protobuf_generate command not found HOT 3
- Gym is unmaintained, replace it by Gymnasium
- python contrib/opengym/examples/opengym/simple_test.py Got new port for ns3gm interface: 7656 ns3 file not found. Quitting...
- install ns3-gym in tensorflow environment
- NS3 gym stable baseline
- /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main' collect2: error: ld returned 1 exit status
- FAILED: contrib/opengym/examples/CMakeFiles/interference-pattern.dir/interference-pattern/mygym.cc.o ninja: build stopped: subcommand failed. Finished executing the following commands:
- Has anyone used ns3-gym in routing optimization?
- Some problems during ./ns3 build about ld.lld: error: undefined symbol: google::protobuf::internal::AnyMetadata::PackFrom(google::protobuf::Arena*, google::protobuf::Message const&)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ns3-gym.