How to apply patch

127 views
Skip to first unread message

Arun

unread,
Mar 7, 2019, 11:35:38 AM3/7/19
to ns-3-users
I have a model , I got it from the https://codereview.appspot.com/5615049/  , I want to path that to my Ns3 model then I downloaded I got a .tar.bz2 file then I extracted , I got two folder a and b . How can I patch this to my ns3 program using patch.

Tom Henderson

unread,
Mar 7, 2019, 11:52:57 AM3/7/19
to ns-3-...@googlegroups.com
Arun, download the 'Raw' instead of tar.bz2 version.

https://codereview.appspot.com/download/issue5615049_1.diff

This will yield a patch that you can try to patch ns-3 with.

"cd ns-3-dev; patch -p1 -i issue5615049_1.diff"

In this case, this will yield a new src/switched-ethernet module; i.e.
there will not be any patch failure.

However, please note that this patch is from _7 years ago_. I am sure
that there will be some compilation issues due to ns-3 API changes (and
different sensitivity to compiler warnings)-- you will have to fight
through those.

If you manage to sort those out, please consider to contribute back an
updated patch to the project.

- Tom

arun soman

unread,
Mar 7, 2019, 1:09:59 PM3/7/19
to ns-3-...@googlegroups.com
Hi Tom,
I can not able to go back to 7 years back, because my latest ns-3.29 in my aws cloud. I have another question like  BridgeHelper , can I just create my own bridge like ArunbridgeHelper , my intention is to just change the helper name is it possible?. if yes how can I able to do that?.



--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lvLzKlCGMUQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.


--
Arun Soman


Tom Henderson

unread,
Mar 8, 2019, 1:37:43 PM3/8/19
to ns-3-...@googlegroups.com
On 3/7/19 10:09 AM, arun soman wrote:
> Hi Tom,
> I can not able to go back to 7 years back, because my latest ns-3.29 in
> my aws cloud. I have another question like  BridgeHelper , can I just
> create my own bridge like ArunbridgeHelper , my intention is to just
> change the helper name is it possible?. if yes how can I able to do that?.

Arun,
Have you tried to get it to run before giving up so fast? It may not
require much work. It may help others in the future if you are able to
slightly update it to work with current code.

- Tom

arun soman

unread,
Mar 8, 2019, 1:41:17 PM3/8/19
to ns-3-...@googlegroups.com
Sorry because of dead line I was post pond. I am going to start it now even though I have dead line , If it is works then that is very good .

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lvLzKlCGMUQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.


--
Arun Soman


arun soman

unread,
Mar 8, 2019, 2:04:45 PM3/8/19
to ns-3-...@googlegroups.com
Hi, 
I am getting the following errors when I am running a program after patched  swithced ethernet to my Ns3.

Traceback (most recent call last):
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Scripting.py", line 118, in waf_entry_point
    run_commands()
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Scripting.py", line 178, in run_commands
    ctx=run_command(cmd_name)
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Scripting.py", line 169, in run_command
    ctx.execute()
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Scripting.py", line 366, in execute
    return execute_method(self)
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Build.py", line 93, in execute
    self.execute_build()
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Build.py", line 96, in execute_build
    self.recurse([self.run_dir])
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Context.py", line 126, in recurse
    user_function(self)
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/wscript", line 871, in build
    bld.recurse('src')
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Context.py", line 126, in recurse
    user_function(self)
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/src/wscript", line 327, in build
    bld.recurse(list(all_modules))
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/.waf-2.0.9-897e824215d3dab2b64982d8af27db90/waflib/Context.py", line 126, in recurse
    user_function(self)
  File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/src/switched-ethernet/wscript", line 10, in build
    headers = bld.new_task_gen(features=['ns3header'])
AttributeError: 'BuildContext' object has no attribute 'new_task_gen'

--
Arun Soman


Tom Henderson

unread,
Mar 8, 2019, 2:53:51 PM3/8/19
to ns-3-...@googlegroups.com
Change that offending line to

headers = bld(features='ns3header')
> <mailto:ns-3-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to ns-3-...@googlegroups.com
> <mailto:ns-3-...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Arun Soman
>
> <mailto:arun...@rajagiritech.ac.in>
>
>
>
> --
> Arun Soman
>
> <mailto:arun...@rajagiritech.ac.in>
>
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users+...@googlegroups.com>.
> To post to this group, send email to ns-3-...@googlegroups.com
> <mailto:ns-3-...@googlegroups.com>.

