Many many thanks for your extremely fast reply. I followed your advice, which coincidentally was my conclusion at the end as well to import the module from the NS-3.13 release to the current stable version of NS (3.24.1). However, it is harder than one can imagine. I had absolutely no idea with what am I messing with. Just to note that regarding the information using different flags for the compiler I had stumbled across the link you also provided me with but it did not seem to make much difference during compilation in my case (at least with my untrained eye). Therefore I continue with the new errors trying to import the “physim-wifi” module to ns-3.24.1. After creating the directory structure with “./create-module.py” I started again the procedure with ./waf configure in order to move to ./waf at some point.
First error was the following:
File "/home/viktor/Documents/ns-allinone-3.24.1/ns-3.24.1/src/physim-wifi/wscript", line 4, in configure
have_itpp = conf.pkg_check_modules('IT++', 'itpp', mandatory=True)
This problem I think it is easily solved using help from here (which I followed) [http://permalink.gmane.org/gmane.network.simulator.ns3.user/30118] and making the following changes to the waf script for physim-wifi
Instead of
def configure(conf):
have_itpp = conf.pkg_check_modules('IT++', 'itpp', mandatory=True)
conf.env['ENABLE_ITPP'] = have_itpp
conf.report_optional_feature("IT++", "IT++ library",
conf.env['ENABLE_ITPP'],
"IT++ not found")
I replaced it with
def configure(conf):
# have_itpp = conf.pkg_check_modules('IT++', 'itpp', mandatory=True)
# conf.env['ENABLE_ITPP'] = have_itpp
conf.env['ENABLE_ITPP'] = conf.check(mandatory=True, lib='itpp', define_name='IT++', uselib_store='IT++')
conf.report_optional_feature("IT++", "IT++ library",
conf.env['ENABLE_ITPP'],
"IT++ not found")
It seems to work for a moment, but when moving to ./waf then the following error comes up in the surface.
File "/home/viktor/Documents/ns-allinone-3.24.1/ns-3.24.1/src/physim-wifi/wscript", line 53, in build
headers = bld.new_task_gen(features=['ns3header'])
which I think that with careful inspection is also easily solved by replacing the previous line with the following in the wscript.
headers = bld(features='ns3header')
Then there is another message regarding the “Examples”
File "/home/viktor/Documents/ns-allinone-3.24.1/ns-3.24.1/src/physim-wifi/wscript", line 77, in build
bld.add_subdirs('examples')
which again I think is solved by replacing the above line with the following:
bld.recurse('examples')
Then I got the following error which was solved using your advice as well.
<command-line>:0:3: error: missing whitespace after the macro name [-Werror]
cc1plus: all warnings being treated as errors
Waf: Leaving directory `/home/viktor/Documents/ns-allinone-3.24.1/ns-3.24.1/build'
Build failed
-> task in 'ns3-wave-test' failed (exit status 1):
{task 140322515698768: cxx ocb-test-suite.cc -> ocb-test-suite.cc.3.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-DNO_INT_SIZE_CHECK', '-I../src/wave', '-fPIC', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/freetype2', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/harfbuzz', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DIT++=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', '-DNS_TEST_SOURCEDIR="src/wave/test"', '../src/wave/test/ocb-test-suite.cc', '-c', '-o', '/home/viktor/Documents/ns-allinone-3.24.1/ns-3.24.1/build/src/wave/test/ocb-test-suite.cc.3.o']
<command-line>:0:3: error: missing whitespace after the macro name [-Werror]
cc1plus: all warnings being treated as errors
and now finally I have stuck here:
../src/physim-wifi/test/physim-wifi-transmitter-receiver-test.cc:33:33: fatal error: ns3/random-variable.h: No such file or directory
#include "ns3/random-variable.h"
Which was solved using your online advice ;-) from here [https://groups.google.com/forum/#!topic/ns-3-users/VdAt1U7qqbc]. I admit this error appeared a coupled of times!!!
But now I am stuck in the following error message:
In file included from ../src/physim-wifi/examples/physim-wifi-example.cc:4:0:
./ns3/physim-wifi-helper.h:157:30: error: invalid abstract return type for function ‘static ns3::PhySimWifiPhyHelper ns3::PhySimWifiPhyHelper::Default()’
static PhySimWifiPhyHelper Default (void);
^
./ns3/physim-wifi-helper.h:143:7: note: because the following virtual functions are pure within ‘ns3::PhySimWifiPhyHelper’:
class PhySimWifiPhyHelper : public WifiPhyHelper,
^
In file included from ./ns3/physim-wifi-helper.h:28:0,
from ../src/physim-wifi/examples/physim-wifi-example.cc:4:
./ns3/wifi-helper.h:65:24: note: virtual ns3::Ptr<ns3::WifiPhy> ns3::WifiPhyHelper::Create(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::NetDevice>) const
virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<NetDevice> device) const = 0;
What changes do I have to make in the PhySim module regarding the new version of Random-Variable-Stream Header that is used by the newer NS3 versions? Have you faced anything similar before?
Please, your help and any hint & tip will prove invaluable. Thanks in advance!!!
Best Regards,
Viktor
P.S. My long message did not intent to bore or overkill YOU with details, but I posted it as mere guide to others that may face similar problems like me. Therefore I have all the steps and helpful sources gathered and posted here.