[Solved] Error building OMNeT++ 5.0 in Ubuntu 18.04

1,292 views
Skip to first unread message

Rayner Pires

unread,
Jul 30, 2018, 1:23:43 PM7/30/18
to omn...@googlegroups.com
I have a fresh new installation of Ubuntu Bionic 18.04.1 LTS x64 (Linux 4.15.0-29-generic) and have to compile OMNeT++ 5.0 and INET 3.4.0 in order to continue a backed up omnet project.

This project has been used under Ubuntu Xenial 16.04.3 LTS x64 with those versions of OMNeT++ and INET.

The problem is that I cannot successfully compile omnetpp due to the following linker failure, and I am stucked because I could not trace back the problem:

(...)

cd
/home/user/bin/omnetpp-5.0/src/envir && make opp_run_executable
make
[2]: Entering directory '/home/user/bin/omnetpp-5.0/src/envir'
clang
++ -v -Wl,-rpath,/home/user/bin/omnetpp-5.0/lib -Wl,-rpath,/home/user/bin/omnetpp-5.0/tools/linux64/lib -Wl,-rpath,. -o "/home/user/bin/omnetpp-5.0/out/clang-release/src/envir/opp_run_release" /home/user/bin/omnetpp-5.0/out/clang-release/src/envir/main.o -Wl,-u,_cmdenv_lib -Wl,--no-as-needed -loppcmdenv -loppenvir -Wl,-u,_tkenv_lib -Wl,--no-as-needed -lopptkenv -loppenvir -lopplayout -L/home/user/bin/omnetpp-5.0/lib/clang -loppsim -loppnedxml -loppcommon -lxml2 -ldl -lstdc++

"/usr/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /home/user/bin/omnetpp-5.0/out/clang-release/src/envir/opp_run_release /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/crtbegin.o -L/home/user/bin/omnetpp-5.0/lib/clang -L/usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../.. -L/usr/lib/llvm-6.0/bin/../lib -L/lib -L/usr/lib -rpath /home/user/bin/omnetpp-5.0/lib -rpath /home/user/bin/omnetpp-5.0/tools/linux64/lib -rpath . /home/user/bin/omnetpp-5.0/out/clang-release/src/envir/main.o -u _cmdenv_lib --no-as-needed -loppcmdenv -loppenvir -u _tkenv_lib --no-as-needed -lopptkenv -loppenvir -lopplayout -loppsim -loppnedxml -loppcommon -lxml2 -ldl -lstdc++ -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../../x86_64-linux-gnu/crtn.o

liboppsim
.so: undefined reference to `omnetpp::cCommBufferBase::getMessageSize() const'
liboppsim.so: undefined reference to `
omnetpp::cCommBufferBase::getBuffer() const'
liboppsim.so: undefined reference to `omnetpp::cMemCommBuffer::~cMemCommBuffer()'

liboppsim
.so: undefined reference to `omnetpp::cMemCommBuffer::cMemCommBuffer()'

error: linker command failed with exit code 1 (use -v to see invocation)

Makefile:118: recipe for target '/home/user/bin/omnetpp-5.0/out/clang-release/src/envir/opp_run_release' failed


I have the exact same error regardless I use CLANG or GCC/G++.

I followed the instructions at both 'omnetpp-5.0/doc/InstallationGuide.pdf' and InstallationGuide.pdf in order to compile OMNeT++ in my new OS, but neither of them helped me.


Anyone could help me, please? I've attached the output for 'configure' and 'make V=1' commands.
configure_out.txt
make_out.txt

Rashmi Varma

unread,
Jul 30, 2018, 1:33:09 PM7/30/18
to omn...@googlegroups.com
Hi,

You have followed installation guide of omnet 5.4.1.

Goto your doc folder inside omnet and use that installation guide.

On Mon 30 Jul, 2018, 19:23 Rayner Pires, <rayn...@gmail.com> wrote:
I have a fresh new installation of Ubuntu Bionic 18.04.1 LTS x64 (Linux 4.15.0-29-generic) and have to compile OMNeT++ 5.0 and INET 3.4.0 in order to continue a backed up omnet project.

This project has been used under Ubuntu Xenial 16.04.3 LTS x64 with that versions of OMNeT++ and INET.

I followed the instructions at InstallationGuide.pdf in order to compile OMNeT++ in my new OS.

The problem is that I cannot successfully compile omnetpp due to some linker failure, and I am stucked because I could not trace back the problem.

Anyone could help me, please? I've attached the output for 'configure' and 'make V=1' commands.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Rayner Pires

unread,
Jul 30, 2018, 1:43:00 PM7/30/18
to OMNeT++ Users
Hi Rashmi Varma. Thank you for your answer.

I have followed both instructions (5.0 and the latest 5.4.3) but none of them mention a solution for this problem.

Rayner Pires

unread,
Jul 30, 2018, 10:35:20 PM7/30/18
to OMNeT++ Users
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:

WITH_QTENV=no
WITH_OSG
=no
QT_VERSION
=5

Beside disabling Qt and Osg, it was still necessary to install some related package in order to get it compiled.

I installed:

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

. setenv
./configure
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.

Att.,
Reply all
Reply to author
Forward
0 new messages