hust-diangroup / ns3-ai

Enable the interaction between ns-3 and popular frameworks using Python, which mean you can train and test your AI algorithms in ns-3 without changing any frameworks you are using now!
GNU General Public License v2.0
220 stars 80 forks source link

ns3ai Installation #102

Closed C-Hutch92 closed 3 months ago

C-Hutch92 commented 10 months ago

Hi All,

I'm having troubles running the ./ns3 configure after installing ns3-ai into the contrib folder. I get the following error:

CMake Error at scratch/CMakeLists.txt:54 (target_link_libraries):
Target "scratch_scratch-simulator" links to:
Boost::program_options

but the target was not found.  Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first):
scratch/CMakeLists.txt:67 (create_scratch)

I'm not sure how to debug this. I think I have installed the requirements correctly as boost and protobuf appear as a library in the /usr/lib directory.

A few things to note:

Any help regarding my problem is appreciated!

Many thanks, C

MarkMCode commented 8 months ago

Hi C,

I just ran into this issue, and it seemed to be caused by using an older version of NS3, v3.36. I saw on the app store listing for ns3-ai that the module supports v3.38, so I installed that version and tried again, seemingly successfully with no error messages.

All the best, Mark

MarkMCode commented 7 months ago

As an update, I kept running into issues installing ns3-ai from the Github repo, but installing the version from the ns-3 app store seems to have worked for me. Recommend that anyone wrestling with installation issues gives it a try, just be sure to follow the installation instructions from the store, not the Github repo.

Kakadus commented 7 months ago

The problem seems to be an invalid entry in CMakeLists.txt: https://github.com/hust-diangroup/ns3-ai/blob/120dbb1798e2409640d818fd78fc2dd2bd335107/CMakeLists.txt#L79 If I remove Boost::program_options and replace protobuf::libprotobuf with protobuf, it works for me. If I have time, I will open a PR