I have found one solution to compile OMNeT++ 5.0 in Ubuntu Bionic 18.04.1 LTS x86_64.
Following install guides from OMNeT++ 5.0 and 5.4.1, I got to compile the omnet library and IDE, as well as INET 3.4.0.
Because I do not need OSG and QT, I edited configure.user file and set the following variables to:
Beside disabling Qt and Osg, it was still necessary to install some related package in order to get it compiled.
sudo apt-get install build-essential gcc g++ clang bison flex perl python python3 qt5-default libqt5opengl5-dev tcl-dev tk-dev libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-1.0-0 openscenegraph-plugin-osgearth libosgearth-dev openmpi-bin libopenmpi-dev
After that, I run
make MODE=all base -j4
This way I did not compile the samples bundled within the tarball; only the library and the IDE, which are enough for my case.
I do not know why that happened, but since I have to use these versions of omnetpp and libinet, I am happy that it worked.
I hope it can help someone else.