semuxproject / semux-core

Semux Core
https://www.semux.org
MIT License
76 stars 32 forks source link

semux-gui not loading on MacOS Big Sur #313

Closed jonathanmusto closed 3 years ago

jonathanmusto commented 3 years ago

🐛 Bug

❯ bash semux-cli.sh

Please enter your password:
16:02:45.937 INFO     Kernel           Semux/v2.2.1-3655ac6/macOS/x86_64
16:02:45.941 INFO     Kernel           System booting up: network = mainnet, networkVersion = 0, coinbase = d60bfa7044516206ce3c5c8799f2391925daa43b
16:02:46.132 INFO     Kernel           Computer: manufacturer = Apple Inc., model = MacBook Pro (MacBookPro16,1)
16:02:46.138 WARN     MacOSVersionInfoEx Unable to parse version 11.2 to a codename.
16:02:46.221 INFO     Kernel           OS: name = Apple Mac OS X 11.2 build 20D91
16:02:46.227 INFO     Kernel           CPU: processor = Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz, cores = 8 / 16
16:02:46.229 INFO     Kernel           Memory: total = 32768 MB, available = 16602 MB, swap total = 12288 MB, swap available = 1724 MB
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'DiskArbitration':
dlopen(libDiskArbitration.dylib, 9): image not found
dlopen(libDiskArbitration.dylib, 9): image not found
Native library (darwin/libDiskArbitration.dylib) not found in resource path (./lib/semux.jar)
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:302)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:455)
    at com.sun.jna.Library$Handler.<init>(Library.java:192)
    at com.sun.jna.Native.load(Native.java:596)
    at com.sun.jna.Native.load(Native.java:570)
    at oshi.jna.platform.mac.DiskArbitration.<clinit>(DiskArbitration.java:41)
    at oshi.hardware.platform.mac.MacDisks.getDisks(MacDisks.java:301)
    at oshi.hardware.platform.mac.MacHardwareAbstractionLayer.getDiskStores(MacHardwareAbstractionLayer.java:88)
    at org.semux.Kernel.printSystemInfo(Kernel.java:253)
    at org.semux.Kernel.start(Kernel.java:141)
    at org.semux.cli.SemuxCli.startKernel(SemuxCli.java:243)
    at org.semux.cli.SemuxCli.start(SemuxCli.java:231)
    at org.semux.cli.SemuxCli.start(SemuxCli.java:159)
    at org.semux.cli.SemuxCli.main(SemuxCli.java:63)
    at org.semux.cli.SemuxCli.main(SemuxCli.java:73)
    at org.semux.Main.main(Main.java:36)
    Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libDiskArbitration.dylib, 9): image not found
        at com.sun.jna.Native.open(Native Method)
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
        ... 15 more
    Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libDiskArbitration.dylib, 9): image not found
        at com.sun.jna.Native.open(Native Method)
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
        ... 15 more
    Suppressed: java.io.IOException: Native library (darwin/libDiskArbitration.dylib) not found in resource path (./lib/semux.jar)
        at com.sun.jna.Native.extractFromResourcePath(Native.java:1095)
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:276)
        ... 15 more

To reproduce

On MacOS Big Sure run: bash semux-cli.sh Enter password for wallet when prompted

Expected Behavior

(Describe the expected behavior here)

System information

semuxgo commented 3 years ago

Thank you @jonathanmusto for reporting this issue and providing the logs.

It seems the native library oshi is not compatabile with the latest macOS. I will provide a fix shortly.

semuxgo commented 3 years ago

Related https://github.com/oshi/oshi/issues/1289