0

I am packaging some JVM application with AdoptOpenJDK / 11 / HotSpot. I am using the arm32 build, which AFAICS is the only build suitable for Raspbian (running Buster). However, when I build my .deb package and try to install it via sudo dpkg -i mypackage_1.2.3_arm.deb, I get the error message

package architecture (arm) does not match system (armhf)

And I found the work around:

sudo dpkg --add-architecture arm

Why is the arm32 not by default compatible with Raspbian Buster? I mean, the application runs correctly after I add the architecture. Why isn't this architecture enabled by default? Or is there a better build of AdoptOpenJDK I should use?

4
  • If you have Raspbian why do you try to install JDK11 manually? OpenJDK 11 is available via apt. As far as I know AdoptOpenJDK is incompatible with Raspbian because of some standard libraries Raspbian bases on and that are incompatible what AdoptOpenJDK requires.
    – Robert
    Jun 24, 2021 at 17:40
  • Because OpenJFX is broken and/or isn't installable in Debian/Raspbian. The app uses WebView so needs OpenJFX bundled. As far as I have checked, the app runs correctly on the Pi, no issues or incompatibilities with the bundled JDK (have to do more thorough testing, though)
    – 0__
    Jun 24, 2021 at 18:03
  • And also, the app installer I'm building is for multiple platforms, so while it's true that OpenJDK 11 is easily available, this isn't the case for other platforms, and it's an end-user facing app, so they should be required to only load the app, and not have to fiddle around with JDK installs
    – 0__
    Jun 24, 2021 at 18:05
  • "off-topic" LOL, stackexchange culture really needs to take stock of itself...
    – 0__
    Jul 3, 2021 at 12:14

1 Answer 1

0

As @Robert correctly assumed, these versions are incompatible, so adding the architecture is just plastering over it. While basic desktop functionality seems fine, there are subsequent problems, like using the Web View:

Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /home/pi/.openjfx/cache/11.0.2/libprism_es2.so: /home/pi/.openjfx/cache/11.0.2/libprism_es2.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
java.lang.UnsatisfiedLinkError: /home/pi/.openjfx/cache/11.0.2/libprism_es2.so: /home/pi/.openjfx/cache/11.0.2/libprism_es2.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)

This actually seems to be a problem of the system property os.arch reported as arm and the JavaFX components downloaded with that architecture being wrong. Maybe in the end this yet another reason to dump Raspbian in favour of a standard Linux.

Not the answer you're looking for? Browse other questions tagged or ask your own question.