Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Nov 27, 2023

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Nov 24, 2023

Fix #3663

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>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
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
Member Author

Xuanwo commented Nov 24, 2023

cc @tisonkun & @messense for review.

@messense
Copy link
Member

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

@Xuanwo
Copy link
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
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
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
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
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
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.

@messense
Copy link
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
Member Author

Xuanwo commented Nov 27, 2023

Ubuntu 22.04 aarch64, works fine now.

Great!

@Xuanwo
Copy link
Member Author

Xuanwo commented Nov 27, 2023

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

Copy link
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
74 checks passed
@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
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