arun soman

unread,
Mar 8, 2019, 3:16:30 PM3/8/19
to ns-3-...@googlegroups.com
Where I have to add this line

headers = bld(features='ns3header')
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.


--
Arun Soman


arun soman

unread,
Mar 8, 2019, 3:41:21 PM3/8/19
to ns-3-...@googlegroups.com
I understand where I have to change sorry in 
File "/home/arun/Downloads/ns-allinone-3.29/ns-3.29/src/switched-ethernet/wscript", line 10, in build
    headers = bld.new_task_gen(features=['ns3header'])
--
Arun Soman


arun soman

unread,
Mar 8, 2019, 4:00:02 PM3/8/19
to ns-3-...@googlegroups.com
I have also changed 

bld.add_subdirs('examples')
to
bld.recurse('examples')

but the new error look like


../src/switched-ethernet/model/switched-ethernet-net-device.h:37:10: fatal error: ns3/random-variable.h: No such file or directory
 #include "ns3/random-variable.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

In file included from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:28:0:
./ns3/switched-ethernet-net-device.h:37:10: fatal error: ns3/random-variable.h: No such file or directory
 #include "ns3/random-variable.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

In file included from ../src/switched-ethernet/model/switched-ethernet-channel.cc:24:0:
../src/switched-ethernet/model/switched-ethernet-net-device.h:37:10: fatal error: ns3/random-variable.h: No such file or directory
 #include "ns3/random-variable.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Waf: Leaving directory `/home/arun/Downloads/ns-allinone-3.29/ns-3.29/build'
Build failed
 -> task in 'ns3-switched-ethernet' failed with exit status 1 (run with -v to display more information)
 -> task in 'ns3-switched-ethernet' failed with exit status 1 (run with -v to display more information)
 -> task in 'ns3-switched-ethernet' failed with exit status 1 (run with -v to display more information)
--
Arun Soman


arun soman

unread,
Mar 8, 2019, 4:04:24 PM3/8/19
to ns-3-...@googlegroups.com
Hi,
in ns3 folder I have seen that two header files like

random-variable-stream.h
random-variable-stream-helper.h

so should I change  random-variable.h to  random-variable-stream.h ??
--
Arun Soman


arun soman

unread,
Mar 8, 2019, 4:21:49 PM3/8/19
to ns-3-...@googlegroups.com
I changed that then I got a big error  related with queue


In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:36:0:
../src/switched-ethernet/model/switched-ethernet-net-device.h:42:7: error: template argument required for ‘class Queue’
 class Queue;
       ^~~~~
../src/switched-ethernet/model/switched-ethernet-net-device.h:113:27: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   void SetQueue (Ptr<Queue> queue);
                           ^
../src/switched-ethernet/model/switched-ethernet-net-device.h:113:27: note:   expected a type, got ‘Queue’
../src/switched-ethernet/model/switched-ethernet-net-device.h:120:12: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   Ptr<Queue> GetQueue (void) const;
            ^
../src/switched-ethernet/model/switched-ethernet-net-device.h:120:12: note:   expected a type, got ‘Queue’
../src/switched-ethernet/model/switched-ethernet-net-device.h:491:12: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   Ptr<Queue> m_queue;
            ^
../src/switched-ethernet/model/switched-ethernet-net-device.h:491:12: note:   expected a type, got ‘Queue’
In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:37:0:
../src/switched-ethernet/model/switched-ethernet-channel.h:253:20: error: conflicting return type specified for ‘virtual uint32_t ns3::SwitchedEthernetChannel::GetNDevices() const’
   virtual uint32_t GetNDevices (void) const;
                    ^~~~~~~~~~~
In file included from ../src/switched-ethernet/model/switched-ethernet-channel.h:26:0,
                 from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:37:
./ns3/channel.h:68:23: error:   overriding ‘virtual std::size_t ns3::Channel::GetNDevices() const’
   virtual std::size_t GetNDevices (void) const = 0;
                       ^~~~~~~~~~~
../src/switched-ethernet/model/switched-ethernet-net-device.cc: In static member function ‘static ns3::TypeId ns3::SwitchedEthernetNetDevice::GetTypeId()’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:91:47: error: no matching function for call to ‘MakePointerChecker<template<class Item> class ns3::Queue>()’
                    MakePointerChecker<Queue> ())
                                               ^
