PX4 / jMAVSim

Simple multirotor simulator with MAVLink protocol support
BSD 3-Clause "New" or "Revised" License
84 stars 208 forks source link

Native macOS ARM jogl binaries for M1 support #132

Open ThomasDebrunner opened 2 years ago

ThomasDebrunner commented 2 years ago

Updates JOGL / JOAL to v2.4.0-rc-20210111. Replaces the macos binaries with x86/arm64 universal binaries for apple silicon support.

Here for visibility and testing. v.2.4.0 is not out yet, will update as soon as it is released.

dlech commented 2 years ago

I just got a new M1 Macbook, so I'm testing this out. Using the AdoptOpenJDK tap, I get the following exception:

Exception in thread "main" java.lang.UnsupportedClassVersionError: me/drton/jmavsim/Simulator has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 59.0
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
    at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:514)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:422)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:416)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:415)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:468)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:59)
dlech commented 2 years ago

Fixed by using https://adoptium.net to get v17 JDK.

julianoes commented 2 years ago

Looks good, let me know when you want to merge this.

nihavend commented 2 years ago

I am trying jMAVSim on ubuntu20.04 with parallels on Macos M1 Max and having similar exception. Is there a way yo make it work ?

ThomasDebrunner commented 2 years ago

@nihavend This PR only adds the arm64 binaries for the macos os, not linux. Are you using x86 or arm64 linux? x86 should just work, arm linux is not supported yet afaik

nihavend commented 2 years ago

@ThomasDebrunner I am running ubuntu 20.04 on top of parallels for MacBook M1. I may report an issue for my case if you guide me to the right place

julianoes commented 2 years ago

Closes https://github.com/PX4/PX4-Autopilot/issues/19783.