Skip to content
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

plugin downloads wrong architecture for macOS M1 #112

Closed
vewert opened this issue Sep 11, 2021 · 7 comments
Closed

plugin downloads wrong architecture for macOS M1 #112

vewert opened this issue Sep 11, 2021 · 7 comments

Comments

@vewert
Copy link

vewert commented Sep 11, 2021

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

@strazdinsg
Copy link

I get the same problem when using Maven

@hohonuuli
Copy link

@henryhchchc Thanks for addressing this

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

cbeams added a commit to cbeams/bisq2-proto that referenced this issue Nov 16, 2021
Problem: until the recent release of JavaFX 17, it was impossible to run
a JavaFX app on an M1 Mac without locally installing an early-access
build of JavaFX SDK. Even after the release of JavaFX 17, however, it
was still not possible to run a JavaFX application on an M1 Mac because
of the bug reported at openjfx/javafx-gradle-plugin#112 (which caused
led to the dreaded "No toolkit found" error).

Solution: the PR at openjfx/javafx-gradle-plugin#113 fixes this error in
the javafx-gradle-plugin, but has not yet been released. This commit
assumes that the PR branch as been built and installed on the local
machine, and expects to resolve it from the local maven cache. Happily,
it works as expected, making it possible to run ./bisqfx without the SDK
installed locally.
@mbcoder
Copy link

mbcoder commented Dec 21, 2021

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

@GordonGgx
Copy link

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

@cryptoAlgorithm
Copy link

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'
}

@FeldrinH
Copy link

Is this issue resolved?

@vewert
Copy link
Author

vewert commented Sep 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants