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

Can't load libsignal_jni in windows env #484

Closed
ClementBareth opened this issue Aug 22, 2022 · 1 comment
Closed

Can't load libsignal_jni in windows env #484

ClementBareth opened this issue Aug 22, 2022 · 1 comment
Labels
acknowledged awaiting release Will be in the next release of libsignal

Comments

@ClementBareth
Copy link

ClementBareth commented Aug 22, 2022

java.lang.UnsatisfiedLinkError: ...\AppData\Local\Temp\resource16312657568160574112.so: Can't load this .dll (machine code=0x6666) on a AMD 64-bit platform

Looking at the code, it looks like the extension for windows (.dll) is not correct

private static void loadLibrary() {
    try {
      String  osName    = System.getProperty("os.name").toLowerCase(java.util.Locale.ROOT);
      boolean isMacOs   = osName.startsWith("mac os");
      String  extension = isMacOs ? ".dylib" : ".so";

      try (InputStream in = Native.class.getResourceAsStream("/libsignal_jni" + extension)) {
        if (in != null) {
          copyToTempFileAndLoad(in, extension);
        } else {
          System.loadLibrary("signal_jni");
        }
      }
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
ClementBareth added a commit to ClementBareth/libsignal that referenced this issue Aug 22, 2022
@jrose-signal jrose-signal added acknowledged awaiting release Will be in the next release of libsignal labels Dec 2, 2022
@jrose-signal
Copy link
Contributor

Fixed in v0.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged awaiting release Will be in the next release of libsignal
Development

No branches or pull requests

2 participants