Comments (18)
The problem is with libzmq version. Ubuntu 18.04 has older version which causes the error, version 20.04 has more recent version that works. A simple solution is to add 20.04 repos by doing this.
sudo apt-add-repository "deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse"
sudo apt-add-repository "deb-src http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse"
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse"
sudo apt-add-repository "deb-src http://archive.ubuntu.com/ubuntu focal restricted universe multiverse main"
sudo apt-get update
This will make sure that you will install the version of libzmq
available in 20.04 (focal fossa)
from ns3-gym.
I encountered the same problem. After manually downgrading libzmq to 4.14, the compiler still found an error and indicated that it was missing zmq.hpp File, manual download zmq.hpp File, put into / usr / include, rebuild, and use it successfully
from ns3-gym.
Current libzmq version is 4.3.2
Current pyzmq version is 19.0.1
Seems to be the latest version?
I encountered a similar problem as you, see the 32nd issue.
How do you installed the libzmq5-dev? I cannot find this package on Ubuntu16.04... I used sudo apt-get install libzmq5-dev
and only got libzmq3-dev. For me, I think maybe the problem comes from the libzmq3-dev.
from ns3-gym.
from ns3-gym.
I'm suffering the same issue as you. Can you explain how the solved zmq version issue?
I found that using the newest version of zmq (4.2.5) will occur the error. So I did downgrade the zmq(4.1.4) and it works now.
from ns3-gym.
can you check which zmq version do you have installed?
probably you will need to update it
from ns3-gym.
Current libzmq version is 4.3.2
Current pyzmq version is 19.0.1
Seems to be the latest version?
from ns3-gym.
Can you revert the last commit, where I applied a pull request to replace deprecated functions of zmq and check?
Probably I will need to handle zmq versions in some way.
from ns3-gym.
Yep, I revert that commit and related errors disappear. The flag parameter is still optional in my zmq...
I work on Ubuntu 16.04, here are my zmq versions.
libzmq3-dev is already the newest version (4.1.4-7).
libzmq5 is already the newest version (4.1.4-7).
I mentioned that the libzm5-dev is missing in the default apt source. The apt automatically recommend libzmq3-dev and it works well now.
from ns3-gym.
Thank you! That error was resolved.
I ran into a protobuf version error now. Which version of protobuf should I be using?
../src/opengym/model/opengym_interface.cc:258:69: error: ‘int google::protobuf::MessageLite::ByteSize() const’ is deprecated: Please use ByteSizeLong() instead [-Werror=deprecated-declarations]
envStateMsg.SerializeToArray(request.data(), envStateMsg.ByteSize());
^
In file included from /usr/local/include/google/protobuf/generated_enum_util.h:36:0,
from /usr/local/include/google/protobuf/map.h:49,
from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
from ../src/opengym/model/messages.pb.h:26,
from ../src/opengym/model/container.h:27,
from ../src/opengym/model/opengym_interface.cc:29:
/usr/local/include/google/protobuf/message_lite.h:408:7: note: declared here
int ByteSize() const { return internal::ToIntSize(ByteSizeLong()); }
^~~~~~~~
cc1plus: all warnings being treated as errors
from ns3-gym.
Oh never mind the above. I saw the correct version is 3.6.1 from readme. It works now with the previous commit, thank you!
from ns3-gym.
I'm suffering the same issue as you. Can you explain how the solved zmq version issue?
from ns3-gym.
I'm suffering the same issue as you. Can you explain how the solved zmq version issue?
I found that using the newest version of zmq (4.2.5) will occur the error. So I did downgrade the zmq(4.1.4) and it works now.
How did you downgrade to zmq 4.1.4 ?
from ns3-gym.
I build ns3-gym successfully on Ubuntu20.04 with libzmq 4.3.2; but on Ubuntu18.04 with libzmq 4.2.5, I failed, the error is same as the above. why? i didn't find where is the source of zmq::send_flags or zmq::recv_flags both on two systems.
../src/opengym/model/opengym_interface.cc: In member function ‘void ns3::OpenGymInterface::Init()’:
../src/opengym/model/opengym_interface.cc:192:36: error: ‘zmq::send_flags’ has not been declared
m_zmq_socket.send (request, zmq::send_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc:197:41: error: ‘zmq::recv_flags’ has not been declared
(void) m_zmq_socket.recv (reply, zmq::recv_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc: In member function ‘void ns3::OpenGymInterface::NotifyCurrentState()’:
../src/opengym/model/opengym_interface.cc:259:36: error: ‘zmq::send_flags’ has not been declared
m_zmq_socket.send (request, zmq::send_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc:264:41: error: ‘zmq::recv_flags’ has not been declared
(void) m_zmq_socket.recv (reply, zmq::recv_flags::none);
from ns3-gym.
I encountered the same problem. After manually downgrading libzmq to 4.14, the compiler still found an error and indicated that it was missing zmq.hpp File, manual download zmq.hpp File, put into / usr / include, rebuild, and use it successfully
haha! I tried libzmq 4.14 but found an error that no zmq.hpp, too. Now I update my ubuntu 18.04 to 20.04 and all is settled. Maybe next time if I find a similar error, I will try your method. Thanks!
from ns3-gym.
../src/opengym/model/opengym_interface.cc: In member function ‘void ns3::OpenGymInterface::NotifyCurrentState()’:
../src/opengym/model/opengym_interface.cc:259:36: error: ‘zmq::send_flags’ has not been declared
m_zmq_socket.send (request, zmq::send_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc:264:41: error: ‘zmq::recv_flags’ has not been declared
(void) m_zmq_socket.recv (reply, zmq::recv_flags::none);
^~~~~~~~~~
Waf: Leaving directory `/home/long/ns3-gym/ns3-gym-master/build'
Build failed
-> task in 'ns3-opengym' failed with exit status 1 (run with -v to display more information)
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 1
how to solve it?? thank you.
from ns3-gym.
I encountered the same problem. After manually downgrading libzmq to 4.14, the compiler still found an error and indicated that it was missing zmq.hpp File, manual download zmq.hpp File, put into / usr / include, rebuild, and use it successfully
where did you download zmq.hpp file ? I download and put into /usr/include,but some other errors occurred.It seems that send and recv function have changed with zmq.hpp updating.
error: 'send' is deprecated: from 4.3.1, use send taking message_t and send_flags [-Werror,-Wdeprecated-declarations]
m_zmq_socket.send (request);
error: 'recv' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Werror,-Wdeprecated-declarations]
m_zmq_socket.recv (&reply);
from ns3-gym.
Hi, firstly, thank the author for his great contribution.
Secondly, I encountered the same problem-- "zmq::send_flags has not been declared" under ubuntu16.04 using libzmq3-dev=4.1.4-7 and libzmq5=4.1.4-7. Hope someone can help.
from ns3-gym.
Related Issues (20)
- Installation Error HOT 3
- 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?
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.