From Nsnam
Jump to: navigation, search

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

Errata against ns-3.29 release

The following issues have been identified since the ns-3.29 release and should be fixed by a subsequent (ns-3.30) release.

Compilation error: ../src/core/model/cairo-wideint.c:694:44: error: ‘UINT_MAX’ was not declared in this scope

Solution: Add '#include <climits>' to your file 'src/core/model/cairo-wideint.c' and try again.

macOs Clang 10 compatibility: Shortly after the ns-3.29 release, a MacOs Clang compiler update was issued; this causes the ns-3 build to fail as follows:

   ./ns3/make-event.h:665:20: error: unused typedef 'F' [-Werror,-Wunused-local-typedef]
   typedef void (*F)(U1, U2, U3);
   ./ns3/make-event.h:699:20: error: unused typedef 'F' [-Werror,-Wunused-local-typedef]
   typedef void (*F)(U1, U2, U3, U4);
   ./ns3/make-event.h:633:20: error: unused typedef 'F' [-Werror,-Wunused-local-typedef]
   typedef void (*F)(U1, U2);
   ./ns3/make-event.h:665:20: error: unused typedef 'F' [-Werror,-Wunused-local-typedef]
   typedef void (*F)(U1, U2, U3);
   4 errors generated.

This can be worked around by passing the '--disable-werror' flag to Waf configuration step; e.g.:

   ./waf configure --disable-werror --enable-examples --enable-tests

macOs and Python bindings:

Similar to the above, if you wish to use Python with ns-3.29 on a Mac, a compilation done in configuration check time (for pyembed) will fail unless the '--disable-werror' flag is used at configuration. Below is again the example of how to use this flag:

   ./waf configure --disable-werror --enable-examples --enable-tests

macOs and Pyviz:

The following packages, for a Homebrew-extended macOS system with Homebrew's python installed, should allow Pyviz to be used with ns-3.29 release:

   $ brew install gtk+3 graphviz pygobject3 goocanvas
   $ pip2 install pygraphviz
   $ ./waf configure --disable-werror --enable-examples --enable-tests

API scan for ns-allinone-3.29: The version of pybindgen associated with ns-allinone-3.29 is incorrect, and the bindings toolchain will not install correctly. An example error output is:

       from pybindgen.castxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning, find_declaration_from_name
       ImportError: No module named castxmlparser

One workaround is replace the 'bakeconf.xml' with the version corresponding to this changeset:

Python 3.7 and API scanning toolchain: ArchLinux has started to distribute Python 3.7, but there are issues with compatibility of the toolchain.

There is no present workaround other than piecing together the hints found in the above bug report.

macOS Mojave and libxml2 issues. The macOS 10.14 release doesn't interact correctly with the libxml2 package installed by homebrew, with the result that a compilation error may occur due to missing headers:

   ../src/config-store/model/xml-config.h:25:10: fatal error: 'libxml/xmlwriter.h' file not found
   #include <libxml/xmlwriter.h>
   1 error generated.

This error is caused by pig-config detecting the presence of libxml2, but the new Xcode does not put the headers in /usr/include/ as expected but instead in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk.

See bug #2637 on ns-3's bug tracker. Two separate workarounds are:

1) install the legacy headers package found at /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg, or

2) install the patch found in bug #2637 which allows Waf to append the new include path

Ubuntu 20 and PyViz visualizer. This ns-3.29 release occurred during a transition period from Python 2 to Python 3, but ns-3 Waf build system and the pybindgen package were still based on Python 2 at this time. It seems that newer Linux distributions that do not ship Python 2 by default are causing problems to enable the PyViz visualizer which depends on some Python 3 components.

For Ubuntu 20.04, Waf will fail to run under python2 because /usr/bin/env python (/usr/bin/python) is not present even if python2 is installed. If a symbolic link is created (ln -s /usr/bin/python2 /usr/bin/python), the Waf configuration can succeed but PyViz will not be supported because the Python2 dependencies on PyViz are no longer supported by Ubuntu:

    PyViz visualizer              : not enabled (Missing python modules: gi, gi.repository.GObject, cairo, pygraphviz, gi.repository.Gtk, gi.repository.Gdk, gi.repository.Pango, gi.repository.GooCanvas)

Running 'python3 waf configure' will lead to a problem where Python 3 development headers are not found (despite being installed):

   PyViz visualizer              : not enabled (Python Bindings are needed but not enabled)
   Python Bindings               : not enabled (Python library or headers missing)

There may be no easy workaround and it is advised to upgrade to a newer than ns-3.29 version if PyViz is needed.