direct-code-execution / ns-3-dce

Run real programs in the discrete time simulator ns3
http://www.nsnam.org/projects/direct-code-execution/
75 stars 46 forks source link

DCE installiation with exisitng ns3.27 #71

Open ranimRR opened 6 years ago

ranimRR commented 6 years ago

Description of the problem

I already have ns3.27 and I want to execute DCE codes but I am not sure what is the correct way to add DCE wirh existing n3.27. I tried multiple methods but it seems that they are not working

Method I tried:

cd ns3/ns-allinone-3.27/ns-3.27/

./waf configure --enable-examples -d optimized --prefix=$HOME/dce/build \ --includedir=$HOME/dce/include/ns-3.27

Error:

Setting top to : /home/ranim/ns3/ns-allinone-3.27/ns-3.27 Setting out to : /home/ranim/ns3/ns-allinone-3.27/ns-3.27/build Checking for 'gcc' (C compiler) : /usr/bin/gcc Checking for cc version : 5.4.0 Checking for 'g++' (C++ compiler) : /usr/bin/g++ Checking for compilation flag -march=native support : ok Checking for compilation flag -Wl,--soname=foo support : ok Checking for program 'python' : /usr/bin/python Checking for python version : (2, 7, 12, 'final', 0) python-config : /usr/bin/python-config Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes Testing pyembed configuration : yes Asking python-config for pyext '--cflags --libs --ldflags' flags : yes Testing pyext configuration : yes Checking for compilation flag -fvisibility=hidden support : ok Checking for compilation flag -Wno-array-bounds support : ok Checking for pybindgen location : ../pybindgen-0.17.0.post58+ngcf00cc0 (guessed) Checking for python module 'pybindgen' : 0.17.0.post58+gcf00cc0 Checking for pybindgen version : 0.17.0.post58+gcf00cc0 Checking for code snippet : yes Checking for types uint64_t and unsigned long equivalence : no Checking for code snippet : no Checking for types uint64_t and unsigned long long equivalence : yes Checking for the apidefs that can be used for Python bindings : gcc-LP64 Checking for internal GCC cxxabi : complete Checking for python module 'pygccxml' : not found Checking boost includes : 1_58 Checking boost libs : ok Checking for boost linkage : ok Checking for click location : not found Checking for program 'pkg-config' : /usr/bin/pkg-config Checking for 'gtk+-2.0' >= 2.12 : yes Checking for 'libxml-2.0' >= 2.7 : yes Checking for type uint128_t : not found Checking for type uint128_t : yes Checking high precision implementation : 128-bit integer (default) Checking for header stdint.h : yes Checking for header inttypes.h : yes Checking for header sys/inttypes.h : not found Checking for header sys/types.h : yes Checking for header sys/stat.h : yes Checking for header dirent.h : yes Checking for header stdlib.h : yes Checking for header signal.h : yes Checking for header pthread.h : yes Checking for header stdint.h : yes Checking for header inttypes.h : yes Checking for header sys/inttypes.h : not found Checking for library rt : yes Checking for header sys/ioctl.h : yes Checking for header net/if.h : yes Checking for header net/ethernet.h : yes Checking for header linux/if_tun.h : yes Checking for header netpacket/packet.h : yes Checking for NSC location : not found Checking for cc version : 5.4.0 Checking for pkg-config version >= '0.0.0' : yes Checking for -Wl,--soname=foo : yes Traceback (most recent call last): File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 110, in waf_entry_point run_commands() File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 171, in run_commands ctx=run_command(cmd_name) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 162, in run_command ctx.execute() File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Configure.py", line 87, in execute super(ConfigurationContext,self).execute() File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 93, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 134, in recurse user_function(self) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/wscript", line 459, in configure conf.recurse('src') File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 134, in recurse user_function(self) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/src/wscript", line 69, in configure conf.recurse(module, mandatory=False) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 134, in recurse user_function(self) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/src/ns-3-dce/wscript", line 100, in configure ns3waf.check_modules(conf, ['core', 'network', 'internet'], mandatory = True) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/src/ns-3-dce/ns3waf/init.py", line 269, in check_modules _check_dependencies(conf, modules, mandatory) File "/home/ranim/ns3/ns-allinone-3.27/ns-3.27/src/ns-3-dce/ns3waf/init__.py", line 157, in _check_dependencies pcfiles = glob.glob(conf.env['NS3_DIR'] + '/lib/pkgconfig/' + 'libns%s-%s-%s*' TypeError: can only concatenate list (not "str") to list

teto commented 6 years ago

There are links towards documentation at https://github.com/direct-code-execution/ns-3-dce, for instance https://www.nsnam.org/docs/dce/manual/html/getting-started.html . What doesn't work there ?

ranimRR commented 6 years ago

@teto Thank you for your help. Bake only installed ns3.26 and I have to use ns3.27. The instructions with WAF are not clear to me. I tried to put net-next-sim and ns-3-dce in the src folder of ns3.27 and execute WAF in the ns-3-dce and ns3.27 but it did not work.

teto commented 6 years ago

You can have a look at the different targets of bake to install dce + linux in the bakeconf.xml, for instance look at https://github.com/direct-code-execution/bake/blob/827bf0ab4318ce487539da87d73264fae2b3fbb1/bakeconf.xml#L2521

EngKhaled91 commented 5 years ago

Hello, I have the same problem, any one have a solution for that ?

teto commented 5 years ago

you should install ns-3 with ./waf install and the set the install path through ./waf configure --with-ns3=/path/to/ns3/installation

EngKhaled91 commented 5 years ago

thanks @teto , I've installed ns3 using bake and build it successfully using ./waf, and add --with-ns3 parameter when configuring dce but I got configuration failed like this: image you mean path installation the folder that contains waf files ?

teto commented 5 years ago

you should set a value for --with-ns3: what's your full command line ? look in the log to see what is the failure.

EngKhaled91 commented 5 years ago

my command is "./waf configure --with-ns3=/home/kh91/ns3-mmwave-2.0" and this the path of my ns3 folder where waf located. my log where the problem occurs: image thanks alot