macosomnet++arm64inet

How to install OMNET++ 5.0 on MacBook M2?


I need to utilize INET 3.6, so I need to install omnet++ 5.0 on my PC. I tried to install omnet++5.0 by using arm64 and x86_64 modes, but both failed. Here is my PC info:

Apple M2 Pro
macos: 13.2.1

mode1: arm64 I followed the installation manual of OMNET++ 5.0, and everything goes well. But, when typing omnetpp on the command line, an error omnet quit unexpectedly occurs as shown: enter image description here Then, I tried the following commands:

cd /samples/dyna
./dyna

An error related Tkenv occurs as shown: enter image description here

After re-installing tcl(arm64) by using home-brew, this error stills exists. So I searched online, and find one possible solution proposed by @Rudi Installing OMNeT++ on M1 MacBook. A new error occurs as shown below.

mode2: x86_64

I followed Rudi's solution, and when compiling oment by using make, an error occurs as shown: enter image description here

After installing clang(x86_64),same error occurs again. So is there any solution? Is it possible to install OMNET6.0 on M2, and compile INET 3.6 by using OMNET6.0?


Solution

  • Using older versions of OMNeT++ on a new processor architecture is not an easy task because some parts are distributed as a native pre-compiled library that is not running on aarch64 (like the mentioned libtkpath library).

    I would recommend to try opp_env. This is a new tool intended for automating model installation. Once you set up properly, you can just type:

    $ opp_env install --mode=release,debug inet-3.6
    

    which will download, install and build the appropriate version of inet and omnetpp. After that, type:

    $ opp_env shell inet-3.6
    

    and you will be dropped into a shell, where everything is set up properly and you are ready to hack on inet-3.6. (Note that the IDE will not be functional as it is an x86_64 executable and it would need an external JAVA environment). You may try to use 5.7 or 6.0 (those ones have their own private JRE, so at least the IDE would run under x86_64 emulation).