Skip to content

ci(java/binding): Use zigbuild for glibc 2.17 support#3664

Merged
Xuanwo merged 8 commits intomainfrom
use-zigbuild-for-java
Nov 27, 2023
Merged

ci(java/binding): Use zigbuild for glibc 2.17 support#3664
Xuanwo merged 8 commits intomainfrom
use-zigbuild-for-java

Conversation

@Xuanwo
Copy link
Copy Markdown
Member

@Xuanwo Xuanwo commented Nov 24, 2023

Fix #3663

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo requested a review from messense November 24, 2023 05:07
@github-actions github-actions Bot added the releases-note/ci The PR modifies CI-related content or has a title that begins with "ci" label Nov 24, 2023
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 24, 2023

Great!

:) readelf -s libopendal_java.so | grep GLIBC | grep -v GLIBCXX
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.14 (2)
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND bcmp@GLIBC_2.2.5 (3)
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND close@GLIBC_2.2.5 (4)
     ...

@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 24, 2023

cc @tisonkun & @messense for review.

@messense
Copy link
Copy Markdown
Member

It'd be nice to confirm that it loads fine on an arm64 host or docker container.

@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 24, 2023

It'd be nice to confirm that it loads fine on an arm64 host or docker container.

Maybe @amunra can help verify this?

The artifacts could be found at https://github.com/apache/incubator-opendal/actions/runs/6977208547

@amunra
Copy link
Copy Markdown
Contributor

amunra commented Nov 24, 2023

I'm on vacation, I can take a look once I'm back tail end of next week.

This is awesome, btw!

@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 24, 2023

I'm on vacation, I can take a look once I'm back tail end of next week.

Hope you have a great holiday!

@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 24, 2023

cc @messense, is it a good idea to merge this PR first? To avoid blocking #3668

@messense
Copy link
Copy Markdown
Member

I got this error in docker:

root@77ed7264a303:/io# CLASSPATH="$PWD/opendal-java-0.42.0-linux-aarch_64.jar:$PWD/opendal-java-0.42.0.jar" jshell --no-startup
|  Welcome to JShell -- Version 17.0.8.1
|  For an introduction type: /help intro

jshell> import java.util.HashMap;
   ...> import java.util.Map;
   ...> import org.apache.opendal.Operator;

jshell> final Map<String, String> conf = new HashMap<>();
conf ==> {}

jshell> conf.put("root", "/tmp");
$5 ==> null

jshell> Operator op = Operator.of("fs", conf)
|  Exception java.lang.UnsatisfiedLinkError: /tmp/libopendal_java16619693951452906505.so: /tmp/libopendal_java16619693951452906505.so: undefined symbol: _ZNSt3__119__shared_weak_countD2Ev
|        at NativeLibraries.load (Native Method)
|        at NativeLibraries$NativeLibraryImpl.open (NativeLibraries.java:388)
|        at NativeLibraries.loadLibrary (NativeLibraries.java:232)
|        at NativeLibraries.loadLibrary (NativeLibraries.java:174)
|        at ClassLoader.loadLibrary (ClassLoader.java:2394)
|        at Runtime.load0 (Runtime.java:755)
|        at System.load (System.java:1953)
|        at NativeLibrary.doLoadBundledLibrary (NativeLibrary.java:94)
|        at NativeLibrary.doLoadLibrary (NativeLibrary.java:81)
|        at NativeLibrary.loadLibrary (NativeLibrary.java:55)
|        at NativeLibrary.<clinit> (NativeLibrary.java:45)
|        at NativeObject.<clinit> (NativeObject.java:54)
|        at (#6:1)

jshell>

@Xuanwo

This comment was marked as resolved.

Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 27, 2023

I got this error in docker:

Which container are you using? Would you like to try again? I fixed a rocksdb related issue in recent commits.

Comment thread bindings/java/Cargo.toml
Comment thread bindings/java/tools/build.py
@messense
Copy link
Copy Markdown
Member

Which container are you using? Would you like to try again? I fixed a rocksdb related issue in recent commits.

Ubuntu 22.04 aarch64, works fine now.

@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 27, 2023

Ubuntu 22.04 aarch64, works fine now.

Great!

@Xuanwo
Copy link
Copy Markdown
Member Author

Xuanwo commented Nov 27, 2023

cc @tisonkun, would you like to take another look?

Copy link
Copy Markdown
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

@Xuanwo Xuanwo merged commit 682d38c into main Nov 27, 2023
@Xuanwo Xuanwo deleted the use-zigbuild-for-java branch November 27, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/ci The PR modifies CI-related content or has a title that begins with "ci"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java Binding Release doesn't work on glibc 2.26

4 participants