javafx-gradle-plugin icon indicating copy to clipboard operation
javafx-gradle-plugin copied to clipboard

plugin downloads wrong architecture for macOS M1

Open vewert opened this issue 4 years ago • 7 comments

I'm running on macOS with a Silicon (M1) chip.

I set the version in the plugin to 17, which should download openjfx 17, which has M1 support.

When I run my application, I get the following error:

Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/vewert/.openjfx/cache/17/libprism_es2.dylib: dlopen(/Users/vewert/.openjfx/cache/17/libprism_es2.dylib, 1): no suitable image found.  Did find:
	/Users/vewert/.openjfx/cache/17/libprism_es2.dylib: mach-o, but wrong architecture
	/Users/vewert/.openjfx/cache/17/libprism_es2.dylib: stat() failed with errno=38

I checked /Users/vewert/.openjfx/cache/17/ and ran file libprism_es2.dylib and got: libprism_es2.dylib: Mach-O 64-bit dynamically linked shared library x86_64 which makes it look like it has downloaded the Intel libraries instead of the M1 libraries.

I'm not sure if the problem is that the M1 version isn't available on Maven Central, or the plugin is downloading the wrong one.

As a work around, I downloaded the JavaFX 17 jdk, set a local sdk: https://github.com/openjfx/javafx-gradle-plugin#5-using-a-local-javafx-sdk

vewert avatar Sep 11 '21 22:09 vewert

I get the same problem when using Maven

strazdinsg avatar Sep 20 '21 15:09 strazdinsg

@henryhchchc Thanks for addressing this

Anyone have a timeline when this a new release with this fix will be published?

hohonuuli avatar Nov 15 '21 23:11 hohonuuli

Looks like this fix will be part of 0.0.11 - do you know when this will be released?

mbcoder avatar Dec 21 '21 16:12 mbcoder

Looks like this fix will be part of 0.0.11 - do you know when this will be released?

I get the same problem .How did you solve it

GGXBoo avatar Dec 24 '21 11:12 GGXBoo

In build.gradle change the javafx plugin version to 0.0.11 or above, for example:

plugins {
    id 'java'
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.11'
}

cryptoAlgorithm avatar Apr 10 '22 03:04 cryptoAlgorithm

Is this issue resolved?

FeldrinH avatar Sep 28 '22 12:09 FeldrinH

This seems to be working for me, I am currently using version 0.0.13.

vewert avatar Sep 28 '22 15:09 vewert