Skip to main content

OMNeT Installation Problems And Solutions in Ubuntu

When I am trying to install Omnet++ 5.3 on Ubuntu 16.04
After I type "make" on terminal, I was getting this errors :
cdynamicexpression.cc: In function ‘intpar_t omnetpp::safeAdd(intpar_t, intpar_t)’:
cdynamicexpression.cc:389:42: error: ‘__builtin_add_overflow’ was not declared in this scope
if (__builtin_add_overflow(a, b, &res))
^
cdynamicexpression.cc: In function ‘intpar_t omnetpp::safeMul(intpar_t, intpar_t)’:
cdynamicexpression.cc:401:42: error: ‘__builtin_mul_overflow’ was not declared in this scope
if (__builtin_mul_overflow(a, b, &res))
^
Makefile:100: recipe for target '/opt/omnetpp-5.3/out/gcc-release/src/sim/cdynamicexpression.o' failed
make[2]: *** [/opt/omnetpp-5.3/out/gcc-release/src/sim/cdynamicexpression.o] Error 1
make[2]: *** Bitmemiş işler için bekliyor....
Makefile:117: recipe for target 'sim' failed
make[1]: *** [sim] Error 2
Makefile:28: recipe for target 'allmodes' failed
make: *** [allmodes] Error 2

Solving of this problem is very simple. You should install "clang" on terminal. Like this :
  • sudo apt-get install clang
After that follow this steps again :
at first : ./configure
then :  make

After that installation, I was getting an other error on terminal command :
Creating executable: out/clang-release//osg-earth
/usr/bin/ld: cannot find -losgEarthFeatures
/usr/bin/ld: cannot find -losgEarthSymbology
/usr/bin/ld: cannot find -losgEarthAnnotation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:108: recipe for target 'out/clang-release//osg-earth' failed
make[2]: *** [out/clang-release//osg-earth] Error 1
Makefile:133: recipe for target 'osg-earth' failed
make[1]: *** [osg-earth] Error 2
Makefile:28: recipe for target 'allmodes' failed
make: *** [allmodes] Error 2

In order to solve this problem, I had needed to install all of them :
  • sudo apt-get install qt4-qmake libqt4-dev libqt4-opengl-dev
  • sudo apt-get install openscenegraph libopenscenegraph-dev openscenegraph-plugin-osgearth
  • sudo apt-get install osgearth osgearth-data libosgearth-dev

Lastly, I did it in turn :
  • make cleanall
  • ./configure
  • make

Comments

Popular posts from this blog

This is English Edition of Blogkafem.net

Hi all. I am Ali Arslan. I am an computer engineer. I have blog page. Its name is Blogkafem. I have been writing for ten years. I wrote first article 3th January 2008. I am Turkish and I live in Turkey. Thats way I am writing in my blog with Turkish.

One day, I wanted to write my blog articles with English language. So that I considered to publish Blogkafem.net English Edition.

My English is not perfect for now. But I think it will be better in the future. Sorry in advance, If I write with wrong English gramer in this blog.

See you!
Add to Phrasebook No wordlists for English -> Turkish... Create a new wordlist...CopyAdd to Phrasebook No wordlists for English -> Turkish... Create a new wordlist...CopyAdd to Phrasebook No wordlists for English -> Turkish... Create a new wordlist...CopyAdd to Phrasebook No wordlists for English -> Turkish... Create a new wordlist...CopyAdd to Phrasebook No wordlists for English -> Turkish... Create a new wordlist...CopyAdd to Phrasebook No wordlists …

How To Solve Class Not Found Problem in OMNeT++

If you are new to Omnet, it is possible to do some mistakes when you are coding your first program. I used to TOSSIM for some months, then I have started to use Omnet. When I am coding my first program on Omnet, I got this problem at first start to simulating code :
Error in module (omnetpp::cModule) ag (id=1) during network setup: Class "blogkafem" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel(). At first you suppose this problem caused by linked problem of Eclipse (it is avaible and default omnet editor). Almost, all of the web sites are focusing on this sitution to solve this problem (you probably know, if you had searched on google). This approach is prettym much correct.


In this article, I focused an other reason which is caused this problem.

For example, we assume, our code is like this in the .NED file:
simple blogkafem
{
    gates:
 …