tkn-tub / ns3-gym

ns3-gym - The Playground for Reinforcement Learning in Networking Research
GNU General Public License v2.0
521 stars 197 forks source link

Undefined Reference to google::protobuf #16

Closed cbowers1020 closed 5 years ago

cbowers1020 commented 5 years ago

I have installed all of the dependencies etc. as stated in the installation instructions at https://apps.nsnam.org/app/ns3-gym/, but when I build ns3, ns3-gym with examples enabled I receive the following error:

contrib/opengym/examples/opengym/sim.cc.1.o: In function google::protobuf::Arena::AllocHook(std::type_info const*, unsigned long) const': /usr/local/include/google/protobuf/arena.h:644: undefined reference togoogle::protobuf::Arena::OnArenaAllocation(std::type_info const*, unsigned long) const'

This is just the first in a long line of errors that provide the same info: undefined reference to google::protobuf.

I have tried removing different versions of protobuf from /usr and /usr/local, but that has not resolved this issue.

mitsuosakamoto commented 5 years ago

Hi, I faced same issue on Ubuntu 18.04. However, I have not seen this on Ubuntu 16.04 so far. Can some one confirm ns3-gym works only on Ubuntu 16.04?

weiyuxingchen commented 5 years ago

I have the same question

pgawlowicz commented 5 years ago

Hi,

I have just installed ns3-gym on fresh Ubuntu 18.04. All the examples runs without any problems.

I have the following versions:

$ protoc --version
libprotoc 3.0.0

and

$ pip3 show protobuf
Name: protobuf
Version: 3.9.0
Summary: Protocol Buffers

Be aware that in Ubuntu 18.04 you do not execute those line from the installation description:

sudo add-apt-repository ppa:maarten-fonville/protobuf
sudo apt-get update

Best, Piotr

TrumanZhang commented 5 years ago

I have the same question on Ubuntu 16.04. I have tried to installed protocol buffer with version 3.1, 3.6 and 3.9, but the errors are the same.