Ns-3.35 errata: Difference between revisions
(Mac M1 test failures) |
No edit summary |
||
Line 78: | Line 78: | ||
# we don't use VNUM anymore (see bug #1327 for details) | # we don't use VNUM anymore (see bug #1327 for details) | ||
</pre> | |||
=== macOS std::optional value() unsupported === | |||
Some versions of macOS C++ standard library do not support std::optional value() for some reason. | |||
This [https://gitlab.com/nsnam/ns-3-dev/-/issues/605 issue] has some discussion. The error raised is: | |||
<pre> | |||
12:04:45 runner ['/usr/bin/clang++', '-Wall', '-Wno-unused-local-typedefs', '-Wno-potentially-evaluated-expression', '-std=c++17', '-fPIC', '-I.', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_SEMAPHORE_H=1', '../src/wifi/model/wifi-tx-timer.cc', '-c', '-o/Users/furkanguvenc/ns-allinone-3.35/ns-3.35/build/src/wifi/model/wifi-tx-timer.cc.1.o'] | |||
../src/wifi/model/ht/ht-frame-exchange-manager.cc:900:57: error: 'value' is unavailable: introduced in macOS 10.13 | |||
hdr.SetQosQueueSize (queueSizeForTid[tid].value ()); | |||
^ | |||
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:959:27: note: 'value' has been explicitly marked unavailable here | |||
constexpr value_type& value() & | |||
^ | |||
1 error generated. | |||
</pre> | |||
'''Workaround''' | |||
The workaround is to apply this one-line patch to line 900 of the file src/wifi/model/ht/ht-frame-exchange-manager.cc | |||
<pre> | |||
- hdr.SetQosQueueSize (queueSizeForTid[tid].value ()); | |||
+ hdr.SetQosQueueSize (*queueSizeForTid[tid]); | |||
</pre> | |||
Additionally, you will want to pass the --disable-werror to Waf configure: | |||
<pre> | |||
./waf configure --disable-werror --enable-examples --enable-tests | |||
./waf build | |||
</pre> | </pre> |
Revision as of 01:14, 13 October 2023
On October 1, 2021, ns-3.35 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.35.
Compilation on Python 3.10 systems
Python 3.10 was released shortly after ns-3.35, and Python 3.10 will become default in upcoming Linux distributions such as Fedora 35.
The pybindgen version distributed in ns-allinone-3.35 release (version 0.22.0) is missing a small patch needed to make it work with Python 3.10. Below are two suggested workarounds (only one or the other is needed):
Workaround 1:
If you don't need Python bindings, you can disable them from your build by passing the --disable-python
argument to Waf configure.
Workaround 2:'
You can replace pybindgen with the latest development version, or patch the version distributed with ns-3.35 release with this small patch:
https://github.com/gjcarneiro/pybindgen/commit/e645cc684602802580a0b800518c784100d54561
Compiler warning: variable set but not used
Xcode 13.3 (Apple clang version 13.1.6 (clang-1316.0.21.2)) raises several -Wunused-but-set-variable warnings; e.g.:
../src/lte/model/lte-rlc-um.cc:145:12: error: variable 'dataFieldTotalSize' set but not used [-Werror,-Wunused-but-set-variable] uint32_t dataFieldTotalSize = 0; ^ 1 error generated.
Workaround:
Configure ns-3.35 with '-Wall' instead of '-Wall -Werror' as described HOWTO_build_old_versions_of_ns-3_on_newer_compilers.
Test failures on macOS Monterey with M1 processor
Running `./test.py` on a Mac M1 machine will show two failed tests:
List of FAILed tests: int64x64 tcp-rto-test
The first failure is being tracked in | this issue. The second failure is being tracked in this issue. Neither should be a concern for most simulation uses, and both test failures should be fixed by the ns-3.36 release.
Segmentation fault for Wi-Fi under certain conditions
Changes in to the handling of MPDUs that were introduced just prior to the ns-3.35 release have a bug that may manifest itself as a simulation crash under some conditions. The simulation crashes with a segfault due to the attempt of erasing an element using an invalidated iterator, and a hint may be that the debugger points to some functions in the BlockAckManager.
Workaround:
Try to apply the patch in this commit to resolve the problem:
https://gitlab.com/nsnam/ns-3-dev/-/commit/96fdc81c68492c09488f145367c532
macOS Xcode 12.4 Scheme editor and Finder do not identify executables
Due to what is considered to be an upstream macOS bug, the VERSION format in ns-3.35 release (and earlier releases) leads to a dot character in the executable filename, and the editor or Finder app are unable to identify the file as an executable. The following link has more details:
https://gitlab.com/nsnam/ns-3-dev/-/issues/461#note_679766753
Workaround:
Apply this one-line patch to the wscript
file and reconfigure and rebuild the project.
diff --git a/wscript b/wscript index 1e9c4d9..9062bef 100644 --- a/wscript +++ b/wscript @@ -68,7 +68,7 @@ with open("VERSION", "rt") as f: VERSION = f.read().strip() APPNAME = 'ns' -wutils.VERSION = VERSION +wutils.VERSION = VERSION.replace(".", "-") wutils.APPNAME = APPNAME # we don't use VNUM anymore (see bug #1327 for details)
macOS std::optional value() unsupported
Some versions of macOS C++ standard library do not support std::optional value() for some reason.
This issue has some discussion. The error raised is:
12:04:45 runner ['/usr/bin/clang++', '-Wall', '-Wno-unused-local-typedefs', '-Wno-potentially-evaluated-expression', '-std=c++17', '-fPIC', '-I.', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_SEMAPHORE_H=1', '../src/wifi/model/wifi-tx-timer.cc', '-c', '-o/Users/furkanguvenc/ns-allinone-3.35/ns-3.35/build/src/wifi/model/wifi-tx-timer.cc.1.o'] ../src/wifi/model/ht/ht-frame-exchange-manager.cc:900:57: error: 'value' is unavailable: introduced in macOS 10.13 hdr.SetQosQueueSize (queueSizeForTid[tid].value ()); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:959:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ 1 error generated.
Workaround
The workaround is to apply this one-line patch to line 900 of the file src/wifi/model/ht/ht-frame-exchange-manager.cc
- hdr.SetQosQueueSize (queueSizeForTid[tid].value ()); + hdr.SetQosQueueSize (*queueSizeForTid[tid]);
Additionally, you will want to pass the --disable-werror to Waf configure:
./waf configure --disable-werror --enable-examples --enable-tests ./waf build