nixxcode / jvm-brotli

Lightweight, cross-platform Java library for the Brotli compression format
72 stars 10 forks source link

The library is not working on CentOS 7 #36

Open eperret opened 4 years ago

eperret commented 4 years ago

I am running on JDK 11 on CentOS 7 from a docker container and maven.

java.lang.UnsatisfiedLinkError: 'java.nio.ByteBuffer com.nixxcode.jvmbrotli.enc.EncoderJNI.nativeCreate(long[])'
    at com.nixxcode.jvmbrotli.enc.EncoderJNI.nativeCreate(Native Method)
    at com.nixxcode.jvmbrotli.enc.EncoderJNI.access$000(EncoderJNI.java:15)
    at com.nixxcode.jvmbrotli.enc.EncoderJNI$Wrapper.<init>(EncoderJNI.java:40)
    at com.nixxcode.jvmbrotli.enc.Encoder.<init>(Encoder.java:78)
    at com.nixxcode.jvmbrotli.enc.BrotliOutputStream.<init>(BrotliOutputStream.java:31)
    at com.nixxcode.jvmbrotli.enc.BrotliOutputStream.<init>(BrotliOutputStream.java:36)

OS Info

cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
mvn -v
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T15:06:16Z)
Maven home: /usr/local/apache-maven-3.6.2
Java version: 11.0.6, vendor: Azul Systems, Inc., runtime: /opt/tools/Linux/jdk/openjdk_11.0.6_11.37.18_x64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.19.76-linuxkit", arch: "amd64", family: "unix"
atk91 commented 4 years ago

Ran into this issue recently, this was because libstdcpp in CentOS 7 is old and binary uncompatible with whatever brotli shared library is linked against

eperret commented 4 years ago

How did you go about addressing/upgrading libstdcpp (or is it libstdc++)?

atk91 commented 4 years ago

I just switched to CentOS 8, so that's not really a fix for this issue