Ns-3.33 errata

From Nsnam
Jump to: navigation, search

On January 7, 2021, ns-3.33 was published. This page lists some minor issues that have been fixed in the mainline since that time, but we considered to be minor enough to just list here rather than make a maintenance release to update ns-3.33.

ns-3 openflow module fails to compile

During the ns-3.33 release cycle, some conditional (optional) code related to Boost C++ libraries was introduced to the file src/core/model/length.h. Boost has also been recommended to be installed for openflow support.

This caused an unintended interaction with a token in the wscript file for the ns-3 openflow module. As a result, when the openflow OFSID switch library is included in the Waf configuration, and ns-3 tries to build the openflow module, a compilation error occurs; a subset of the error output is shown below:

/usr/include/boost/units/dimension.hpp:63:30: error: parse error in template argument list
     typedef typename detail::static_power_impl<DL::size::value>::template apply<

In addition, the wscript requests to include an obsolete boost library (signals). These issues will be fixed in the ns-3.34 release, and are fixed if you migrate to ns-3-dev.

If you want to use the ns-3 openflow module with ns-3.33 release, you must install Boost development libraries (typically 'boost-devel' on Fedora-based systems, or 'libboost-all-dev' on Debian/Ubuntu-based systems), and we suggest that you modify the following three files as follows:

1) Remove the obsolete 'signals' library dependency from the file src/openflow/wscript:

diff --git a/src/openflow/wscript b/src/openflow/wscript
index 98b7ee65e..d361a8bb8 100644
--- a/src/openflow/wscript
+++ b/src/openflow/wscript
@@ -9,7 +9,7 @@ def options(opt):
                    help=('Path to OFSID source for NS-3 OpenFlow Integration support'),
                    default='', dest='with_openflow')
-REQUIRED_BOOST_LIBS = ['system', 'signals', 'filesystem']
+REQUIRED_BOOST_LIBS = ['system', 'filesystem']
 def required_boost_libs(conf):

2) Delete or disable the conditional boost code in the file src/core/model/length.h in three places:

diff --git a/src/core/model/length.h b/src/core/model/length.h
index 171c28202..715620977 100644
--- a/src/core/model/length.h
+++ b/src/core/model/length.h
@@ -24,11 +24,6 @@
 #include "attribute.h"
 #include "attribute-helper.h"
-#include <boost/units/quantity.hpp>
-#include <boost/units/systems/si.hpp>
 #include <istream>
 #include <limits>
 #include <ostream>
@@ -404,23 +399,6 @@ private:
   Length (Quantity quantity);
-  /**
-   * Construct a Length object from a boost::units::quantity
-   *
-   * \note The boost::units:quantity must contain a unit that derives from
-   * the length dimension.  Passing a quantity with a Unit that is not a length
-   * unit will result in a compile time error
-   *
-   * \tparam U A boost::units length unit
-   * \tparam T Numeric data type of the quantity value
-   *
-   * \param quantity A boost::units length quantity
-   */
-  template <class U, class T>
-  explicit Length (boost::units::quantity<U, T> quantity);
    * Copy Constructor
@@ -1073,19 +1051,6 @@ Length Yards (double value);
 Length Miles (double value);
    * Copy Constructor
@@ -1073,19 +1051,6 @@ Length Yards (double value);
 Length Miles (double value);
-template <class U, class T>
-Length::Length (boost::units::quantity<U, T> quantity)
-  :   m_value (0)
-  namespace bu = boost::units;
-  using BoostMeters = bu::quantity<bu::si::length, double>;
-  //convert value to meters
-  m_value = static_cast<BoostMeters> (quantity).value ();
 }  // namespace ns3

 #endif  /* NS3_LENGTH_H_ */

3) Similarly delete or disable the conditional boost code in the file src/core/test/length-test-suite.cc in four places.

vanet-routing-compare.cc does not run

The program vanet-routing-compare.cc exits with an error:

msg="GlobalValue name=VRCcumulativeBsmCaptureStart: input value is not a string", file=../src/core/model/global-value.cc, line=128
terminate called without an active exception

This will be fixed in the ns-3.34 release, and is fixed if you migrate to ns-3-dev.

To patch ns-3.33 release to fix this problem, apply the patch that can be downloaded from the following URL:


click library fails to compile

The click module relies on the click library, a version of which is installed with bake in the ns-alllinone-3.33 package. If this library fails to compile with the error:

‘SIOCGSTAMP’ was not declared in this scope

This indicates the following problem: https://github.com/kohler/click/commit/841d674a076c90fe76a71d9dc131f0c9c137d285

and this can be worked around by adding two include statements:

diff --git a/elements/userlevel/fromdevice.cc b/elements/userlevel/fromdevice.cc
index 76e2b12a3..ff8940ccf 100644
--- a/elements/userlevel/fromdevice.cc
+++ b/elements/userlevel/fromdevice.cc
@@ -28,6 +28,7 @@
 # include <sys/ioccom.h>
+#include <linux/sockios.h>
 # include <net/bpf.h>
diff --git a/elements/userlevel/rawsocket.cc b/elements/userlevel/rawsocket.cc
index 40e9ce25e..1e4fb25f3 100644
--- a/elements/userlevel/rawsocket.cc
+++ b/elements/userlevel/rawsocket.cc
@@ -34,6 +34,7 @@
 #include <sys/socket.h>
 #include <arpa/inet.h>
 #include <fcntl.h>
+#include <linux/sockios.h>
 #ifndef __sun
 #include <sys/ioctl.h>

The version of click referenced by future ns-3 releases will be updated to include a more recent click library.