Lcry / Lcry/java-png-compress-util

Mac调用报错 ,应该是64位的系统

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Mac调用报错 ,应该是64位的系统

Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/5y/05k67rrj6yz3cjnqp_0lhf6r0000gn/T/libimagequant_temp/libimagequant.jnilib: dlopen(/private/var/folders/5y/05k67rrj6yz3cjnqp_0lhf6r0000gn/T/libimagequant_temp/libimagequant.jnilib, 1): no suitable image found. Did find:
/private/var/folders/5y/05k67rrj6yz3cjnqp_0lhf6r0000gn/T/libimagequant_temp/libimagequant.jnilib: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/private/var/folders/5y/05k67rrj6yz3cjnqp_0lhf6r0000gn/T/libimagequant_temp/libimagequant.jnilib: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.pngquant.LiqObject.loadLib(LiqObject.java:62)
at org.pngquant.LiqObject.loadLibrary(LiqObject.java:41)
at org.pngquant.LiqObject.(LiqObject.java:16)
at org.pngquant.PngCompressUtils.compressPng(PngCompressUtils.java:19)
at com.ibiliang.sqlite.Main.compressNewPNG(Main.java:96)
at com.ibiliang.sqlite.Main.main(Main.java:68)

Windows调用也报错 ,JNI调用 错误 是不是
LiqObject 类型 必须要在 package org.pngquant; 我复制到自己项目中的时候把 包的路径改了

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.pngquant.LiqObject.loadLib in LiqObject.java, then trace the calls from PngCompressUtils.java and Main.java shown in the stack trace. Reproduce the failure on macOS and Windows and inspect the extracted libimagequant.jnilib format and package assumptions. Done means the JNI library loads correctly on the reported platforms, including when LiqObject is copied into another package.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.