In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:34:0:
./ns3/pointer.h:224:1: note: candidate: template<class T> ns3::Ptr<ns3::AttributeChecker> ns3::MakePointerChecker()
 MakePointerChecker (void)
 ^~~~~~~~~~~~~~~~~~
./ns3/pointer.h:224:1: note:   template argument deduction/substitution failed:
../src/switched-ethernet/model/switched-ethernet-net-device.cc: In member function ‘void ns3::SwitchedEthernetNetDevice::TransmitStart()’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:465:74: warning: ‘double ns3::DataRate::CalculateTxTime(uint32_t) const’ is deprecated [-Wdeprecated-declarations]
    Time tEvent = Seconds (m_bps.CalculateTxTime (m_currentPkt->GetSize ()));
                                                                          ^
In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.h:35:0,
                 from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:36:
./ns3/data-rate.h:192:10: note: declared here
   double CalculateTxTime (uint32_t bytes) const;
          ^~~~~~~~~~~~~~~
../src/switched-ethernet/model/switched-ethernet-net-device.cc: In member function ‘void ns3::SwitchedEthernetNetDevice::TransmitAbort()’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:503:14: error: base operand of ‘->’ is not a pointer
   if (m_queue->IsEmpty ())
              ^~
../src/switched-ethernet/model/switched-ethernet-net-device.cc:509:29: error: base operand of ‘->’ is not a pointer
       m_currentPkt = m_queue->Dequeue ();
                             ^~
../src/switched-ethernet/model/switched-ethernet-net-device.cc: In member function ‘void ns3::SwitchedEthernetNetDevice::TransmitReadyEvent()’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:575:14: error: base operand of ‘->’ is not a pointer
   if (m_queue->IsEmpty ())
              ^~
../src/switched-ethernet/model/switched-ethernet-net-device.cc:581:29: error: base operand of ‘->’ is not a pointer
       m_currentPkt = m_queue->Dequeue ();
                             ^~
../src/switched-ethernet/model/switched-ethernet-net-device.cc: In member function ‘bool ns3::SwitchedEthernetNetDevice::Attach(ns3::Ptr<ns3::SwitchedEthernetChannel>)’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:608:58: warning: ‘double ns3::DataRate::CalculateTxTime(uint32_t) const’ is deprecated [-Wdeprecated-declarations]
   m_tInterframeGap = Seconds (m_bps.CalculateTxTime (96/8));
                                                          ^
In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.h:35:0,
                 from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:36:
./ns3/data-rate.h:192:10: note: declared here
   double CalculateTxTime (uint32_t bytes) const;
          ^~~~~~~~~~~~~~~
../src/switched-ethernet/model/switched-ethernet-net-device.cc: At global scope:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:619:47: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
 SwitchedEthernetNetDevice::SetQueue (Ptr<Queue> q)
                                               ^
../src/switched-ethernet/model/switched-ethernet-net-device.cc:619:47: note:   expected a type, got ‘Queue’
../src/switched-ethernet/model/switched-ethernet-net-device.cc:762:12: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   Ptr<Queue>
            ^
../src/switched-ethernet/model/switched-ethernet-net-device.cc:762:12: note:   expected a type, got ‘Queue’
../src/switched-ethernet/model/switched-ethernet-net-device.cc: In member function ‘virtual bool ns3::SwitchedEthernetNetDevice::SendFrom(ns3::Ptr<ns3::Packet>, const ns3::Address&, const ns3::Address&, uint16_t)’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:914:14: error: base operand of ‘->’ is not a pointer
   if (m_queue->Enqueue(packet) == false)
              ^~
../src/switched-ethernet/model/switched-ethernet-net-device.cc:927:18: error: base operand of ‘->’ is not a pointer
       if (m_queue->IsEmpty () == false)
                  ^~
../src/switched-ethernet/model/switched-ethernet-net-device.cc:929:33: error: base operand of ‘->’ is not a pointer
           m_currentPkt = m_queue->Dequeue ();
                                 ^~
In file included from ./ns3/type-id.h:24:0,
                 from ./ns3/object-base.h:23,
                 from ./ns3/chunk.h:24,
                 from ./ns3/header.h:24,
                 from ./ns3/packet.h:25,
                 from ./ns3/queue.h:26,
                 from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:25:
