Exception in thread "main" org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=AIX and os.arch=ppc64

オープン
#603 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
backend

調査の方向性

Start by reading SnappyLoader.findNativeLibrary and loadNativeLibrary, especially the platform-specific library name and extension handling mentioned in the report. Check how the AIX/ppc64 native library is packaged and compare that path with the loader’s lookup; run the relevant tests for native library loading. Done means the default lookup can load the packaged AIX library without requiring custom system properties.

索引モデルが issue の本文から書いたものです。

説明

I've observed that while running the snappy in the IBM AIX 7.2 it gives the error,

Exception in thread "main" org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=AIX and os.arch=ppc64
        at org.xerial.snappy.SnappyLoader.findNativeLibrary(SnappyLoader.java:345)
        at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:179)
        at org.xerial.snappy.SnappyLoader.loadSnappyApi(SnappyLoader.java:157)
        at org.xerial.snappy.Snappy.init(Snappy.java:70)
        at org.xerial.snappy.Snappy.<clinit>(Snappy.java:47)

I've tried to find the RCA, to do so I've first manually put the aix related native libraries and passed them as variables

jdk/bin/./java -Dorg.xerial.snappy.lib.path=/tmp -Dorg.xerial.snappy.lib.name=libsnappyjava.a -cp Demo.jar:lib/* com.demo.Bootstrap

And it worked! So I tried to find that by default (if we're not passing any variable) why it's not able to find that file?

So I've added a print statement and tried to debug, there I've noticed that it tries to find the file at the correct destination, But what I've noticed is that the file extension is different.

has resource /org/xerial/snappy/native/AIX/ppc64/libsnappyjava.so

And the native file that is present in the jar have a different file extension,

total 264
-rw-r--r-- 1 root root 266695 Aug  7 05:49 libsnappyjava.a
root@demo:/demo/snappy/org/xerial/snappy/native/AIX/ppc64#

And in the code, the file's extension is entirely dependent on the System class, And the System class it self returns the .so extension instead of .a and this extension issue is also a very popular issue.

So what's the correct extension?? Is there no alternate way than passing the variable??

主要言語
Java
スター
1.1k
フォーク
261
平均マージ
2分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xerial/snappy-java のほかの issue

xerial/snappy-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。