Skip to content

added missing dependency program - #71

Closed
rukyr97 wants to merge 3 commits into
tkn-tub:app-ns-3.36+from
rukyr97:rukyr97-patch-1
Closed

added missing dependency program#71
rukyr97 wants to merge 3 commits into
tkn-tub:app-ns-3.36+from
rukyr97:rukyr97-patch-1

Conversation

@rukyr97

@rukyr97 rukyr97 commented Oct 14, 2022

Copy link
Copy Markdown
Contributor

The installation of pkg-config was mandatory to be successful with running the ./ns3 configure command.

rukyr97 and others added 3 commits October 14, 2022 14:51
The installation of `pkg-config` was mandatory to be successful with running the `./ns3 configure` command.
@rukyr97 rukyr97 closed this Oct 14, 2022
@rukyr97
rukyr97 deleted the rukyr97-patch-1 branch October 14, 2022 15:29
@rukyr97
rukyr97 restored the rukyr97-patch-1 branch October 14, 2022 15:39
@rukyr97 rukyr97 reopened this Oct 14, 2022
@pgawlowicz

Copy link
Copy Markdown
Contributor

@rukyr97 thanks for this patch. I have applied the two first commits, as I have seen that there are some issues with the last one. Could you fix it? and do another PR?

@pgawlowicz pgawlowicz closed this May 9, 2023
@rukyr97

rukyr97 commented May 9, 2023

Copy link
Copy Markdown
Contributor Author

The last commit was to solve an issue I was having when running my ns-3 sim script.
For context, I use symbolic links to develop my work outside of the scratch/ folder in ns-3. This requirement of mine was not compliant with the current ns3-gym version. As far as I could tell model/ns3gym/ns3gym/start_sim.py using os.getcwd(), assumes that my ns-3 script would be placed within this scratch/ folder. The patch was a simple and "dirty" workaround to provide ns3-gym the source directory it should consider, avoiding the use of os.getcwd().

To make it work, simply provide the src_dir param in the Ns3Env constructor.


ns3_gym_env = ns3env.Ns3Env(port=port,
                                simSeed=seed,
                                startSim=True,
                                simArgs=sim_args,
                                debug=True,
                                src_dir="~/foo/bar")

For the content of the variable, I use
src_dir = os.path.abspath(os.path.dirname(__file__)) but again it is specific for my use case and it depends on what the user may need :)

@rukyr97

rukyr97 commented May 9, 2023

Copy link
Copy Markdown
Contributor Author

Actually, I was just refreshing my memory and now I remember that this PR has some issues, but #72 fixes them, iirc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants