From e845de9669e1ef23e1b43e2725d6370712681cd1 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Fri, 23 Feb 2024 21:28:19 +0800 Subject: [PATCH] chore: static features for async-compression deps (#14711) fix: update async-compression --- .github/actions/build_linux/action.yml | 8 ++++++-- .github/actions/build_linux_sanitizer/action.yml | 4 +++- Cargo.lock | 2 +- docker/build-tool/base/Dockerfile | 5 ++++- scripts/setup/dev_setup.sh | 1 - src/common/compress/Cargo.toml | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/actions/build_linux/action.yml b/.github/actions/build_linux/action.yml index 68c768ebf97b7..1878382a85d4b 100644 --- a/.github/actions/build_linux/action.yml +++ b/.github/actions/build_linux/action.yml @@ -108,8 +108,12 @@ runs: done ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact - - shell: bash - run: readelf -p .comment ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query + - name: Check Binary Info + shell: bash + continue-on-error: true + run: | + readelf -p .comment ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query + ldd ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query # - name: Compress Binaries with UPX # if: env.BUILD_PROFILE == 'debug' diff --git a/.github/actions/build_linux_sanitizer/action.yml b/.github/actions/build_linux_sanitizer/action.yml index 7799a3e6d1426..a13868d2d0566 100644 --- a/.github/actions/build_linux_sanitizer/action.yml +++ b/.github/actions/build_linux_sanitizer/action.yml @@ -57,8 +57,10 @@ runs: done ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-* - - name: Read elf + - name: Check Binary Info if: env.BUILD_PROFILE == 'debug' && endsWith(inputs.target, '-gnu') shell: bash + continue-on-error: true run: | readelf -p .comment ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query + ldd ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query diff --git a/Cargo.lock b/Cargo.lock index 89e836c5e1d56..3580bcbfd5965 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,7 +601,7 @@ dependencies = [ [[package]] name = "async-compression" version = "0.4.3" -source = "git+https://github.com/youngsofun/async-compression?rev=1568ceafd#1568ceafdcb590a0c28226ee9e4cebf39e26e46c" +source = "git+https://github.com/everpcpc/async-compression?rev=dc81082#dc8108229e3a0288ee9097c986b89a90788fe9f6" dependencies = [ "brotli", "bzip2", diff --git a/docker/build-tool/base/Dockerfile b/docker/build-tool/base/Dockerfile index 2b50b7b1ae240..6683cdbabfa7d 100644 --- a/docker/build-tool/base/Dockerfile +++ b/docker/build-tool/base/Dockerfile @@ -25,11 +25,14 @@ RUN chmod +x /build/scripts/setup/dev_setup.sh && \ RUN ln -s $(readlink -f `which javac` | sed "s:/bin/javac::") /opt/java -RUN curl -sSfLo /tmp/mold.tar.gz https://github.com/rui314/mold/releases/download/v2.0.0/mold-2.0.0-$(uname -m)-linux.tar.gz && \ +RUN curl -sSfLo /tmp/mold.tar.gz https://github.com/rui314/mold/releases/download/v2.4.0/mold-2.4.0-$(uname -m)-linux.tar.gz && \ tar --strip-components=1 -xzf /tmp/mold.tar.gz -C /usr/local && \ rm -rf /tmp/mold.tar.gz && \ ln -sf /usr/local/bin/mold /usr/bin/$(uname -m)-linux-gnu-ld +ENV LIBZ_SYS_STATIC=1 +ENV LZMA_API_STATIC=1 + ENV JAVA_HOME /opt/java ENV LD_LIBRARY_PATH /opt/java/lib/server ENV RUSTUP_HOME /opt/rust/rustup diff --git a/scripts/setup/dev_setup.sh b/scripts/setup/dev_setup.sh index 5a17cd8f584a4..c0bfc043c9eb3 100755 --- a/scripts/setup/dev_setup.sh +++ b/scripts/setup/dev_setup.sh @@ -630,7 +630,6 @@ fi if [[ "$INSTALL_CHECK_TOOLS" == "true" ]]; then if [[ -f scripts/setup/rust-tools.txt ]]; then - export RUSTFLAGS="-C target-feature=-crt-static" while read -r tool; do # Use cargo install to prevent downloading the tools with incompatible GLIBC cargo install "$tool" diff --git a/src/common/compress/Cargo.toml b/src/common/compress/Cargo.toml index 38d2d0d884637..998f2086582a3 100644 --- a/src/common/compress/Cargo.toml +++ b/src/common/compress/Cargo.toml @@ -8,7 +8,7 @@ edition = { workspace = true } [dependencies] # Temp workaround, should come back to tagged version after https://github.com/Nemo157/async-compression/issues/150 resolved. -async-compression = { git = "https://github.com/youngsofun/async-compression", rev = "1568ceafd", features = [ +async-compression = { git = "https://github.com/everpcpc/async-compression", rev = "dc81082", features = [ "futures-io", "all-algorithms", ] }