首页 > 解决方案 > 在 M1 MacBook 上安装 OMNeT++

问题描述

遵循https://doc.omnetpp.org/omnetpp/InstallGuide.pdf中给出的说明

OMNeT++ 版本 - omnetpp-5.6.2

设备 - MacBook Air M1(MacOS Big Sur 版本 11.4)

遇到以下问题。

美元。setenv -> 不起作用(在将“.”替换为“source”后起作用)

$./configure -> 给出以下错误。

配置:错误:Qtenv 找不到 qmake——可能它不在 PATH 中或有一些奇怪的名称(测试名称为:qmake qmake-qt5 qmake5)——禁用 Qtenv。您可以尝试将 configure.user 中的 QT_PATH 变量设置为有效位置

$ make -> 给出以下错误。

Makefile:54: Makefile.inc: 没有这样的文件或目录 make: *** 没有规则来制作目标“Makefile.inc”。停止。

是否可以让 OMNeT++ 在 M1 Mac 上运行?任何帮助将不胜感激。

提前致谢。

标签: omnet++

解决方案


没有对 M1 处理器的本机支持,特别是因为 omnet++ 5.6 是在 M1 发布之前发布的,但是您可以在 x86_64 模式下使用 Rosetta2 运行 omnet。你仍然会得到相当不错的表现。通过 x86_64 仿真,我测量了与去年高端 AMD 笔记本电脑相似的性能。与此相比,本机模式将为您提供 25% 的提升。

要打开 shell 窗口的仿真,请使用以下命令启动一个新 shell

$ arch -x86_64 /bin/zsh --login 

然后在那个shell中继续

$ source setenv
$ ./configure
$ make

从那个 shell 窗口运行所有东西(像往常一样)。

NOTE: OMNeT++ 5.6 relies on the system-wide installed JRE to run the IDE. That may NOT be present on your system if you are running on ARM. OMNeT++ 6 and 5.7 comes with a built-in private JRE, so the IDE should work with those versions also in intel emulation mode.

ps: OMNeT++ 6 may get native M1 support (this depends on the availability of some dependencies (JavaVM, Qt etc.). I'm also considering an ARM based docker image, that would allow running at native performance (as long as you have an XServer installed).


推荐阅读