I am currently trying to run NS2 on Ubuntu 18.04. Using the ns-allinone-2.35 package recommended by the main website (isi.edu), I am having a segmentation fault error when trying to run xgraph12.2. NS-2 and nam run fine - however, even when xgraph is 'installed' I get:

sdean@ubuntu:~/ns2/ns-allinone-2.35$ xgraph 
Segmentation fault (core dumped)

I have gone through several tutorials on the web that are supposed to address this problem with no success. I HAVE set the PATH and LIBRARY variables correctly along with changing it to run gcc/g++ 4.8. I understand I am trying to run an old software package on a newer OS, but NS-3 did not do what we needed. I am open to using an older OS. However, I had errors with build-essentials autoconf automake libxmu-dev on Linux older systems.

As another hint, through trying a couple different remedies messing around, I get a lot of permission denied output. I try running as sudo but still no luck.

Thank you

  • Check the core dump, you will get the issue there. – asktyagi Jun 1 at 3:43

Install Xgraph : sudo apt install Xgraph → You get a stable version 12.1 .

Testing Xgraph : $ cd xvf ns-allinone-2.35/xgraph-12.2/examples/ && xgraph xgtest.xg .. And please note that 'xgraph' requires a file to open the "Xgraph GUI". I.e. $ xgraph does nothing.

"Permission denied" is a common error : If ns-allinone-2.xx was unpacked with 'sudo', or with a Windows© tool. Correct is :

$ tar xvf ns-allinone-2.35_gcc5.tar.gz

ns-allinone-2.35_gcc5.tar.gz, link https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing → This is the 2014 update, for gcc/g++ versions 4.4 .. 5.3 .

ns2-INFO https://drive.google.com/file/d/1FCjn-9fkR7tKeqClUpHsleaEdnoKRZzq/view?usp=sharing

  • Knud - thank you for the input. However, running sudo apt install Xgraph yields No package xgraph found Even running xgraph with a test still yields Segmentation Fault (core dumped) I have installed without using sudo and still get the same results. – Sam Dean Jun 4 at 12:50
  • Knud - I have been able to rid the SegFault using the more updated NS2 tar file you provided. However, when I run the ./configure and make install I get problems. Specifcally: source='xgraph.c' object='xgraph.o' libtool=no \ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ gcc-4.8 -DHAVE_CONFIG_H -I. -g -c xgraph.c /bin/bash: ./depcomp: No such file or directory Then running xgraph <testfile> I get Command 'xgraph' not found Would this also be responsible for some the failures running the test/validation suite? – Sam Dean Jun 4 at 14:07
  • 300 ns2 patches drive.google.com/drive/folders/… → → When you add a patch, or do other changes to ns-2.35 : Use the "configure && make script" = 'install', in the top directory, ns-allinone-2.35/ : $ export CC=gcc-4.8 CXX=g++-4.8 && ./install – Knud Larsen Jun 4 at 14:14
  • About xgraph-12.*/depcomp : Delete the link "depcomp" (if present), and do $ ln -s /usr/share/automake-*/depcomp – Knud Larsen Jun 4 at 14:22
  • Knud - I appreciate the responses. I understand running in the top directory, but I am little confused on how the patches and the export commands relate to my issue. Could you provide a little more detail of how those commands relate to my xgraph? I am a little confused on the /decomp as well. – Sam Dean Jun 4 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.