Modify

Opened 7 weeks ago

Closed 6 weeks ago

Last modified 6 weeks ago

#21620 closed defect (fixed)

[PATCH] JNA does not support ARM M1 Macs

Reported by: anonymous Owned by: Don-vip
Priority: normal Milestone:
Component: Plugin jna Version:
Keywords: Cc:

Description (last modified by taylor.smock)

2021-12-01 14:49:07.651 SEVERE: org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin mapwithai. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.UnsatisfiedLinkError: /Users/imac62/Library/Caches/JNA/temp/jna10834888994934519908.tmp: dlopen(/Users/imac62/Library/Caches/JNA/temp/jna10834888994934519908.tmp, 0x0001): tried: '/Users/imac62/Library/Caches/JNA/temp/jna10834888994934519908.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna10834888994934519908.tmp' (no such file)
org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin mapwithai
	at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:388)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:812)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:897)
	at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:949)
	at org.openstreetmap.josm.gui.MainApplication.loadLatePlugins(MainApplication.java:1219)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:954)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:281)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:739)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:383)
	... 7 more
Caused by: java.lang.UnsatisfiedLinkError: /Users/imac62/Library/Caches/JNA/temp/jna10834888994934519908.tmp: dlopen(/Users/imac62/Library/Caches/JNA/temp/jna10834888994934519908.tmp, 0x0001): tried: '/Users/imac62/Library/Caches/JNA/temp/jna10834888994934519908.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna10834888994934519908.tmp' (no such file)
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1953)
	at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
	at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
	at com.sun.jna.Native.<clinit>(Native.java:195)
	at org.openstreetmap.josm.plugins.jna.mac.Foundation.<clinit>(Foundation.java:25)
	at org.openstreetmap.josm.plugins.jna.mac.JosmMacNativeLogHandler.publish(JosmMacNativeLogHandler.java:16)
	at java.logging/java.util.logging.Logger.log(Logger.java:980)
	at java.logging/java.util.logging.Logger.doLog(Logger.java:1007)
	at java.logging/java.util.logging.Logger.logp(Logger.java:1200)
	at org.openstreetmap.josm.tools.Logging.logPrivate(Logging.java:384)
	at org.openstreetmap.josm.tools.Logging.logPrivate(Logging.java:377)
	at org.openstreetmap.josm.tools.Logging.error(Logging.java:188)
	at org.openstreetmap.josm.tools.ImageProvider.getResource(ImageProvider.java:698)
	at org.openstreetmap.josm.plugins.mapwithai.gui.MapWithAIMenu.<init>(MapWithAIMenu.java:72)
	at org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin.<init>(MapWithAIPlugin.java:92)
	... 13 more

2021-12-01 14:49:07.654 SEVERE: Handled by bug report queue: java.lang.NoClassDefFoundError: Could not initialize class org.openstreetmap.josm.plugins.jna.mac.Foundation
java.lang.NoClassDefFoundError: Could not initialize class org.openstreetmap.josm.plugins.jna.mac.Foundation
	at org.openstreetmap.josm.plugins.jna.mac.JosmMacNativeLogHandler.publish(JosmMacNativeLogHandler.java:16)
	at java.logging/java.util.logging.Logger.log(Logger.java:980)
	at java.logging/java.util.logging.Logger.doLog(Logger.java:1007)
	at java.logging/java.util.logging.Logger.logp(Logger.java:1200)
	at org.openstreetmap.josm.tools.Logging.logPrivate(Logging.java:384)
	at org.openstreetmap.josm.tools.Logging.logWithStackTrace(Logging.java:346)
	at org.openstreetmap.josm.tools.Logging.error(Logging.java:207)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:819)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:897)
	at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:949)
	at org.openstreetmap.josm.gui.MainApplication.loadLatePlugins(MainApplication.java:1219)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:954)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:281)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:739)


Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"

Attachments (1)

21620.patch (593 bytes) - added by taylor.smock 7 weeks ago.
Update JNA from 5.6.0 to 5.10.0

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 weeks ago by taylor.smock

Component: Plugin mapwithaiPlugin jna
Description: modified (diff)
Owner: changed from taylor.smock to Don-vip
Summary: MapWithAI causes JNA exception[PATCH] JNA does not support ARM M1 Macs

Breaking changes in JNA:

  • Prebuild native library for darwin x86 (32bit java on mac OS) was removed (5.7)
    • In return, we get macOS aarch64 architecture to universal darwin target (5.7)

So we will lose 32bit Java support on Mac for JNA. Which people are not running (hopefully).
@Don-vip: Do we have stats for people on Mac running on 32 bit? I wouldn't imagine it would be very high, but I could be wrong about that.

Changed 7 weeks ago by taylor.smock

Attachment: 21620.patch added

Update JNA from 5.6.0 to 5.10.0

comment:2 Changed 7 weeks ago by Don-vip

Status: newassigned

Can't check right now but I don't think we have anyone running JOSM on a 32-bit mac.

comment:3 Changed 6 weeks ago by Stereo

If a Mac was built in 2007 or later, its processor is 64-bit. We probably have more M1 users than 32 bit Intel users.

Last edited 6 weeks ago by Stereo (previous) (diff)

comment:4 in reply to:  3 ; Changed 6 weeks ago by taylor.smock

Replying to Stereo:

If a Mac was built in 2007 or later, its processor is 64-bit. We probably have more M1 users than 32 bit Intel users.

Good to know.

@Don-vip: If you are busy (and don't mind), I can apply the patch to SVN and update the JNA plugin jar file.

comment:5 in reply to:  4 ; Changed 6 weeks ago by Don-vip

Replying to taylor.smock:

@Don-vip: If you are busy (and don't mind), I can apply the patch to SVN and update the JNA plugin jar file.

Yes sure please go ahead. I face at the same time a lack of time and a new PC to configure, I don't have yet reinstalled my development environment.

comment:6 Changed 6 weeks ago by taylor.smock

Resolution: fixed
Status: assignedclosed

In 35872/osm:

Fix #21620: JNA: Update JNA library from 5.6.0 to 5.10.0

comment:7 Changed 6 weeks ago by taylor.smock

In 35873/osm:

dist: see #21620: JNA: Update JNA library from 5.6.0 to 5.10.0

comment:8 in reply to:  5 Changed 6 weeks ago by taylor.smock

Replying to Don-vip:

Yes sure please go ahead. I face at the same time a lack of time and a new PC to configure, I don't have yet reinstalled my development environment.

Hopefully things calm down for you soon. And hopefully it won't be too much of a PITA to configure your new PC -- I know I've had issues with svn and Mac OS X.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.