Coder Social home page Coder Social logo

Comments (18)

confifu avatar confifu commented on July 17, 2024 7

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.

Zdarling avatar Zdarling commented on July 17, 2024 3

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.

Forsworns avatar Forsworns commented on July 17, 2024 2

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.

HyungjunJu avatar HyungjunJu commented on July 17, 2024 2

from ns3-gym.

HyungjunJu avatar HyungjunJu commented on July 17, 2024 1

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.

pgawlowicz avatar pgawlowicz commented on July 17, 2024

can you check which zmq version do you have installed?
probably you will need to update it

from ns3-gym.

bbalaji-ucsd avatar bbalaji-ucsd commented on July 17, 2024

Current libzmq version is 4.3.2
Current pyzmq version is 19.0.1

Seems to be the latest version?

from ns3-gym.

pgawlowicz avatar pgawlowicz commented on July 17, 2024

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.

Forsworns avatar Forsworns commented on July 17, 2024

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.

bbalaji-ucsd avatar bbalaji-ucsd commented on July 17, 2024

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.

bbalaji-ucsd avatar bbalaji-ucsd commented on July 17, 2024

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.

HyungjunJu avatar HyungjunJu commented on July 17, 2024

I'm suffering the same issue as you. Can you explain how the solved zmq version issue?

from ns3-gym.

mostafa-shaheen avatar mostafa-shaheen commented on July 17, 2024

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.

testMonkey02 avatar testMonkey02 commented on July 17, 2024

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.

testMonkey02 avatar testMonkey02 commented on July 17, 2024

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.

wanghelong666 avatar wanghelong666 commented on July 17, 2024

../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.

LiYufengzz avatar LiYufengzz commented on July 17, 2024

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.

wangxn2015 avatar wangxn2015 commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.