diff --git a/contrib/corrosion-cmake/CMakeLists.txt b/contrib/corrosion-cmake/CMakeLists.txt index 64f9de86b07..b81c23621d7 100644 --- a/contrib/corrosion-cmake/CMakeLists.txt +++ b/contrib/corrosion-cmake/CMakeLists.txt @@ -23,6 +23,9 @@ endif() if((CMAKE_TOOLCHAIN_FILE MATCHES "darwin") AND (CMAKE_TOOLCHAIN_FILE MATCHES "toolchain-aarch64")) set(Rust_CARGO_TARGET "aarch64-apple-darwin") + message(STATUS "Rust is not available on aarch64-apple-darwin") + option(ENABLE_RUST "Enable rust" FALSE) + return() endif() if((CMAKE_TOOLCHAIN_FILE MATCHES "darwin") AND (CMAKE_TOOLCHAIN_FILE MATCHES "x86_64")) diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile index 5283f2f0835..c72fe3baafc 100644 --- a/docker/packager/binary/Dockerfile +++ b/docker/packager/binary/Dockerfile @@ -4,9 +4,12 @@ ARG FROM_TAG=latest FROM clickhouse/test-util:$FROM_TAG # Rust toolchain and libraries +ENV RUSTUP_HOME=/rust/rustup +ENV CARGO_HOME=/rust/cargo RUN curl https://sh.rustup.rs -sSf | bash -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}" -RUN chmod 777 -R /root/.cargo/bin +RUN chmod 777 -R /rust +ENV PATH="/rust/cargo/env:${PATH}" +ENV PATH="/rust/cargo/bin:${PATH}" RUN rustup target add aarch64-unknown-linux-gnu && \ rustup target add x86_64-apple-darwin && \ rustup target add x86_64-unknown-freebsd && \