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

ns3-gym installation issues on macOS Mojave (ns3/opengym-module.h file not found) #19

Open amitabhaghosh opened 4 years ago

amitabhaghosh commented 4 years ago

I seem to get some weird ./waf build errors (ns3/opengym-module.h file not found) while trying to install ns3-gym on macOS Mojave 10.14.5.

I ran configure with: ./waf configure --disable-werror --enable-examples --enable-tests

And then did: ./waf build

which gave the following errors. I don't seem to have the "opengym-module.h" file anywhere in the source code. Is that file auto-generated, or can I download it from somewhere?

I've Python 3.6.4, and also installed both protobuf (libprotoc 3.6.0) and zmq (zeromq 4.3.2).

[2518/2585] Compiling scratch/linear-mesh/sim.cc In file included from ../scratch/opengym-2/mygym.cc:21: ../scratch/opengym-2/mygym.h:25:10: fatal error: **'ns3/opengym-module.h' file not found

include "ns3/opengym-module.h"**

     ^~~~~~~~~~~~~~~~~~~~~~

1 error generated.

../scratch/opengym-2/sim.cc:23:10: fatal error: **'ns3/opengym-module.h' file not found

include "ns3/opengym-module.h"**

     ^~~~~~~~~~~~~~~~~~~~~~

1 error generated.

../scratch/linear-mesh/sim.cc:24:10: fatal error: **'ns3/opengym-module.h' file not found

include "ns3/opengym-module.h"**

     ^~~~~~~~~~~~~~~~~~~~~~

1 error generated.

Waf: Leaving directory `/Users/amitabha_ghosh/Work/GIT/ns3-gym/build'

Any help would be much appreciated.

Thank you, Amitabha

zhangmwg commented 4 years ago

opengym-module corresponds to src/opengym

Forsworns commented 4 years ago

Maybe you can refer to the 18th issue if you still get interested :)

sanjayjaiman commented 2 years ago

I cannot get rid of this error on the MAC. By installing protoc version 3.18.0 I have been able to run on Ubuntu. But on the MAC i cannot get rid of the same error. At what stage of the build does "opengym-module.h" get generated?

On Ubuntu -

find . -name opengym-module.h -print ./build/ns3/opengym-module.h

On Mac - Same command produces no results.

There is something in the file "src/opengym/wscript" that is not working. Maybe someone can help.

Error messages are of the sort -

In file included from ../scratch/interference-pattern/sim.cc:32: ../scratch/interference-pattern/mygym.h:26:10: fatal error: 'ns3/opengym-module.h' file not found

include "ns3/opengym-module.h"

     ^~~~~~~~~~~~~~~~~~~~~~

1 error generated.

sanjayjaiman commented 2 years ago

After correctly installing "protobuf 3.18.0" and "zeromq", the above problem was resolved. Also, I deleted the "build" directory, ran "waf configure" again and re-built.

zubow commented 2 years ago

Great to hear.