Building ns-3 on Ubuntu 16.04

414 views
Skip to first unread message

Andreas Yankopolus

unread,
Jan 18, 2017, 3:59:04 PM1/18/17
to ns-3-users
I got ns-3 up and running on Ubuntu 16.04 based on the install instructions for 14.10. Two main changes were needed:
  1. Packages for the GNU Scientific Library have changed. For 16.04, the correct combo appears to be: gsl-bin libgsl2 libgsl-dev
  2. Ubuntu 16.04 ships with gcc 5.4.0, and I also installed clang 4.0. Both errored out due to complaints about overloaded virtual functions. This was solved through: $ export CXXFLAGS=-Wno-error=overloaded-virtual
Compilation then completes and testing gives 405 of 408 tests passed, with three tests skipped:
  1. ns3-tcp-cwnd
  2. ns3-tcp-interoperability
  3. nsc-tcp-loss
Are the skipped tests a reason for concern?


Full process, starting with a clean install of 16.04:

Install packages:

$ sudo apt-get install gcc g++ python python-dev qt4-dev-tools libqt4-dev mercurial bzr cmake libc6-dev libc6-dev-i386 g++-multilib gdb valgrind gsl-bin libgsl2 libgsl-dev flex bison libfl-dev tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev vtun lxc bridge-utils uml-utilities doxygen graphviz imagemagick texlive texlive-extra-utils texlive-latex-extra python-sphinx dia wireshark gnuplot plotdrop libboost-all-dev openmpi-bin openmpi-common openmpi-doc libopenmpi-dev unrar-free autoconf cvs git unzip p7zip-full python-setuptools

Then, get the code downloaded and configured:

$ cd ns-3-allinone
$ ./download.py
$ ./build.py

Don't stop compilation on an overloaded virtual function warning:

$ export CXXFLAGS=-Wno-error=overloaded-virtual

Initial build:

$ ./build.py

Configure and perform was build:

$ cd ns-3-dev
$ ./waf clean
$ ./waf --build-profile=debug --enable-examples --enable-tests configure

Run tests:

$ ./test.py

Test output concludes with:

405 of 408 tests passed (405 passed, 3 skipped, 0 failed, 0 crashed, 0 valgrind errors)
List of SKIPped tests:
    ns3-tcp-cwnd
    ns3-tcp-interoperability
    nsc-tcp-loss

Anything look obviously amiss?

Tom Henderson

unread,
Jan 18, 2017, 6:30:18 PM1/18/17
to ns-3-...@googlegroups.com
Thank you for the detailed feedback.  Responses inline below.


On 01/18/2017 12:59 PM, Andreas Yankopolus wrote:
I got ns-3 up and running on Ubuntu 16.04 based on the install instructions for 14.10. Two main changes were needed:
  1. Packages for the GNU Scientific Library have changed. For 16.04, the correct combo appears to be: gsl-bin libgsl2 libgsl-dev

I updated the wiki accordingly; if you spot any other outdated entries, let us know:
https://www.nsnam.org/wiki/Installation#Ubuntu.2FDebian

  1. Ubuntu 16.04 ships with gcc 5.4.0, and I also installed clang 4.0. Both errored out due to complaints about overloaded virtual functions. This was solved through: $ export CXXFLAGS=-Wno-error=overloaded-virtual

We are not seeing this error with gcc 5.4.0 on our Ubuntu 16.04 buildslave.  Please let us know how you configured the build (your ./waf configure steps) and the specific error message.

Compilation then completes and testing gives 405 of 408 tests passed, with three tests skipped:
  1. ns3-tcp-cwnd
  2. ns3-tcp-interoperability
  3. nsc-tcp-loss
Are the skipped tests a reason for concern?

No, they are left out of the build since Network Simulation Cradle is not built by default (needs to be configured and built out of the more complete 'bake' installation).




Full process, starting with a clean install of 16.04:

Install packages:

$ sudo apt-get install gcc g++ python python-dev qt4-dev-tools libqt4-dev mercurial bzr cmake libc6-dev libc6-dev-i386 g++-multilib gdb valgrind gsl-bin libgsl2 libgsl-dev flex bison libfl-dev tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev vtun lxc bridge-utils uml-utilities doxygen graphviz imagemagick texlive texlive-extra-utils texlive-latex-extra python-sphinx dia wireshark gnuplot plotdrop libboost-all-dev openmpi-bin openmpi-common openmpi-doc libopenmpi-dev unrar-free autoconf cvs git unzip p7zip-full python-setuptools

Then, get the code downloaded and configured:

$ cd ns-3-allinone
$ ./download.py
$ ./build.py

Don't stop compilation on an overloaded virtual function warning:

$ export CXXFLAGS=-Wno-error=overloaded-virtual

Again, I did not get any such warnings by following the above steps, so perhaps we can take it offlist to figure out the issue?

- Tom

Andreas Yankopolus

unread,
Jan 19, 2017, 11:50:05 AM1/19/17
to ns-3-...@googlegroups.com
Tom, 

Don't stop compilation on an overloaded virtual function warning:

$ export CXXFLAGS=-Wno-error=overloaded-virtual

Again, I did not get any such warnings by following the above steps, so perhaps we can take it offlist to figure out the issue?

No one is more confused than me today. I can’t replicate the problem, so please disregard.

Cheers,

Andreas
Reply all
Reply to author
Forward
0 new messages