12-15-2021, 05:06 PM
(This post was last modified: 12-15-2021, 05:20 PM by Dendrocalamus64.)
Short version: Edit ~/Freenet/run.sh.
Change jna-4.2.2.jar and jna-platform-4.2.2.jar to jna-4.5.2.jar and jna-platform-4.5.2.jar both times that they appear, and then it seems to run.
---
It doesn't support aarch64.
There is an AUR package, https://aur.archlinux.org/packages/freenet/
According to that, java-service-wrapper is a required dependency.
https://aur.archlinux.org/packages/java-...e-wrapper/
Even though the PKGBUILD for java_service_wrapper includes aarch64, it doesn't actually build properly on aarch64 without modification.
^ that part is obviously wrong, and causes it to detect the platform as x86 64-bit. It seems to build if I hardcode _bits=64 ; _arch=armhf, using the 64-bit armhf makefile.
The wrappers are supposed to be in ~/Freenet/bin
It doesn't include a wrapper for aarch64 or armhf 64-bit.
java-service-wrapper installs to a system directory (/usr/share/java) so it doesn't fix that.
The error messages are coming from ~/Freenet/run.sh
If it can't find the wrappers, it falls back to a command line with a hardcoded classpath that includes jna and jna-platform. This code obviously doesn't get tested often because, while both of those are bundled and in the same directory, the hardcoded version number is wrong, so it can't find them.
The error message 'Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Platform' is the direct result of that.
wrapper.conf uses the proper version numbers; they forgot to update the fallback.
Change jna-4.2.2.jar and jna-platform-4.2.2.jar to jna-4.5.2.jar and jna-platform-4.5.2.jar both times that they appear, and then it seems to run.
Code:
$ sed -i 's/4.2.2/4.5.2/g' run.sh
---
It doesn't support aarch64.
There is an AUR package, https://aur.archlinux.org/packages/freenet/
According to that, java-service-wrapper is a required dependency.
https://aur.archlinux.org/packages/java-...e-wrapper/
Even though the PKGBUILD for java_service_wrapper includes aarch64, it doesn't actually build properly on aarch64 without modification.
Code:
[[ "$CARCH" = @(x86_64|aarch64) ]] && _bits=64 || _bits=32
[[ "$CARCH" = arm* ]] && _arch=armhf || _arch=x86
^ that part is obviously wrong, and causes it to detect the platform as x86 64-bit. It seems to build if I hardcode _bits=64 ; _arch=armhf, using the 64-bit armhf makefile.
The wrappers are supposed to be in ~/Freenet/bin
It doesn't include a wrapper for aarch64 or armhf 64-bit.
java-service-wrapper installs to a system directory (/usr/share/java) so it doesn't fix that.
The error messages are coming from ~/Freenet/run.sh
If it can't find the wrappers, it falls back to a command line with a hardcoded classpath that includes jna and jna-platform. This code obviously doesn't get tested often because, while both of those are bundled and in the same directory, the hardcoded version number is wrong, so it can't find them.
The error message 'Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Platform' is the direct result of that.
wrapper.conf uses the proper version numbers; they forgot to update the fallback.