Ns-3.41 errata

From Nsnam
Jump to: navigation, search

On February 9, 2024, ns-3.41 was published. This page lists some issues that have been fixed in the mainline since that time. If considered impactful enough, the maintainers may make an update to this release to cover some or all of these issues.

Build failure on macOS version 14.3.1 or greater

A compilation error may be observed (sometimes in normal builds, sometimes only when clang-tidy is enabled) for macOS versions 14.3.1 or greater (Apple clang version 15.0.0 (clang-1500.1.0.2.5)).

 /Users/user/ns-3-dev/src/core/test/attribute-container-test-suite.cc:310:13: error: use of overloaded operator '==' is 
 ambiguous (with operand types 'const value_type' (aka 'const pair<const std::string, long long>') and 'result_type' (aka 'pair<std::string, 
 long long>'))
           NS_TEST_ASSERT_MSG_EQ(v, (*aciter)->Get(), "Incorrect value");
           ^23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)23:19, 8 March 2024 (UTC)
 /Users/user/ns-3-dev/src/core/model/test.h:147:24: note: expanded from macro 'NS_TEST_ASSERT_MSG_EQ'
       if (!((actual) == (limit)))                                                                \
             23:19, 8 March 2024 (UTC)Tom (talk) ^  23:19, 8 March 2024 (UTC)~~
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__utility/pair.h:611:1: note: candidate function [with _T1 = const 
 std::string, _T2 = long long, _U1 = std::string, _U2 = long long]
 operator==(const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
 ^
 /Users/user/ns-3-dev/src/core/test/attribute-container-test-suite.cc:207:1: note: candidate function [with A = const std::string, B = long 
 long, C = std::string, D = long long]
 operator==(const std::pair<A, B>& x, const std::pair<C, D>& y)
 ^

This is only observed when enabling tests in the build (--enable-tests).

The following patch to the source code can be applied as a workaround, or ns-3-dev may be used, or tests can be disabled: