0
down vote
favorite

Please, I am have been having problems installing NS2 and BonnMotion. I am running openSUSE Tumbleweed (20160812) (x86_64) and I keep running into the g++c++ error: CXX=g++-6.1: No such file or directory make: *** [Makefile:103: libotcl.so] Error 1 otcl-1.14 make failed! Exiting ...(after editing the makefile.in)I have tried reading a lot about it on line and noted that its a compatibility problem but my challenge is, I cant remove the latest version without having issues and how do I install an older version that can allow the ns-allinone-2.35 version? Thank you.

Dani AI

Generated

Quick diagnosis and practical path forward (for )
The error “CXX=g++-6.1: No such file or directory” means the build is trying to invoke a compiler binary named exactly g++-6.1 which is not present on your system. Manually editing a generated Makefile.in is brittle because the installer/configure step can re-create those files. The reliable approaches are: (A) tell the installer which compiler to use by exporting CC/CXX before running ./install, or (B) install a compatible older GCC side-by-side and point the build at it. Examples and working reports are common in NS2 install threads. (stackoverflow.com)

Immediate commands to try
Use the system default g++ (fast check):

cd ns-allinone-2.35
export CC=gcc CXX=g++
./install

If you need an older compiler (safer for ns-2.35), install a suffixed package and use it:

sudo zypper in gcc5 gcc5-c++
export CC=gcc-5 CXX=g++-5
./install

To switch system-wide for builds, update-alternatives is available on openSUSE:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --config gcc

If you only saw a name mismatch and understand the risks, a quick (less recommended) workaround is:

sudo ln -s /usr/bin/g++ /usr/bin/g++-6.1

Be cautious: symlinking hides real ABI/feature mismatches. For otcl build failures that complain about missing Tcl internals, NS’s problems page documents the need for matching Tcl source/header files. (en.opensuse.org)

BonnMotion and alternatives
As noted, BonnMotion is Java-based and installs via its install script after a JRE/JDK is present — you do not build it with make. Install OpenJDK (e.g. 8 or 11) and run BonnMotion’s installer. If building NS-2 becomes too time-consuming, consider using a prebuilt container (many NS-2 Docker images exist) or migrate to ns-3 which is actively maintained. ()

Short checklist

  • Do not remove the system GCC. Install older GCC side-by-side. (en.opensuse.org)
  • Try export CC=... CXX=... && ./install before editing Makefiles. (stackoverflow.com)
  • If otcl still fails, check for matching Tcl source headers per the NS-2 problems page. (isi.edu)

Recommended Answers

All 2 Replies

I looked at BonnMotion and it is Java based and not something you run through make. I'd get back to their website about how to install.

You can build Java apps via Make, assuming you instruct the Makefile to use the javac compiler and not C/C++, but these days Ant is most commonly used to build Java apps; however, Ant can be called from a Makefile. I did this all the time at Nokia.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.