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

Error loading shared libraries when running the example #79

Open aleksaa13 opened 1 year ago

aleksaa13 commented 1 year ago

Hello everyone,

I am trying to connect aqua-sim-ng and ns3-ai in order to run ML driven UWAN simulations. Thus (in order for aqua-sim-ng to work properly) I am using ns3.27. I was able to run ns3-ai on latest ns3 versions without any problems.

However, when I try to run a+b example I get the following error.

Capture

I can find the library existing and I tried quite a few ways of solving this (updating paths, ldconfig) but nothing seems to work so far.

I feel like I'm missing something quite simple but important, anyone may know why this error keeps popping out?

ShenMuyuan commented 1 year ago

Hi aleksaa13,

what is the version of ubuntu? (looks like you are using ubuntu linux) I tried ns3.27 on ubuntu 22.04 but even the 'waf' script cannot run. The initial command is ./waf configure --build-profile=debug --enable-examples --enable-tests, and many errors.

root@94e13f878a72:/home/ns-allinone-3.27/ns-3.27# ./waf configure --build-profile=debug --enable-examples --enable-tests
Traceback (most recent call last):
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Node.py", line 312, in ant_iter
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 110, in waf_entry_point
    run_commands()
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 167, in run_commands
    parse_options()
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 140, in parse_options
    Context.create_context('options').execute()
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Options.py", line 146, in execute
    super(OptionsContext,self).execute()
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 93, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 134, in recurse
    user_function(self)
  File "/home/ns-allinone-3.27/ns-3.27/wscript", line 144, in options
    opt.load('compiler_c')
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 90, in load
    fun(self)
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/compiler_c.py", line 36, in options
    opt.load_special_tools('c_*.py',ban=['c_dumbpreproc.py'])
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 321, in load_special_tools
    lst=self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var)
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Node.py", line 361, in ant_glob
    ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
  File "/home/ns-allinone-3.27/ns-3.27/.waf3-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Node.py", line 361, in <listcomp>
    ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
RuntimeError: generator raised StopIteration