I followed the installation guide and installed all the packages mentioned. However, I end up with this error message while running ./configure

checking for osgEarth with CFLAGS=" -fPIC  -fno-stack-protector  " LIBS="  -losgEarth -losgEarthUtil"... no
configure: error: Cannot find osgEarth 2.7 or later. Set WITH_OSGEARTH=no in configure.user to disable this feature or install an up to date version of osgEarth.

Here is a link to my config.log file : config.log

  • 1
    Please see my answer here stackoverflow.com/questions/50209819/…sudo apt install libosgearth-dev etc. etc. Build prerequisites. ( No usable libosgearth-dev for 16.04 ) And please follow my well tested "Build example". – Knud Larsen May 12 '18 at 9:00
  • Thanks for responding.. I'd like to know what you mean by "usable" libosgearth-dev ? – PARTH SURESH May 12 '18 at 14:01
  • The linked text says: » version 2.7 required. Not available, Ubuntu 16.04 «. .... The Ubuntu 16.04 version is libosgearth-dev_2.5.0, i.e. not usable, when version 2.7.0 is required. Hence ./configure WITH_OSGEARTH=no – Knud Larsen May 12 '18 at 15:09
  • I had actually installed version 2.7 before asking this question :) Which is why I was confused. – PARTH SURESH May 12 '18 at 18:58

Installing the libgeos-dev package, and then editing the configure.user file in my OMnet++ source directory solved my problem.

$ sudo apt-get install libgeos-dev

Change the line #OSGEARTH_LIBS= to this:
OSGEARTH_LIBS=" -losgEarth -losgEarthUtil -lgeos_c "

Make sure to remove the # in the beginning.

Now run:

$ . setenv
$ ./configure

And it should work..

Others have also faced this problem before and have the fix mentioned here solved their issues:

Answered by Attila Török on the omnetpp google group (omnetpp@googlegroups.com)


Cannot find osgEarth 2.7 or later

I found osgEarth 2.7 for Ubuntu 16.04 in the "ubuntugis repo" :

sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt update
sudo apt install g++ libxml2-dev libosgearth-dev bison flex clang swig libqt5opengl5-dev qt5-qmake openjdk-8-jre libopenmpi-dev tcl8.5-dev tk8.5-dev

And now you get osgEarth 2.7 and can do export QT_SELECT=5 && ./configure in omnetpp-5.3/.

... All requirements are then included in the config result. ( The ancient Akaroa (optional) usually fails building.)

Some hints here about "osgEarth": https://stackoverflow.com/questions/50304274/error-while-installing-omnet-on-ubuntu-16-04-cannot-find-osgearth/50335148#50335148

configure.user >>> OSGEARTH_LIBS=" -losgEarth -losgEarthUtil -lgeos_c "

  • I had used the ubuntugis repo before asking this question.. Shows the same message with osgEarth 2.7.. Thanks for answering anyways.. I've asked this question in the mailing groups too. Will update once I get an answer – PARTH SURESH May 12 '18 at 18:57
  • Strange. I installed libosgearth-dev libopenmpi-dev, ran export QT_SELECT=5 && ./configure && make in Ubuntu 16.04 : No errors. ... Are you sure you installed libosgearth-dev ? And got 2.7 ? Please do a 'status' check → dpkg -s libosgearth-dev – Knud Larsen May 12 '18 at 19:11
  • It shows the package as installed.. – PARTH SURESH May 14 '18 at 16:39
  • Please add the command, and the output to your question : dpkg -s libosgearth-dev – Knud Larsen May 14 '18 at 16:56
  • Are you quite sure that all the prerequisites are installed? sudo apt install g++ libxml2-dev libosgearth-dev bison flex clang swig libqt5opengl5-dev qt5-qmake openjdk-8-jre libopenmpi-dev tcl8.5-dev tk8.5-dev – Knud Larsen May 15 '18 at 9:34

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.