cundong / cundong/SmartAppUpdates
so文件32 64位版本冲突?
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 820
- Avg merge
- 41m
- Merged PRs (30d)
- 1
Description
我用了项目中自带的libApkPatchLibrary.so 文件, 放到服务器中执行的时候碰到的错误如下
查了下资料说是 jdk 版本冲突, 谁有没有64位的版本so文件?
[root@bogon apkPatch]# java -Djava.library.path=/public/service/apkPatch/so -jar apkDiff2.jar
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /public/service/apkPatch/so/libApkPatchLibrary.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /public/service/apkPatch/so/libApkPatchLibrary.so: /public/service/apkPatch/so/libApkPatchLibrary.so: 错误 ELF 类: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at com.cundong.apkdiff.ApkDiffDemo.<clinit>(ApkDiffDemo.java:32)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the shown java -Djava.library.path command and inspect libApkPatchLibrary.so alongside apkDiff2.jar. Start at com.cundong.apkdiff.ApkDiffDemo. (line 32) and verify the native library architecture; done means the project runs on the reported 64-bit environment without the ELFCLASS32 loading error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100