bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.41k stars 1.57k forks source link

/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found #2136

Closed siyilingting closed 7 months ago

siyilingting commented 7 months ago

In order to avoid the impact of the libwebp vulnerability, I had to upgrade javacv-platform from version 1.5.7 (containing opencv-platform 4.7.0-1.5.9) to version 1.5.10-SNAPSHOT (containing opencv-platform 4.8.1-1.5 .10-SNAPSHOT). However, when I ran the program, the following error occurred:

java.lang.UnsatisfiedLinkError: no jniopenblas_nolapack in java.library.path   
...
Caused by: java.lang.UnsatisfiedLinkError: /home/walle/.javacpp/cache/openblas-0.3.24-1.5.10-SNAPSHOT-linux-x86_64.jar/org/bytedeco/openblas/linux-x86_64/libjniopenblas_nolapack.so: /lib/x86_64-linux-gnu/libm.so.6: version ‘GLIBC_2.29' not found (required by /home/walle/.javacpp/cache/openblas-0.3.24-1.5.10-SNAPSHOT-linux-x86_64.jar/org/bytedeco/openblas/linux-x86_64/libopenblas_nolapack.so.0)
...
java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.opencv.opencv_core.Mat

One solution is to update the GLIBC, but it is high risk. So do you have any good suggestions on this issue?

saudet commented 7 months ago

You can build from source: https://github.com/bytedeco/javacpp-presets#build-instructions

saudet commented 7 months ago

Duplicate of https://github.com/bytedeco/javacpp-presets/issues/1379

siyilingting commented 7 months ago

You can build from source: https://github.com/bytedeco/javacpp-presets#build-instructions

Thanks. I don't know much about maven compilation but I'm trying. By the way, the Build Environments recommends Centos7(for the Linux-x86_64 platform) and provides a docker image because

it relies on an old enough version of glibc, which nevertheless works for all the libraries found in the JavaCPP Presets, and since newer versions of glibc are backward compatible, all recent distributions of Linux should support the binaries generated.

So will the release versions of javacv-platform:1.5.10 and opencv-platform:4.8.1-1.5.10 be compiled based on Centos7 and old version of gblic?

saudet commented 7 months ago

So will the release versions of javacv-platform:1.5.10 and opencv-platform:4.8.1-1.5.10 be compiled based on Centos7 and old version of gblic?

No, CentOS 7 will reach EOL next June