Installing OMNeT++ on M1 MacBook - omnet++

Followed instructions given in https://doc.omnetpp.org/omnetpp/InstallGuide.pdf
OMNeT++ Version - omnetpp-5.6.2
Device - MacBook Air M1 (MacOS Big Sur Version 11.4)
Encountered the following problems.
$. setenv -> didn't work (worked after replacing "." with "source")
$./configure -> gives the following error.
configure: error: Qtenv cannot find qmake -- maybe it is not in the PATH or has some exotic name (tested names were: qmake qmake-qt5 qmake5) - disabling Qtenv. You can try setting the QT_PATH variable in configure.user to a valid location
$ make -> gives the following error.
Makefile:54: Makefile.inc: No such file or directory
make: *** No rule to make target `Makefile.inc'. Stop.
Is it possible to get OMNeT++ working on M1 Macs? Any help would be greatly appreciated.
Thanks in advance.

There is no native support for M1 processors, especially because omnet++ 5.6 was released way before the M1 release, but you can run omnet with Rosetta2 in x86_64 mode. You would still get pretty decent performance. With x86_64 emulation I measured similar performance like on my last year high end AMD laptop. Native mode would give you a 25% boost compared to that.
To turn on the emulation for a shell window, start a new shell with
$ arch -x86_64 /bin/zsh --login
and then continue in that shell with
$ source setenv
$ ./configure
$ make
run everything from that shell window (as usual).
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).

Related

is it possible to run Omnetpp IDE in m1 based Mac?

I used all commands as in omnetpp installation guide (https://doc.omnetpp.org/omnetpp/InstallGuide.pdf) and also according to this answer. The $ make command worked and I also verified installation with:
$ cd samples/aloha
$ ./aloha
which started using qtenv.
but the problem is that the $ omnetpp command doest work with after printing
Starting the OMNeT++ IDE...
and eclipse IDE does not open.
is it possible to use this IDE in m1 Macs?
is there any alternate IDEs to workaround?
You did not specify what version of OMNeT++ you were trying to run. I'm assuming 5.6.
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.

How to build a Go app that can cross-macOS-version?

Here is my recently created macOS app: https://github.com/evillt/macmineable-release
and here is my facing issue: https://github.com/evillt/macmineable-release/issues/18
I built the app on my machine it can run normally on any BigSur device, even M1 devices, but can not run on Catalina(10.15).
So what I want is to build a version that can run on multi-macOS-version with a single app.
Huge thanks for any suggestions!
update
My device is MacBook Pro 2015, Intel I5 chip, Big Sur 11.5.2.
I build this app on my device, it can run normally on:
My device
MacBook 12-inch Big Sur 11.0
Other M1 devices (Big Sur 11.0 or above)
But can not run on MacBook Pro Intel I7 Catalina 10.15.7. The issue here.
That is all I know.
You need to change the CC compile go uses during your builds.
go env CC
clang
which most likely uses the version in /usr/bin/clang
if you have Xcode installed - or really just the Command Line Tools you can see a variety of versions for the last few major releases e.g.:
$ find /Library/Developer/CommandLineTools -name clang
/Library/Developer/CommandLineTools/usr/bin/clang
/Library/Developer/CommandLineTools/usr/lib/clang
/Library/Developer/CommandLineTools/usr/lib/swift/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
so to build against an older SDK like MaxOSX10.15, set CC to the explicit version you need for your go build like so:
CC=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang go build
I have good experience building as a Unix executable and packaging as a Mac app, by using the instructions manual at
https://medium.com/#mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
build Unix exec file
go build -o bin/{program} {program}
Packaging the application on macOS (Big Sur) and installing it on macOS (High Sierra) was successful.

How to make Linux System work via Oracle VM Box on a Apple MacBook M1 running MacOS Big Sur?

I want to use Linux on my M1 MacBook for my Info Sec course. I have installed the latest version of Oracle VirtualBox (6.1.26). It installed just fine with no glitches. But after importing the .ova file, when I start the system. It gives two error boxes.
VM Box Error 1
VM Box Error 2
I have tried a bunch of fixes. Kernel driver not installed (rc=-1908) Getting Errors in macOS Big Sur 11.0.1
Unable to start a Linux VM in VirtualBox
But this doesn't work. First of all, I didn't get any message in the System preferences > Security & Privacy > General section. Secondly, when i run the commands mentioned in the link above, it says
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e.
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Terminal Snapshot
I guess this is a M1 specific problem because of the arm64 architecture.
Does anyone have a fix for this?
It looks like the Virtual Box you try to import was installed with an x86_64 archtiecture. As of now it is not possible to run a x86-based guest on an M1 Mac since they are different architectures.
EDIT:
https://www.virtualbox.org/manual/UserManual.html#hostossupport
Lists all supported HOST os. It requires Intel Macs as for now.
Screenshot:

Graphic Interface not available when running simulation

I'm getting this error when running the configure file:
configure: error: Cannot build Qt apps, probably due to missing or too
old Qt packages. Make sure Qt development packages are installed and
newer than Qt 5.4. You can disable Qtenv by setting the WITH_QTENV
variable to "no" in configure.user
I've installed Qt5 and also added the path to the paths file.
My Qt version is 5.15.0 and my MacOS is Catalina (10.15.5 (19F101)).
Probably qmake is not able to build the Qt interfaces but I couldn't make it do it.
I think you're misunderstanding for OS support bit. macOS (After High Sierra version) is only use 64bit (x86_64). If you want to know your macOS support bit information, you can execute "uname -a" command in terminal.
i386: 32bit
x86_64: 64bit
I hope this has been useful. :D
It seems that my OS version is 32 bits and Qt5 is 64 bits. Since some of the binaries come in the 64 bits flavor, I was not able to use it with omnet++ 5.6.
I installed omnet++ version 5.0, but the program wouldn't run.
So I went back to omnet++ 5.6 and instead of using Qt, I compiled with tcl/tk and that worked for me.

Installing openCV on Lion OS 10.7.4 Xcode 4.3.2

I'm trying to install openCV on university's iMac,
but the problem is our university's network is so strict.
and I couldn't install openCV using MacPorts.
I tried google to look for a way to install but it all failed
i guess because it is kind of old ways and because my network is so strict.
So if anybody knows a way that I can download a ready framework with how to use it inside
Xcode. or at least a framework with how to install it to work with Xcode.
or a way to download from the source and compile it then install it in Xcode
please.
Because I tried the cmake way and I still have no luck to get it work.
thanks in advance.
sources I used:
http://salemsayed.me/?p=240
http://opencv.willowgarage.com/wiki/InstallGuide
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
http://www.ient.rwth-aachen.de/cms/software/opencv/
I'm using Lion + Xcode 4.x branch, with OpenCV svn trunk. Everything works fine. You have to install cmake first, then get the code from the svn following the instructions at http://code.opencv.org . The compilation process worked fine for me for all the core modules + the Qt module + the GPU module + TBB acceleration.
The instructions are the same as the Linux platform.
After setting up cmake configuration in a terminal (using ccmake for a more interactive tool),
I set the architecture to x86_64 (on my MBP Core 2 Duo), the target directory to /usr/local/(the default), and I have Intel TBB installed in /usr/local/.
Cmake generates the makefiles for you, so you just have to type make -j2 to compile, then sudo make install. If you're working on a workstation, then you have more CPU power, and you can replace the value 2 by more, e.g. 8.

Resources