deepjavalibrary / djl

An Engine-Agnostic Deep Learning Framework in Java
https://djl.ai
Apache License 2.0
4.14k stars 658 forks source link

libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /root/.djl.ai/sentencepiece/0.1.97-0.20.0/libsentencepiece_native.so) #2400

Closed wavymazy closed 1 year ago

wavymazy commented 1 year ago

Greetings,

I'm having an issue that I'm not very sure I understand. I'm using the ai.djl.sentencepiece package in a class I wrote in Java and I get this error below:

/root/.djl.ai/sentencepiece/0.1.97-0.20.0/libsentencepiece_native.so: /root/.../webapps/prediction/WEB-INF/lib/ml/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /root/.djl.ai/sentencepiece/0.1.97-0.20.0/libsentencepiece_native.so)"

I have added the package dependency to the pom.xml of my project such as:

<dependency>
    <groupId>ai.djl.sentencepiece</groupId>
    <artifactId>sentencepiece</artifactId>
    <version>0.20.0</version>
</dependency>

Is there something I'm missing ? Any help os greatly appreciated. Thank you.

frankfliu commented 1 year ago

@wavymazy

Are you running centos 7?

It seems you are using an old version of libstdc++.so.6 version. You need upgrade to a newer version:

sudo yum -y install libstdc++
wavymazy commented 1 year ago

@frankfliu Yes I am. Thank you very much, I'll try that.

wavymazy commented 1 year ago

After further digging it seems to not be trivial. CXXABI_1.3.9 is associated with gcc version 5.1. CentOS 7 has gcc 4.8.5.

frankfliu commented 1 year ago

@wavymazy We have centos 7 nightly test: https://github.com/deepjavalibrary/djl-demo/blob/master/.github/workflows/canary-centos.yml#L92

frankfliu commented 1 year ago

@wavymazy

Sorry, I can reproduce your issue. I checked our code, we don't support centos:7. We only support amazonlinux:2 and ubuntu:18.04+

I'm trying to figure out why our canary test passed.

wavymazy commented 1 year ago

Thank you @frankfliu for the explanation. This makes sense.

frankfliu commented 1 year ago

I created a PR to add centos 7 support: https://github.com/deepjavalibrary/djl/pull/2402

Will be available soon in 0.21.0 release.

wavymazy commented 1 year ago

Thank you @frankfliu ! Do you have an estimate of when the version 0.21.0 will be available ?

frankfliu commented 1 year ago

0.21.0 is published on maven central. You can try it now.