./ns3/attribute-accessor-helper.h: In instantiation of ‘bool ns3::DoMakeAccessorHelperOne(U T::*)::MemberVariable::DoSet(T*, const V*) const [with V = ns3::PointerValue; T = ns3::SwitchedEthernetNetDevice; U = int]’:
./ns3/attribute-accessor-helper.h:293:3:   required from ‘ns3::Ptr<const ns3::AttributeAccessor> ns3::DoMakeAccessorHelperOne(U T::*) [with V = ns3::PointerValue; T = ns3::SwitchedEthernetNetDevice; U = int]’
./ns3/attribute-accessor-helper.h:578:37:   required from ‘ns3::Ptr<const ns3::AttributeAccessor> ns3::MakeAccessorHelper(T1) [with V = ns3::PointerValue; T1 = int ns3::SwitchedEthernetNetDevice::*]’
./ns3/pointer.h:220:1:   required from ‘ns3::Ptr<const ns3::AttributeAccessor> ns3::MakePointerAccessor(T1) [with T1 = int ns3::SwitchedEthernetNetDevice::*]’
../src/switched-ethernet/model/switched-ethernet-net-device.cc:90:76:   required from here
./ns3/attribute-accessor-helper.h:273:12: error: no matching function for call to ‘ns3::PointerValue::GetAccessor(ns3::AccessorTrait<int>::Result&) const’
       bool ok = v->GetAccessor (tmp);
            ^~
In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:34:0:
./ns3/pointer.h:208:1: note: candidate: template<class T> bool ns3::PointerValue::GetAccessor(ns3::Ptr<T>&) const
 PointerValue::GetAccessor (Ptr<T> &v) const
 ^~~~~~~~~~~~
./ns3/pointer.h:208:1: note:   template argument deduction/substitution failed:
In file included from ./ns3/type-id.h:24:0,
                 from ./ns3/object-base.h:23,
                 from ./ns3/chunk.h:24,
                 from ./ns3/header.h:24,
                 from ./ns3/packet.h:25,
                 from ./ns3/queue.h:26,
                 from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:25:
./ns3/attribute-accessor-helper.h:273:12: note:   mismatched types ‘ns3::Ptr<T>’ and ‘ns3::AccessorTrait<int>::Result {aka int}’
       bool ok = v->GetAccessor (tmp);
            ^~
./ns3/attribute-accessor-helper.h: In instantiation of ‘bool ns3::DoMakeAccessorHelperOne(U T::*)::MemberVariable::DoGet(const T*, V*) const [with V = ns3::PointerValue; T = ns3::SwitchedEthernetNetDevice; U = int]’:
../src/switched-ethernet/model/switched-ethernet-net-device.cc:990:1:   required from here
./ns3/attribute-accessor-helper.h:282:7: error: no matching function for call to ‘ns3::PointerValue::Set(const int&)’
       v->Set (object->*m_memberVariable);
       ^
In file included from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:34:0:
./ns3/pointer.h:187:1: note: candidate: template<class T> void ns3::PointerValue::Set(const ns3::Ptr<T>&)
 PointerValue::Set (const Ptr<T> &object)
 ^~~~~~~~~~~~
./ns3/pointer.h:187:1: note:   template argument deduction/substitution failed:
In file included from ./ns3/type-id.h:24:0,
                 from ./ns3/object-base.h:23,
                 from ./ns3/chunk.h:24,
                 from ./ns3/header.h:24,
                 from ./ns3/packet.h:25,
                 from ./ns3/queue.h:26,
                 from ../src/switched-ethernet/model/switched-ethernet-net-device.cc:25:
./ns3/attribute-accessor-helper.h:282:7: note:   mismatched types ‘const ns3::Ptr<T>’ and ‘const int’
       v->Set (object->*m_memberVariable);
       ^

In file included from ../src/switched-ethernet/model/switched-ethernet-channel.cc:23:0:
../src/switched-ethernet/model/switched-ethernet-channel.h:253:20: error: conflicting return type specified for ‘virtual uint32_t ns3::SwitchedEthernetChannel::GetNDevices() const’
   virtual uint32_t GetNDevices (void) const;
                    ^~~~~~~~~~~
In file included from ../src/switched-ethernet/model/switched-ethernet-channel.h:26:0,
                 from ../src/switched-ethernet/model/switched-ethernet-channel.cc:23:
