Error when building with g++-13

171 views
Skip to first unread message

Bernnardo Oliveira

unread,
Apr 8, 2024, 10:36:21 PM4/8/24
to ns-3-users
Hi there folks, hope you are doing well

I'm currently figuring out a way to integrate some graph libs to the ns3 source code and i was stumbled by this issue.

Usually, I compile ns3 source code with g++ 9.4 and everything works out fine, but because one of these graph libs (in this case, one that I'm not going to use) uses a lot of C++20 standard features, I switched to version g++ 13 (Ubuntu 20.04).

When I tried to build ns3, a lot of errors were raised by the compiler (Errors such as std::uint8_t not in std scope, etc). After doing some research, I discovered that these errors may be associated with a compiler that is not compliant with the C++11 standard. 

Anyway, it's not really an issue since I don't need to use this version of g++, but i thought it was worth sharing since this could help someone with a similar problem.

Furthermore, has anybody also faced this problem?






Bernnardo Oliveira

unread,
Apr 8, 2024, 10:43:00 PM4/8/24
to ns-3-users

Tommaso Pecorella

unread,
Apr 9, 2024, 4:12:43 AM4/9/24
to ns-3-users
We moved to C++20 recently, and ns-3 is tested also with gcc-13, so my best guess is that you're referring to an old ns-3 version...

The quickest solution for your case would be to upgrade your ns-3 to 3.41. A more painful way is to back port some of the changes we made.

Bernnardo Oliveira

unread,
Apr 10, 2024, 10:56:06 PM4/10/24
to ns-3-users
Oh of course, somehow this went over my head. Thank you Tommaso and sorry for wasting your time with this
Reply all
Reply to author
Forward
0 new messages