-
Notifications
You must be signed in to change notification settings - Fork 7
omnetpp-5.7.x installation stopped working on Apple Silicon #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Even if the arch command would be available, the installation would fail. The reason is that opp_env would run NIX as a aarch64 command and all the dependencies downloaded would be aarch64 binaries. The 5.7 version never supported the aarch64 architecture natively, but rather the setenv script just switched on x86_64 emulation (with the help of the arch command). So you would end with aarch64 dependencies (Qt etc) and an x86_64 based omnet. I'm not sure what would happen if you switch the architecture FIRST and then try to use opp_env in that shell. I'm not sure whether NIX would handle that properly and pull the dependencies from the x86_64 repo properly. If that is the case, then the compilation MIGHT work. I have to try this out as I never tested it. |
Ohh, gosh. Tried it out. I can see at least 4 reasons why it's not working :( . The major one is that even if you start an emulated x86_64 shell, if you run an application from there that is aarch64 compiled, all its subprocesses will be again aarch64 (which is reasonable) but this gets in the way. The probel is that python that is used to execute opp_env is also aarch64 compiled so all subprocesses tend to switch back to aarch64 mode. In this particular case I would probably skip opp_env and would just natively install omnetpp 5.7. At least pre 6.0 versions came with all the x86_64 dependencies pre-packaged so you don't have to deal with that. I acknowledge, that this is a bug that would be great to be ironed out. In short: Support OMNeT++ versions older than 6.0 to be installed on Apple silicon macs in an x86_64 emulated environment. |
Implementation hint: The opp_env script needs to be aware that this is a special case (i.e. running in emulation) and all subprocesses MUST be launched for the same architecture (even if python itself is aarch64). Also the system propery in NIX files bust be set to so in short an "i'm running in rosetta2" flag must be introduced. |
Thanks, @rhornig! Native 5.7.1 through Rosetta worked, although I was under the impression I had some Qt issues around a year ago, hence I discovered |
My old local installation is still working, but a new one throws this error. Although the
arch
command is definitely fine:Newer OMNeT++ is not an option, unfortunately, and Docker for opp_env doesn't work with GUI (at least I couldn't get it to). This is latest opp_env:
The text was updated successfully, but these errors were encountered: