How to fix: `./inet/visualizer/scene/SceneOsgEarthVisualizer.h:25:10: fatal error: 'osgEarth/MapNode' file not found`
Enough7 opened this issue · comments
Using Ubuntu 23.04:
OsgEarth is not available via apt from Ubuntu 22.04. on. So you need to get the sources yourself.
The Omnet's installation manual says:
Ubuntu 22.04 no longer provides the libosgearth package so osgEarth must be
installed from sources. OpenSceneGraph can still be installed usingsudo apt-get install libopenscenegraph-dev
.
Install osgEarth
- Get dependencies
In my case I needed to enter the following in my terminal:
sudo apt install libgdal-dev
sudo apt-get install libcurl4-openssl-dev
- Install with (Maybe this step is not necessary?)
cmake .
make -j <CPU-Core Count>
Make osgEarth available to the install-scrip
The error occurs while building INet.
This is because the compiler does not where the MapNode
file is located.
To change this change directory to F2MD/inet
an add in Line 16 another Include Option -I
.
For example:
# from
MAKEMAKE_OPTIONS := -f --deep -o INET -O out -pINET -I.
# to
MAKEMAKE_OPTIONS := -f --deep -o INET -O out -pINET -I. -I/.../osgearth/src
Now run the install-Script again.
CPLUS_INCLUDE_PATH
Putting
export CPLUS_INCLUDE_PATH="/.../osgearth/src:$CPLUS_INCLUDE_PATH"
in ~/.profile
did not work for me.
Fix osgearth/src/osgEarth/ElevationPool.cpp:19:10: fatal error: 'osgEarth/ElevationPool' file not found
I am stuck here
I recommend using the Docker Image in this case since the project is not tested on Ubuntu 23.04.
I figured it out. Once the installation failed change the directory in your terminal to the Inet Submodule root path and use opp_featuretool
by entering
~/[...]/[...]/[...]/F2MD/f2md-build/F2MD/inet$ opp_featuretool disable visualization
Disabling feature(s): visualization
Dependent features: configuratortutorial, visualization_examples, visualizationtutorial, visualizershowcases, wirelessshowcases
Disable these features, too? [Y/n] y
opp_featuretool: .oppfeaturestate file updated.
If you get NameError: name 'raw_input' is not defined
than change the topline of the opp_featuretool
from
#!/usr/bin/env python3
to
#!/usr/bin/env python2
Then run ./installF2MD
as usually.
FYI: omnetpp/omnetpp#1077