On 1/9/22 5:40 AM, HongHsu Yen wrote:
> Hi,
>
> When I install NS3 3.35 on MacOS Big Sur 11.6.1 by using the
> ./build.py --enable-examples --enable-tests
> I have the following error message
>
> ======================================================================
>
> ../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 ());
>
> ^
>
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:953:27:
> note: 'value' has been explicitly marked unavailable here
>
> constexpr value_type& value() &
>
> ^
>
> 1 error generated.
>
>
> Waf: Leaving directory
> `/Users/honghsuyen/Downloads/ns-allinone-3.35/ns-3.35/build'
>
> *Build failed*
>
> * -> task in 'ns3-wifi' failed with exit status 1 (run with -v to
> display more information)*
>
> =======================================================================
>
> Does anyone know how to solve this problem?Thank you very much.
>
> ps, My Clang version is Apple clang version 13.0.0.
Coincidentally, I turned on a new Apple M1 Mac Mini yesterday, upgraded
directly to Monterey, and installed command line tools.
I tried the following and did not have any compilation error:
$ mkdir temp && cd temp
$ curl -L
https://www.nsnam.org/release/ns-allinone-3.35.tar.bz2 -o
ns-allinone-3.35.tar.bz2
$ tar xjf ns-allinone-3.35.tar.bz2
$ cd ns-allinone-3.35
$ ./build.py --enable-examples --enable-tests
and it built without a compilation error.
My Xcode command line tools version is:
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 13.0.0.0.1.1627064638
My clang version is:
$ clang -v
Apple clang version 13.0.0 (clang-1300.0.27.3)
If these do not match for you, can you try an upgrade and try again?
- Tom