ns3-gym icon indicating copy to clipboard operation
ns3-gym copied to clipboard

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

Open amitabhaghosh opened this issue 5 years ago • 5 comments

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

amitabhaghosh avatar Sep 30 '19 15:09 amitabhaghosh

opengym-module corresponds to src/opengym

zhangmwg avatar Oct 05 '19 06:10 zhangmwg

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

Forsworns avatar Jun 23 '20 01:06 Forsworns

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 avatar Dec 08 '21 23:12 sanjayjaiman

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.

sanjayjaiman avatar Dec 09 '21 19:12 sanjayjaiman

Great to hear.

zubow avatar Dec 10 '21 07:12 zubow