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

Java Service Wrapper x86 libraries get installed on MacOS X arm64 #1535

Open
kgoderis opened this issue May 17, 2023 · 1 comment
Open

Java Service Wrapper x86 libraries get installed on MacOS X arm64 #1535

kgoderis opened this issue May 17, 2023 · 1 comment
Labels

Comments

@kgoderis
Copy link
Contributor

When doing an out of the box installation on an Apple arm64 based system, it seems that openhab> install-service goes wrong. In addition to #238 and #401 it seems that the libwrapper.jnilib in %KARAF_HOME%/lib/wrapper/ is in fact a x86 library.

kgoderis@Mac-Mini wrapper % sudo /opt/openhab/runtime/bin/openHAB-service console
Running openHAB runtime...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 |
jvm 1 | WARNING - Unable to load the Wrapper's native library 'libwrapper.dylib'.
jvm 1 | The file is located on the path at the following location but
jvm 1 | could not be loaded:
jvm 1 | /opt/openhab/runtime/lib/wrapper/libwrapper.dylib
jvm 1 | Please verify that the file is readable by the current user
jvm 1 | and that the file has not been corrupted in any way.
jvm 1 | One common cause of this problem is running a 32-bit version
jvm 1 | of the Wrapper with a 64-bit version of Java, or vica versa.
jvm 1 | This is a 64-bit JVM.
jvm 1 | Reported cause:
jvm 1 | /opt/openhab/runtime/lib/wrapper/libwrapper.dylib: dlopen(/opt/openhab/runtime/lib/wrapper/libwrapper.dylib, 0x0001): tried: '/opt/openhab/runtime/lib/wrapper/libwrapper.dylib' (fat file, but missing compatible architecture (have 'unknown,i386,x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/openhab/runtime/lib/wrapper/libwrapper.dylib' (no such file), '/opt/openhab/runtime/lib/wrapper/libwrapper.dylib' (fat file, but missing compatible architecture (have 'unknown,i386,x86_64', need 'arm64'))
jvm 1 | System signals will not be handled correctly.

This can be solved by installing https://download.tanukisoftware.com/wrapper/3.5.53/wrapper-macosx-arm-64-3.5.53.pkg and then doing

sudo cp /usr/local/Cellar/wrapper/3.5.53/lib/libwrapper.dylib /opt/openhab/runtime/lib/wrapper

which yields

kgoderis@Mac-Mini wrapper % sudo /opt/openhab/runtime/bin/openHAB-service console
Running openHAB runtime...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | WARNING - The Wrapper jar file currently in use is version "3.2.3"
jvm 1 | while the version of the native library is "3.5.53".
jvm 1 | The Wrapper may appear to work correctly but some features may
jvm 1 | not function correctly. This configuration has not been tested
jvm 1 | and is not supported.
jvm 1 |

It therefore seems that the openHAB distro needs an upgrade of Java Wrapper, as 3.2.3 is very ancient and does not support the newer arm64 architecture

@wborn
Copy link
Member

wborn commented Jul 15, 2023

The wrapper is a Karaf dependency and it seems like it cannot be updated due to licensing issues.

See: KARAF-2734, KARAF-5853

Version 3.2.3 is also the most recent version on Maven Central:

https://central.sonatype.com/artifact/tanukisoft/wrapper/3.2.3/versions

@wborn wborn added the karaf label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants