NS3 3.35 Installation error on MacOS Big Sur

793 views
Skip to first unread message

HongHsu Yen

unread,
Jan 9, 2022, 8:40:05 AM1/9/22
to ns-3-users
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.

Tom Henderson

unread,
Jan 9, 2022, 12:21:32 PM1/9/22
to ns-3-...@googlegroups.com, HongHsu Yen
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

HongHsu Yen

unread,
Jan 10, 2022, 11:58:47 PM1/10/22
to ns-3-users
Hi, Tom,

NS3 3.35 can be build after I upgrade to Monterey. Thanks a lot.

Another question is how to enable the GSL in NS3?
I install GSL by using  'brew install gsl' and it shows that gsl 2.7 is installed. But I configure again by using the './waf configure' and found out that GSL is still not enabled.
Do you know how to solve this problem.

Thanks again for your help.



Tom Henderson 在 2022年1月10日 星期一上午1:21:32 [UTC+8] 的信中寫道:

Tom Henderson

unread,
Jan 11, 2022, 12:22:57 AM1/11/22
to ns-3-...@googlegroups.com
On 1/10/22 8:58 PM, HongHsu Yen wrote:
> Hi, Tom,
>
> NS3 3.35 can be build after I upgrade to Monterey. Thanks a lot.
>
> Another question is how to enable the GSL in NS3?
> I install GSL by using  'brew install gsl' and it shows that gsl 2.7 is
> installed. But I configure again by using the './waf configure' and
> found out that GSL is still not enabled.
> Do you know how to solve this problem.
>
> Thanks again for your help.

You probably do not need GSL; it is only used for error rate models for
legacy Wi-Fi (802.11b 5.5 and 11 Mbps rates based on CCK modulation).
If you are not configuring 802.11b, then GSL won't be used.

If you want it, however, you will need to find out where homebrew
installed the pkg-config file (gsl.pc) and make sure that your
PKG_CONFIG_PATH environment variable is pointing to it. Waf is using
pkg-config to find the GSL libraries. This blog post has some more
information about PKG_CONFIG_PATH:

https://prateekvjoshi.com/2013/10/18/package-opencv-not-found-lets-find-it/

On Ubuntu Linux, GSL's pc file is at
/usr/lib/x86_64-linux-gnu/pkgconfig/gsl.pc.

- Tom


- Tom


Shyam Krishnan

unread,
Jan 11, 2022, 5:14:46 PM1/11/22
to ns-3-users
Hi HongHsu,

I have the same error while installing ns3.35 on MacOs. Can you mention here how you resolved it?
Thanks!

-Shyam

rui liu

unread,
Jan 13, 2022, 4:09:55 PM1/13/22
to ns-3-users
Hi Shyam,
I have the same problem with ns-3.35.
I am already Monterey OS. 
I go back to ns-3.34 and then it build successfully.

Rohil Malhotra

unread,
Jan 21, 2022, 7:02:57 AM1/21/22
to ns-3-users
Hey HongHsu 
I tried upgrading the command line tools but I am still getting the same error. do you have any idea how we could resolve it ?

$ 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) 

HongHsu Yen

unread,
Jan 22, 2022, 7:34:56 AM1/22/22
to ns-3-users
Hi,

I have no idea about your installation error.

My clang version is the same as you.


My command line tools information.

package-id: com.apple.pkg.CLTools_Executables

version: 13.2.0.0.1.1638488800

volume: /

location: /

install-time: 1641868865

groups: com.apple.FindSystemFiles.pkg-group 

malhotr...@gmail.com 在 2022年1月21日 星期五下午8:02:57 [UTC+8] 的信中寫道:

Shyam Krishnan

unread,
Jan 22, 2022, 7:46:46 PM1/22/22
to ns-3-users
If you're using Python from a Conda environment, I was able to get around this by "/usr/bin/python"

./waf --python=/usr/bin/python configure --enable-examples --enable-tests

Ophelia Doan

unread,
Feb 4, 2022, 3:19:51 AM2/4/22
to ns-3-users
I'm using Monetery OS and clang 12.0.0.
Can confirm going back to ns-3.34 instead of ns3.35 works.

Tommaso Pecorella

unread,
Feb 7, 2022, 6:16:11 PM2/7/22
to ns-3-users
Downgrading ns-3 is always a bad idea... we're not squashing bugs and improving the models just for fun, isn't it ?

Furkan Guvenc

unread,
Mar 26, 2022, 7:30:02 AM3/26/22
to ns-3-users
I have m1 with Monterey 12.1 and it throws the same error when building ns-3.35:


$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 13.3.0.0.1.1645755326
volume: /
location: /
install-time: 1647988102
groups: com.apple.FindSystemFiles.pkg-group

$  clang -v
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: arm64-apple-darwin21.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin



Furkan Guvenc

unread,
Mar 26, 2022, 3:35:40 PM3/26/22
to ns-3-users
I opened an issue on the ns3 repo and they solved the problem
Reply all
Reply to author
Forward
0 new messages