Ns-3.33 errata

From Nsnam
Revision as of 21:02, 7 July 2021 by Tomh (Talk | contribs) (Errata for click-3.25 problems)

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 both of the following two 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):
     conf.env['REQUIRED_BOOST_LIBS'] += REQUIRED_BOOST_LIBS

and 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"
 
-#ifdef HAVE_BOOST_UNITS
-#include <boost/units/quantity.hpp>
-#include <boost/units/systems/si.hpp>
-#endif
-
 #include <istream>
 #include <limits>
 #include <ostream>
@@ -404,23 +399,6 @@ private:
    */
   Length (Quantity quantity);
 
-#ifdef HAVE_BOOST_UNITS
-  /**
-   * 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);
-#endif
-
   /**
    * 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);
 /**@}*/
 
-#ifdef HAVE_BOOST_UNITS
-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 ();
-}
-#endif
-
 }  // namespace ns3

 #endif  /* NS3_LENGTH_H_ */

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:

https://gitlab.com/nsnam/ns-3-dev/-/commit/726199c94ef4848086b370d3c11bee020e86278b.patch

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://patchwork.kernel.org/project/qemu-devel/patch/20190617114005.24603-1-berrange@redhat.com/

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 @@
 #else
 # include <sys/ioccom.h>
 #endif
+#include <linux/sockios.h>
 #if HAVE_NET_BPF_H
 # include <net/bpf.h>
 # define PCAP_DONT_INCLUDE_PCAP_BPF_H 1
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>