Skip to content

bug: bindings/java: Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libopendal_java16119350451049595665.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found #6080

Closed
@dyrnq

Description

@dyrnq

Describe the bug

Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libopendal_java16119350451049595665.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /tmp/libopendal_java16119350451049595665.so)
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2399)
	at java.base/java.lang.Runtime.load0(Runtime.java:852)
	at java.base/java.lang.System.load(System.java:2030)
	at org.apache.opendal.NativeLibrary.doLoadBundledLibrary(NativeLibrary.java:115)
	at org.apache.opendal.NativeLibrary.doLoadLibrary(NativeLibrary.java:102)
	at org.apache.opendal.NativeLibrary.loadLibrary(NativeLibrary.java:76)
	at org.apache.opendal.NativeLibrary.<clinit>(NativeLibrary.java:45)
	at org.apache.opendal.NativeObject.<clinit>(NativeObject.java:56)

Steps to Reproduce

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <opendal.version>0.47.11</opendal.version>
    </properties>
        <dependency>
            <groupId>org.apache.opendal</groupId>
            <artifactId>opendal</artifactId>
            <version>${opendal.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.opendal</groupId>
            <artifactId>opendal</artifactId>
            <version>${opendal.version}</version>
            <classifier>${os.detected.classifier}</classifier>
        </dependency>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.7.0</version>
            </extension>
        </extensions>
    </build>
import org.apache.opendal.AsyncOperator;

import java.util.HashMap;
import java.util.Map;

public class OpendalTest {
    public static void main(String[] args) {
            final Map<String, String> conf = new HashMap<>();
            conf.put("root", "/tmp");

            try (AsyncOperator op = AsyncOperator.of("fs", conf)) {
                op.write("/path/to/data", "Hello world").join();
                System.out.println(new String(op.read("/path/to/data").join()));
            }
    }
}
cat /etc/os-release 

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
uname -a


Linux debian 6.1.0-33-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.133-1 (2025-04-10) x86_64 GNU/Linux
ldd --version
ldd (Debian GLIBC 2.36-9+deb12u10) 2.36
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Expected Behavior

no Exception.

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions