matteonerini / 5g-network-slicing-for-wifi-networks

5G Network Slicing for Wi-Fi Networks
GNU General Public License v3.0
52 stars 22 forks source link

Build error #1

Open wohlbier opened 3 years ago

wohlbier commented 3 years ago
Calling the ns3 script 'wifi.cc'
Waf: Entering directory `/srv/scratch/jgwohlbier/ns-3-allinone/ns-3-dev/build'
[2788/2842] Compiling scratch/wifi_1ch.cc
[2789/2842] Compiling scratch/wifi.cc
[2790/2842] Compiling scratch/wifi_dynamic.cc
[2791/2842] Compiling scratch/wifi_static.cc
../scratch/wifi_static.cc: In function 'int main(int, char**)':
../scratch/wifi_static.cc:306:62: error: 'Default' is not a member of 'ns3::SpectrumWifiPhyHelper'
  306 |   SpectrumWifiPhyHelper spectrumPhy = SpectrumWifiPhyHelper::Default ();
      |                                                              ^~~~~~~
../scratch/wifi_static.cc:307:50: error: 'Default' is not a member of 'ns3::YansWifiPhyHelper'
  307 |   YansWifiPhyHelper yansPhy = YansWifiPhyHelper::Default ();
      |                                                  ^~~~~~~
../scratch/wifi_static.cc:342:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  342 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_static.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_static.cc:363:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  363 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:380:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  380 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:567:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  567 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_static.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:567:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  567 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_static.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi_1ch.cc: In function 'int main(int, char**)':
../scratch/wifi_1ch.cc:216:62: error: 'Default' is not a member of 'ns3::SpectrumWifiPhyHelper'
  216 |   SpectrumWifiPhyHelper spectrumPhy = SpectrumWifiPhyHelper::Default ();
      |                                                              ^~~~~~~
../scratch/wifi_1ch.cc:217:50: error: 'Default' is not a member of 'ns3::YansWifiPhyHelper'
  217 |   YansWifiPhyHelper yansPhy = YansWifiPhyHelper::Default ();
      |                                                  ^~~~~~~
../scratch/wifi_1ch.cc:253:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  253 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_1ch.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_1ch.cc:274:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  274 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:291:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  291 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:404:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  404 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_1ch.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:404:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  404 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_1ch.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi.cc: In function 'int main(int, char**)':
../scratch/wifi.cc:621:62: error: 'Default' is not a member of 'ns3::SpectrumWifiPhyHelper'
  621 |   SpectrumWifiPhyHelper spectrumPhy = SpectrumWifiPhyHelper::Default ();
      |                                                              ^~~~~~~
../scratch/wifi.cc:622:50: error: 'Default' is not a member of 'ns3::YansWifiPhyHelper'
  622 |   YansWifiPhyHelper yansPhy = YansWifiPhyHelper::Default ();
      |                                                  ^~~~~~~
../scratch/wifi.cc:657:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  657 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi.cc:678:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  678 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:695:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  695 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:852:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  852 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:852:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  852 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi_dynamic.cc: In function 'int main(int, char**)':
../scratch/wifi_dynamic.cc:943:62: error: 'Default' is not a member of 'ns3::SpectrumWifiPhyHelper'
  943 |   SpectrumWifiPhyHelper spectrumPhy = SpectrumWifiPhyHelper::Default ();
      |                                                              ^~~~~~~
../scratch/wifi_dynamic.cc:944:50: error: 'Default' is not a member of 'ns3::YansWifiPhyHelper'
  944 |   YansWifiPhyHelper yansPhy = YansWifiPhyHelper::Default ();
      |                                                  ^~~~~~~
../scratch/wifi_dynamic.cc:979:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  979 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_dynamic.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_dynamic.cc:1000:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
 1000 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1017:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
 1017 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1174:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
 1174 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_dynamic.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1174:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
 1174 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_dynamic.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Waf: Leaving directory `/srv/scratch/jgwohlbier/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task in 'wifi_static' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi_1ch' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi_dynamic' failed with exit status 1 (run with -v to display more information)
matteonerini commented 3 years ago

Dear John,

Thank you for your interest. The code has been written in ns-3.30 and I guess you are running the latest release, ns-3.33. I have just noticed that they removed the 'Default' member in the classes 'ns3::SpectrumWifiPhyHelper' and 'ns3::YansWifiPhyHelper' in release 3.33. Thus, this is the source of the compilation error. To solve please try this solution: substitute the line YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); with the line YansWifiPhyHelper wifiPhy;. Also substitute the line SpectrumWifiPhyHelper wifiPhy = SpectrumWifiPhyHelper::Default (); with the line SpectrumWifiPhyHelper wifiPhy;. Let me know if this solves the error.

Best regards, Matteo

wohlbier commented 3 years ago

Matteo, thanks for the reply. That does solve that error, but there are more. I guess there would be more work to become compatible with 3.33.