./ns3/channel.h:68:23: error:   overriding ‘virtual std::size_t ns3::Channel::GetNDevices() const’
   virtual std::size_t GetNDevices (void) const = 0;
                       ^~~~~~~~~~~
In file included from ./ns3/object-base.h:23:0,
                 from ./ns3/object.h:29,
                 from ./ns3/channel.h:22,
                 from ../src/switched-ethernet/model/switched-ethernet-channel.h:26,
                 from ../src/switched-ethernet/model/switched-ethernet-channel.cc:23:
./ns3/type-id.h: In instantiation of ‘static ns3::ObjectBase* ns3::TypeId::AddConstructor()::Maker::Create() [with T = ns3::SwitchedEthernetChannel]’:
./ns3/type-id.h:659:3:   required from ‘ns3::TypeId ns3::TypeId::AddConstructor() [with T = ns3::SwitchedEthernetChannel]’
../src/switched-ethernet/model/switched-ethernet-channel.cc:40:47:   required from here
./ns3/type-id.h:656:27: error: invalid new-expression of abstract class type ‘ns3::SwitchedEthernetChannel’
       ObjectBase * base = new T ();
                           ^~~~~~~~
In file included from ../src/switched-ethernet/model/switched-ethernet-channel.cc:23:0:
../src/switched-ethernet/model/switched-ethernet-channel.h:79:7: note:   because the following virtual functions are pure within ‘ns3::SwitchedEthernetChannel’:
 class SwitchedEthernetChannel : public Channel
       ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/switched-ethernet/model/switched-ethernet-channel.h:26:0,
                 from ../src/switched-ethernet/model/switched-ethernet-channel.cc:23:
./ns3/channel.h:75:26: note: virtual ns3::Ptr<ns3::NetDevice> ns3::Channel::GetDevice(std::size_t) const
   virtual Ptr<NetDevice> GetDevice (std::size_t i) const = 0;
                          ^~~~~~~~~

In file included from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:28:0:
./ns3/switched-ethernet-net-device.h:42:7: error: template argument required for ‘class Queue’
 class Queue;
       ^~~~~
./ns3/switched-ethernet-net-device.h:113:27: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   void SetQueue (Ptr<Queue> queue);
                           ^
./ns3/switched-ethernet-net-device.h:113:27: note:   expected a type, got ‘Queue’
./ns3/switched-ethernet-net-device.h:120:12: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   Ptr<Queue> GetQueue (void) const;
            ^
./ns3/switched-ethernet-net-device.h:120:12: note:   expected a type, got ‘Queue’
./ns3/switched-ethernet-net-device.h:491:12: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   Ptr<Queue> m_queue;
            ^
./ns3/switched-ethernet-net-device.h:491:12: note:   expected a type, got ‘Queue’
In file included from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:29:0:
./ns3/switched-ethernet-channel.h:253:20: error: conflicting return type specified for ‘virtual uint32_t ns3::SwitchedEthernetChannel::GetNDevices() const’
   virtual uint32_t GetNDevices (void) const;
                    ^~~~~~~~~~~
In file included from ./ns3/switched-ethernet-channel.h:26:0,
                 from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:29:
./ns3/channel.h:68:23: error:   overriding ‘virtual std::size_t ns3::Channel::GetNDevices() const’
   virtual std::size_t GetNDevices (void) const = 0;
                       ^~~~~~~~~~~
../src/switched-ethernet/helper/switched-ethernet-helper.cc: In member function ‘virtual void ns3::SwitchedEthernetHelper::EnableAsciiInternal(ns3::Ptr<ns3::OutputStreamWrapper>, std::__cxx11::string, ns3::Ptr<ns3::NetDevice>, bool)’:
../src/switched-ethernet/helper/switched-ethernet-helper.cc:176:16: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
       Ptr<Queue> queue = device->GetQueue ();
                ^
../src/switched-ethernet/helper/switched-ethernet-helper.cc:176:16: note:   expected a type, got ‘Queue’
../src/switched-ethernet/helper/switched-ethernet-helper.cc:177:96: error: no matching function for call to ‘ns3::AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext<ns3::Queue>(int&, const char [8], ns3::Ptr<ns3::OutputStreamWrapper>&)’
       asciiTraceHelper.HookDefaultEnqueueSinkWithoutContext<Queue> (queue, "Enqueue", theStream);
                                                                                                ^
