Ns-3.32-errata

From Nsnam
Revision as of 23:09, 17 December 2020 by Tomh (Talk | contribs) (Python 3.9 compatibility (macOS Big Sur))

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.32 release

The following issues have been identified since the ns-3.32 release, and will be addressed in ns-3.33 release. In the meantime, the below workarounds are possible.

Python 3.9 compatibility (general)

If Python is enabled with ns-3.32 and the Python being used is version 3.9, then the build may fail with messages such as:

``` src/antenna/bindings/ns3module.h:1200:27: error: 'PyEval_ThreadsInitialized' is deprecated [-Werror,-Wdeprecated-declarations]

       __py_gil_state = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0);

```

If this occurs, one workaround is to disable the CXXFLAGS `-Werror` flag at configuration time, with a Waf flag called ``--disable-werror``:

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

See: https://gitlab.com/nsnam/ns-3-dev/-/issues/318 for discussion of the long-term fix.

Python 3.9 compatibility (macOS Big Sur)

macOS 11 (Big Sur) apparently has a regression with CPython: https://bugs.python.org/issue42504

This is causing ns-3 Python-enabled builds to fail, when using Python 3.9:


TypeError: str expected, not int


One workaround is to apply the patch to Waf: https://gitlab.com/ita1024/waf/-/commit/60e3f5f488dc88ff50984f51be7f7293b9a0b0fb

A different workaround is to use the system Python, and not a Homebrew or Anaconda Python version, during Waf configure:

./waf configure --python=/usr/bin/python3 ...


See: https://gitlab.com/nsnam/ns-3-dev/-/issues/320