Waf: Entering directory `/srv/scratch/jgwohlbier/ns-3-allinone/ns-3-dev/build'
[2786/2842] Compiling scratch/wifi_1ch.cc
[2789/2842] Compiling scratch/wifi.cc
[2790/2842] Compiling scratch/wifi_dynamic.cc
[2792/2842] Compiling scratch/wifi_static.cc
../scratch/wifi_1ch.cc: In function 'int main(int, char**)':
../scratch/wifi_1ch.cc:253:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  253 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_1ch.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_1ch.cc:274:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  274 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:291:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  291 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:404:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  404 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_1ch.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:404:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  404 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_1ch.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi_static.cc: In function 'int main(int, char**)':
../scratch/wifi_static.cc:342:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  342 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_static.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_static.cc:363:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  363 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:380:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  380 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:567:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  567 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_static.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:567:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  567 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_static.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi.cc: In function 'int main(int, char**)':
../scratch/wifi.cc:657:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  657 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi.cc:678:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  678 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:695:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  695 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:852:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  852 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:852:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  852 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi_dynamic.cc: In function 'int main(int, char**)':
../scratch/wifi_dynamic.cc:979:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  979 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_dynamic.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_dynamic.cc:1000:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
 1000 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1017:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
 1017 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1174:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
 1174 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_dynamic.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1174:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
 1174 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_dynamic.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Waf: Leaving directory `/srv/scratch/jgwohlbier/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task in 'wifi_1ch' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi_static' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi_dynamic' failed with exit status 1 (run with -v to display more information)
sourajitdas commented 2 years ago

Replace (WIFI_PHY_STANDARD_80211ac) with (WIFI_STANDARD_80211ac) and it should work fine. The WifiHelper::SetStandard (WifiPhyStandard standard) method no longer takes a WifiPhyStandard enum, but instead takes a similarly named WifiStandard enum. If before you specified a value such as WIFI_PHY_STANDARD_xxx, now you must specify WIFI_STANDARD_xxx.

Oma-Alram commented 2 years ago

Hi. How I can overcome this error

../scratch/wifi_1ch.cc:404:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]

gnagoshe commented 1 year ago

I am using ns 3.39 please tell me the changes as compare to earlier version of ns3 like what mentioned by sourajitdas and matteonerini

shailypriyanka commented 1 year ago

Replace (WIFI_PHY_STANDARD_80211ac) with (WIFI_STANDARD_80211ac) and it should work fine. The WifiHelper::SetStandard (WifiPhyStandard standard) method no longer takes a WifiPhyStandard enum, but instead takes a similarly named WifiStandard enum. If before you specified a value such as WIFI_PHY_STANDARD_xxx, now you must specify WIFI_STANDARD_xxx.

I was also facing this same error from past 2 days, but this simple modification worked for me. Thank you so much!!

umaidshaan commented 8 months ago

Matteo, thanks for the reply. That does solve that error, but there are more. I guess there would be more work to become compatible with 3.33.

Waf: Entering directory `/srv/scratch/jgwohlbier/ns-3-allinone/ns-3-dev/build'
[2786/2842] Compiling scratch/wifi_1ch.cc
[2789/2842] Compiling scratch/wifi.cc
[2790/2842] Compiling scratch/wifi_dynamic.cc
[2792/2842] Compiling scratch/wifi_static.cc
../scratch/wifi_1ch.cc: In function 'int main(int, char**)':
../scratch/wifi_1ch.cc:253:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  253 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_1ch.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_1ch.cc:274:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  274 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:291:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  291 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:404:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  404 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_1ch.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_1ch.cc:404:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  404 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_1ch.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi_static.cc: In function 'int main(int, char**)':
../scratch/wifi_static.cc:342:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  342 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_static.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_static.cc:363:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  363 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:380:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  380 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:567:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  567 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_static.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_static.cc:567:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  567 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_static.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi.cc: In function 'int main(int, char**)':
../scratch/wifi.cc:657:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  657 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi.cc:678:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
  678 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:695:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
  695 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:852:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  852 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi.cc:852:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
  852 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

../scratch/wifi_dynamic.cc: In function 'int main(int, char**)':
../scratch/wifi_dynamic.cc:979:48: error: 'virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)' is deprecated [-Werror=deprecated-declarations]
  979 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
      |                                                ^
In file included from ./ns3/yans-wifi-helper.h:24,
                 from ../scratch/wifi_dynamic.cc:44:
./ns3/wifi-helper.h:502:16: note: declared here
  502 |   virtual void SetStandard (WifiPhyStandard standard);
      |                ^~~~~~~~~~~
../scratch/wifi_dynamic.cc:1000:23: error: 'WIFI_PHY_STANDARD_80211ax_5GHZ' was not declared in this scope
 1000 |     wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1017:22: error: 'WIFI_PHY_STANDARD_80211ax_2_4GHZ' was not declared in this scope
 1017 |    wifi.SetStandard (WIFI_PHY_STANDARD_80211ax_2_4GHZ);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1174:20: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
 1174 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_dynamic.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../scratch/wifi_dynamic.cc:1174:49: error: 'static void ns3::BuildingsHelper::MakeMobilityModelConsistent()' is deprecated [-Werror=deprecated-declarations]
 1174 |   BuildingsHelper::MakeMobilityModelConsistent ();
      |                                                 ^
In file included from ./ns3/buildings-module.h:16,
                 from ../scratch/wifi_dynamic.cc:64:
./ns3/buildings-helper.h:62:15: note: declared here
   62 |   static void MakeMobilityModelConsistent ();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Waf: Leaving directory `/srv/scratch/jgwohlbier/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task in 'wifi_1ch' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi_static' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi' failed with exit status 1 (run with -v to display more information)
 -> task in 'wifi_dynamic' failed with exit status 1 (run with -v to display more information)

heyyy, i'm also using some new version of ns3 and facing problems while running the code , can you please tell me change you did that worked for you to atleast run the code

umaidshaan commented 8 months ago

I am using ns 3.39 please tell me the changes as compare to earlier version of ns3 like what mentioned by sourajitdas and matteonerini

were you able to run the code, if yes, can you please share the list of changes you did to run it in the newer versions of ns3

ahihi8z8z commented 2 months ago

I think the author should mention ns-3 version in README.