OMNeT++ Installation Guide Version 5.7 Copyright © 2016 András Varga and OpenSi

OMNeT++ Installation Guide Version 5.7 Copyright © 2016 András Varga and OpenSim Ltd. Table of Contents 1. General Information ............................................................................................ 1 2. Windows .............................................................................................................. 2 3. macOS ................................................................................................................. 5 4. Linux ................................................................................................................. 11 5. Ubuntu .............................................................................................................. 17 6. Fedora 34 .......................................................................................................... 20 7. Red Hat ............................................................................................................. 22 8. OpenSUSE ........................................................................................................ 24 9. Generic Unix ..................................................................................................... 26 10. Build Options .................................................................................................. 32 iii Chapter 1. General Information 1.1. Introduction This document describes how to install OMNeT++ on various platforms. One chapter is dedicated to each operating system. 1.2. Supported Platforms OMNeT++ has been tested and is supported on the following operating systems: • Windows x86_64 • MacOS 10.12 or later • Linux distributions covered in this Installation Guide The Simulation IDE is supported on the following platforms: • Linux x86_64 • Windows x86_64 • MacOS x86_64 Simulations can be run practically on any unix-like environment with a decent and fairly up-to-date C++ compiler, for example gcc 5.x. Certain OMNeT++ features (Qtenv, parallel simulation, XML support, etc.) depend on the availability of external libraries (Tcl/Tk, MPI, LibXML or Expat, etc.) IDE platforms are restricted because the IDE relies on a native shared library, which we compile for the above platforms and distribute in binary form for convenience. 1 Chapter 2. Windows 2.1. Supported Windows Versions OMNeT++ supports 64-bit versions of Windows. 32-bit Windows versions are no longer supported. If you need 32-bit builds on Windows, we recommend using OMNeT++ 5.0 2.2. Installing OMNeT++ Download the OMNeT++ source code from http://omnetpp.org. Make sure you select the Windows-specific archive, named omnetpp-5.7-windows-x86_64.zip. The package is self-contained: in addition to OMNeT++ files it includes a C++ compiler, a command-line build environment, and all libraries and programs required by OMNeT++. Copy the OMNeT++ archive to the directory where you want to install it. Choose a directory whose full path does not contain any space; for example, do not put OMNeT++ under Program Files. Extract the zip file. To do so, right-click the zip file in Windows Explorer, and select Extract All from the menu. You can also use external programs like Winzip or 7zip. When you look into the new omnetpp-5.7 directory, should see directories named doc, images, include, tools, etc., and files named mingwenv.cmd, configure, Makefile, and others. 2.3. Configuring and Building OMNeT++ Start mingwenv.cmd in the omnetpp-5.7 directory by double-clicking it in Windows Explorer. It will bring up a console with the MSYS bash shell, where the path is already set to include the omnetpp-5.7/bin directory. On the first start of the shell, you may need to wait for the extraction of the tools directory. If you want to start simulations from outside the shell as well (for example from Explorer), you need to add OMNeT++'s bin directory and also the bin directories in the tools folder to the path; instructions are provided later. First, check the contents of the configure.user file to make sure it contains the settings you need. In most cases you don’t need to change anything. notepad configure.user Then enter the following commands: $ ./configure $ make The build process will create both debug and release binaries. 2 Windows 2.4. Verifying the Installation You should now test all samples and check they run correctly. As an example, the aloha example is started by entering the following commands: $ cd samples/aloha $ ./aloha By default, the samples will run using the graphical Qtenv environment. You should see GUI windows and dialogs. 2.5. Starting the IDE OMNeT++ comes with an Eclipse-based Simulation IDE. You should be able to start the IDE by typing: $ omnetpp We recommend that you start the IDE from the command-line. Yo can also create a shortcut for starting the IDE. To do so, locate the omnetpp.exe program in the omnetpp-5.7/ide directory in Windows Explorer, right-click it, and choose Send To > Desktop (create shortcut) from the menu. On Windows 7, you can right-click the taskbar icon while the IDE is running, and select Pin this program to taskbar from the context menu. 2.6. Environment Variables If you want to start OMNeT++ simulations outside the shell as well (for example from Exlorer), you need to add OMNeT++'s bin, tools/win64/usr/bin and tools/ win64/mingw64/bin directories to the path. First, open the Environment Variables dialog. Click the Start button, then start typing environment variables into the search box. Choose Edit environment variables for your account when it appears in the list. The dialog comes up. In the dialog, select path or PATH in the list, click Edit. Append ";<omnetpp-dir> \bin" and the other needed directories to the value (without quotes), where <omnetpp- dir> is the name of the OMNeT++ root directory (for example C:\omnetpp-5.7). Hit Enter to accept. You need to log-out and then log-in for the changes to take effect. 2.7. Reconfiguring the Libraries If you need to recompile the OMNeT++ components with different flags (e.g. different optimization), then change the top-level OMNeT++ directory, edit configure.user accordingly, then type: $ ./configure $ make clean $ make If you want to recompile just a single library, then change to the directory of the library (e.g. cd src/sim) and type: $ make clean $ make 3 Windows By default, libraries are compiled in both debug and release mode. If you want to make release or debug builds only, use: $ make MODE=release or $ make MODE=debug By default, shared libraries will be created. If you want to build static libraries, set SHARED_LIBS=no in configure.user and re-configure your project. The built libraries and programs are immediately copied to the lib/ and bin/ subdirs. 2.8. Portability Issues OMNeT++ has been tested with both the gcc and the clang compiler from the MinGW- w64 package. 2.9. Additional Packages Note that Doxygen and GraphViz are already included in the OMNeT++ package, and do not need to be downloaded. 2.9.1. MPI MPI is only needed if you would like to run parallel simulations. There are several MPI implementations for Windows, and OMNeT++ does not mandate any specific one. We recommend DeinoMPI, which can be downloaded from http://mpi.deino.net. After installing DeinoMPI, adjust the MPI_DIR setting in OMNeT++'s configure.user, and reconfigure and recompile OMNeT++: $ ./configure $ make cleanall $ make In general, if you would like to run parallel simulations, we recommend that you use Linux, macOS, or another unix-like platform. 2.9.2. Akaroa Akaroa 2.7.9, which is the latest version at the time of writing, does not support Windows. You may try to port it using the porting guide from the Akaroa distribution. 4 Chapter 3. macOS 3.1. Supported Releases This chapter provides additional information for installing OMNeT++ on macOS. The following releases are covered: • macOS 11.x 3.2. Installing the Prerequisite Packages Install the command line developer tools for macOS (compiler, debugger, etc.) $ xcode-select --install Installing additional packages will enable more functionality in OMNeT++; see the Additional packages section at the end of this chapter. 3.3. Enabling Development Mode in Terminal MacOS has a strict default security policy preventing the execution of unsigned code. This behavior often interferes with the development process so you must explicitly allow running unsigned code from a Terminal. On the System Preferences / Security and Privacy / Privacy tab, select Development Tools on the left side, unlock the panel with the lock icon on the bottom left and select the Terminal app on the right side to override the default security policy for the Terminal app. Figure 3.1. Enable Running Unsigned Code in Terminal 5 macOS Make sure that executing developer signed code is allowed at the bottom of the System Preferences / Security and Privacy / General tab. 3.4. Running OMNeT++ on Apple Silicon OMNeT++ does not currently support the Apple M1 processor natively, but you can run the x86_64 version using the Rosetta 2 emulator. To run OMNeT++ under emulation, open a terminal window, then execute: $ arch -x86_64 /bin/zsh --login After this, follow the normal installation instructions and be sure to execute all commands in this terminal. Executing source setenv will automatically do this for you if it detects that it is running on Apple silicon. The above command may graphically prompt you to allow the installation of the emulator component. You can also manually trigger the installation from the command line using the following command: softwareupdate --install-rosetta -- agree-to-license. 3.5. Additional Steps Required on macOS to Use the Debugger The Command Line Developer Tools package contains the lldb debugger. OMNeT++ 5.7 and later contains the necessary driver binary (lldbmi2) that allows lldb to be used in the OMNeT++ IDE. If you are upgrading from an earlier version of OMNeT++, be sure to delete and recreate all Launch Configurations in the IDE. This is required because older Launch Configurations were using gdb as the debugger, but the new IDE uses lldbmi2 as the debugger executable. On the first debug session the OS may prompt you to allow debugging with the lldb executable. 3.6. Downloading and Unpacking OMNeT++ Download OMNeT++ from http://omnetpp.org. Make sure you select to download the macOS specific archive, omnetpp-5.7-macos-x86_64.tgz. Copy the archive to the directory where uploads/Litterature/ omnet-installation-guide.pdf

  • 35
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager