This is an automated email from the ASF dual-hosted git repository.
XiaoHongbo-Hope pushed a commit to branch release-0.1
in repository https://gitbox.apache.org/repos/asf/paimon-mosaic.git
The following commit(s) were added to refs/heads/release-0.1 by this push:
new c399055 Fix Java Linux native glibc baseline (#43)
c399055 is described below
commit c399055b9233864509ccb53b058b7840bdca36c8
Author: QuakeWang <[email protected]>
AuthorDate: Mon May 25 10:51:31 2026 +0800
Fix Java Linux native glibc baseline (#43)
Signed-off-by: QuakeWang <[email protected]>
---
.github/workflows/publish_snapshot.yml | 50 ++++++++++++++++++++++++++++++++--
.github/workflows/release-java.yml | 50 ++++++++++++++++++++++++++++++++--
README.md | 6 ++++
3 files changed, 102 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/publish_snapshot.yml
b/.github/workflows/publish_snapshot.yml
index 0d27d8b..8b12d81 100644
--- a/.github/workflows/publish_snapshot.yml
+++ b/.github/workflows/publish_snapshot.yml
@@ -77,14 +77,60 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-cargo-
+ - name: Setup Python
+ if: matrix.os_name == 'linux'
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Setup Linux zigbuild
+ if: matrix.os_name == 'linux'
+ run: pip install cargo-zigbuild
+
+ - name: Build Linux JNI library
+ if: matrix.os_name == 'linux'
+ shell: bash
+ run: |
+ set -euo pipefail
+
+ rustup target add "${{ matrix.target }}"
+ unset ZSTD_SYS_USE_PKG_CONFIG
+
+ cargo zigbuild --release -p paimon-mosaic-jni --target "${{
matrix.target }}.2.17"
+
+ artifact="target/${{ matrix.target }}/release/${{ matrix.lib_name }}"
+ test -f "$artifact"
+
+ version_info="$(readelf --version-info "$artifact")"
+ max_glibc="$(
+ printf '%s\n' "$version_info" \
+ | grep -Eo 'GLIBC_[0-9][0-9.]*' \
+ | sort -Vu \
+ | tail -n1 \
+ || true
+ )"
+ echo "Maximum required GLIBC version: ${max_glibc:-none}"
+
+ if [[ -n "$max_glibc" ]]; then
+ allowed_glibc="GLIBC_2.17"
+ highest_glibc="$(printf '%s\n%s\n' "$allowed_glibc" "$max_glibc" |
sort -Vu | tail -n1)"
+ if [[ "$highest_glibc" != "$allowed_glibc" ]]; then
+ echo "Linux GNU artifact requires $max_glibc, expected <=
$allowed_glibc" >&2
+ exit 1
+ fi
+ fi
+
- name: Build JNI library
- run: cargo build --release -p paimon-mosaic-jni
+ if: matrix.os_name != 'linux'
+ run: |
+ rustup target add "${{ matrix.target }}"
+ cargo build --release -p paimon-mosaic-jni --target "${{
matrix.target }}"
- name: Upload native library
uses: actions/upload-artifact@v5
with:
name: native-${{ matrix.os_name }}-${{ matrix.arch }}
- path: target/release/${{ matrix.lib_name }}
+ path: target/${{ matrix.target }}/release/${{ matrix.lib_name }}
publish-snapshot:
if: github.repository == 'apache/paimon-mosaic'
diff --git a/.github/workflows/release-java.yml
b/.github/workflows/release-java.yml
index 961ba7d..fc8696c 100644
--- a/.github/workflows/release-java.yml
+++ b/.github/workflows/release-java.yml
@@ -64,14 +64,60 @@ jobs:
rustup update stable
rustup default stable
+ - name: Setup Python
+ if: matrix.os_name == 'linux'
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Setup Linux zigbuild
+ if: matrix.os_name == 'linux'
+ run: pip install cargo-zigbuild
+
+ - name: Build Linux JNI library
+ if: matrix.os_name == 'linux'
+ shell: bash
+ run: |
+ set -euo pipefail
+
+ rustup target add "${{ matrix.target }}"
+ unset ZSTD_SYS_USE_PKG_CONFIG
+
+ cargo zigbuild --release -p paimon-mosaic-jni --target "${{
matrix.target }}.2.17"
+
+ artifact="target/${{ matrix.target }}/release/${{ matrix.lib_name }}"
+ test -f "$artifact"
+
+ version_info="$(readelf --version-info "$artifact")"
+ max_glibc="$(
+ printf '%s\n' "$version_info" \
+ | grep -Eo 'GLIBC_[0-9][0-9.]*' \
+ | sort -Vu \
+ | tail -n1 \
+ || true
+ )"
+ echo "Maximum required GLIBC version: ${max_glibc:-none}"
+
+ if [[ -n "$max_glibc" ]]; then
+ allowed_glibc="GLIBC_2.17"
+ highest_glibc="$(printf '%s\n%s\n' "$allowed_glibc" "$max_glibc" |
sort -Vu | tail -n1)"
+ if [[ "$highest_glibc" != "$allowed_glibc" ]]; then
+ echo "Linux GNU artifact requires $max_glibc, expected <=
$allowed_glibc" >&2
+ exit 1
+ fi
+ fi
+
- name: Build JNI library
- run: cargo build --release -p paimon-mosaic-jni
+ if: matrix.os_name != 'linux'
+ run: |
+ rustup target add "${{ matrix.target }}"
+ cargo build --release -p paimon-mosaic-jni --target "${{
matrix.target }}"
- name: Upload native library
uses: actions/upload-artifact@v5
with:
name: native-${{ matrix.os_name }}-${{ matrix.arch }}
- path: target/release/${{ matrix.lib_name }}
+ path: target/${{ matrix.target }}/release/${{ matrix.lib_name }}
deploy-staging:
if: github.repository == 'apache/paimon-mosaic' && startsWith(github.ref,
'refs/tags/')
diff --git a/README.md b/README.md
index d2b62a8..e1bcac7 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,12 @@
A columnar-bucket hybrid format optimized for wide tables of Apache Paimon.
+## Java Linux compatibility
+
+Published Java artifacts include JNI libraries for Linux. The Linux GNU
+libraries are built with a `glibc` 2.17 baseline, so they can run on Linux
+distributions with `glibc` 2.17 or newer.
+
## Contributing
Apache Paimon Mosaic is an exciting project currently under active
development. Whether you're looking to use it in your projects or contribute to
its growth, there are several ways you can get involved: