How to install ns-3.33 in Ubuntu-LTS 22.04

474 views
Skip to first unread message

Dev Gupta

unread,
Apr 11, 2023, 6:24:16 AM4/11/23
to ns-3-users
I want to install ns3.33 in Ubuntu 22.04, but I am getting a lot of errors while building ns3.
I want to know can we still install and run this version of ns3 or is it too old now.
Thank you for any kind of help
Message has been deleted

Tommaso Pecorella

unread,
Apr 11, 2023, 6:37:36 AM4/11/23
to ns-3-users
Too old.

Tom Henderson

unread,
Apr 11, 2023, 1:42:33 PM4/11/23
to ns-3-...@googlegroups.com

Tommaso, can you clarify?  I don't think ns-3.33 is too old to install in Ubuntu 22.04.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/a2cd80e5-51ee-46e3-964f-0487f73cabc9n%40googlegroups.com.
Message has been deleted

Tommaso Pecorella

unread,
Apr 11, 2023, 6:09:05 PM4/11/23
to ns-3-users
Perhaps not, but you'll need some tinkering. If you download ns-3.33 on Ubuntu 22.04 and you try to compile you'll get errors, like:

../src/core/helper/csv-reader.cc: In member function ‘bool ns3::CsvReader::GetValueAs(std::string, signed char&) const’:

../src/core/helper/csv-reader.cc:182:26: error: ‘numeric_limits’ is not a member of ‘std’

  182 |   if (tempOutput >= std::numeric_limits<byte_type>::min ()


This is due to the fact that gcc is "new", and ns-3.33 uses "old" (and deprecated, or removed) library calls.

So, perhaps it's not impossible, but it doesn't work out-of-the-box.

Tom Henderson

unread,
Apr 11, 2023, 8:50:23 PM4/11/23
to ns-3-...@googlegroups.com

Probably installing and using g++-9 will suffice.  This page may help:

https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-22-04-lts-jammy-jellyfish

If g++-9 is installed, one doesn't necessarily need to use update-alternatives; one can do:

CXX=g++-9 ./waf configure --disable-werror (... rest of configuration options)

CXX=g++-9 ./waf build

See this page:

https://www.nsnam.org/wiki/HOWTO_build_old_versions_of_ns-3_on_newer_compilers

Talha Ibn Aziz

unread,
Sep 28, 2024, 2:32:30 PM9/28/24
to ns-3-users
Thank you so much! This helped a lot instead of downgrading and upgrading Ubuntu for every issue.

I was able to install and run NS3 version 3.33 (created the project before - hence the older version) in Ubuntu 24.04 with this solution.

압둘하미드이드리스

unread,
Sep 29, 2024, 1:57:57 AM9/29/24
to ns-3-...@googlegroups.com
Can you give details about installing the latest version of that in the same platform?
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/72b99bfa-bd43-4634-a722-e5733bbbe2b4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages