Gluon Mobile app, Project fails linking with Undefined symbols for architecture x86_64 error

59 Views Asked by At

I am incrementally moving a functional JavaFX desktop GUI to Gluon and GRAALVM 23.x.x using JavaFX 20. We are using Maven as our build tool and we are using the latest version of macOS / xCode.

The app looks and works great on Desktop when built with JavaFX 20 and Java VM 20. I've ported the project in a reduced functional version so we may move it to mobile. The project completes MAVEN: gluonfx:run and compiles using MAVEN gluonfx:compile.

MAVEN gluonfx:link fails with an Undefined symbols for architecture x86_64 error:

...
[Fri Jun 16 18:17:36 EDT 2023][INFO] [SUB] Undefined symbols for architecture x86_64:
[Fri Jun 16 18:17:36 EDT 2023][INFO] [SUB]   "_Java_com_sun_management_internal_OperatingSystemImpl_initialize0", referenced from:
[Fri Jun 16 18:17:36 EDT 2023][INFO] [SUB]       ___data in app.myapp.model.mypackage.foomain.o
[Fri Jun 16 18:17:36 EDT 2023][INFO] [SUB] ld: symbol(s) not found for architecture x86_64
[Fri Jun 16 18:17:36 EDT 2023][INFO] [SUB] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[Fri Jun 16 18:17:36 EDT 2023][FINE] Result for link: 1
[Fri Jun 16 18:17:36 EDT 2023][SEVERE] Process link failed with result: 1
...

I believe the error is due to the use of Platform such as Platform.runlater() and other calls for integrating/joining long running threads such as showing an ImageView and changing it to a MediaView when the video has completed downloading. The project calls Platform in many locations.

  • EDIT: Platform does not appear to be causing the error. Edited the examples by adding
Platform.runLater(() -> System.out.printline("Hello from Platform"));

This did not cause an error in the example app.

This is my first use of Gluon and the GRAALVM. The docs provide a decent description and excellent examples in GitHub. I was able to successfully create a desktop app using the examples. But they are fairly simple in comparison to this project.

Before moving forward with moving these to other strategies, has anyone had this problem? Any ideas to the cause? Potential solutions?

0

There are 0 best solutions below