In file included from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:34:0:
./ns3/trace-helper.h:234:8: note: candidate: template<class T> void ns3::AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(ns3::Ptr<T>, std::__cxx11::string, ns3::Ptr<ns3::OutputStreamWrapper>)
   void HookDefaultEnqueueSinkWithoutContext (Ptr<T> object, std::string traceName, Ptr<OutputStreamWrapper> stream);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ns3/trace-helper.h:234:8: note:   template argument deduction/substitution failed:
../src/switched-ethernet/helper/switched-ethernet-helper.cc:178:90: error: no matching function for call to ‘ns3::AsciiTraceHelper::HookDefaultDropSinkWithoutContext<ns3::Queue>(int&, const char [5], ns3::Ptr<ns3::OutputStreamWrapper>&)’
       asciiTraceHelper.HookDefaultDropSinkWithoutContext<Queue> (queue, "Drop", theStream);
                                                                                          ^
In file included from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:34:0:
./ns3/trace-helper.h:258:8: note: candidate: template<class T> void ns3::AsciiTraceHelper::HookDefaultDropSinkWithoutContext(ns3::Ptr<T>, std::__cxx11::string, ns3::Ptr<ns3::OutputStreamWrapper>)
   void HookDefaultDropSinkWithoutContext (Ptr<T> object, std::string traceName, Ptr<OutputStreamWrapper> stream);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ns3/trace-helper.h:258:8: note:   template argument deduction/substitution failed:
../src/switched-ethernet/helper/switched-ethernet-helper.cc:179:96: error: no matching function for call to ‘ns3::AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext<ns3::Queue>(int&, const char [8], ns3::Ptr<ns3::OutputStreamWrapper>&)’
       asciiTraceHelper.HookDefaultDequeueSinkWithoutContext<Queue> (queue, "Dequeue", theStream);
                                                                                                ^
In file included from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:34:0:
./ns3/trace-helper.h:282:8: note: candidate: template<class T> void ns3::AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(ns3::Ptr<T>, std::__cxx11::string, ns3::Ptr<ns3::OutputStreamWrapper>)
   void HookDefaultDequeueSinkWithoutContext (Ptr<T> object, std::string traceName, Ptr<OutputStreamWrapper> stream);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ns3/trace-helper.h:282:8: note:   template argument deduction/substitution failed:
../src/switched-ethernet/helper/switched-ethernet-helper.cc: In member function ‘ns3::Ptr<ns3::NetDevice> ns3::SwitchedEthernetHelper::InstallPriv(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::SwitchedEthernetChannel>) const’:
../src/switched-ethernet/helper/switched-ethernet-helper.cc:292:12: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class ns3::Ptr’
   Ptr<Queue> queue = m_queueFactory.Create<Queue> ();
            ^
../src/switched-ethernet/helper/switched-ethernet-helper.cc:292:12: note:   expected a type, got ‘Queue’
../src/switched-ethernet/helper/switched-ethernet-helper.cc:292:52: error: no matching function for call to ‘ns3::ObjectFactory::Create<ns3::Queue>() const’
   Ptr<Queue> queue = m_queueFactory.Create<Queue> ();
                                                    ^
In file included from ./ns3/simulator.h:29:0,
                 from ../src/switched-ethernet/helper/switched-ethernet-helper.cc:25:
./ns3/object-factory.h:198:1: note: candidate: template<class T> ns3::Ptr<T> ns3::ObjectFactory::Create() const
 ObjectFactory::Create (void) const
 ^~~~~~~~~~~~~
./ns3/object-factory.h:198:1: note:   template argument deduction/substitution failed:

--
Arun Soman


arun soman

unread,
Mar 8, 2019, 4:54:28 PM3/8/19
to ns-3-...@googlegroups.com
When I am running each time getting different error with out modifying anything..
Waf: Leaving directory `/home/arun/Downloads/ns-allinone-3.29/ns-3.29/build'
Build failed
 -> task in 'ns3-switched-ethernet' failed with exit status 1 (run with -v to display more information)
 -> task in 'ns3-switched-ethernet' failed with exit status 1 (run with -v to display more information)
 -> task in 'ns3-switched-ethernet' failed with exit status 1 (run with -v to display more information)
 
--
Arun Soman


Reply all
Reply to author
Forward
0 new messages