Omega359 commented on issue #9505:
URL: 
https://github.com/apache/arrow-datafusion/issues/9505#issuecomment-1987364820

   Are datafusion-cli binaries distributed or is it always built from source? 
My understanding was it was built from source only.
   
   I'd recommend just installing rust by following the directions in the error 
message.  Otherwise if you have docker installed on the aarch64 machine you can 
build the cli that way. Otherwise you can build the cli on another machine with 
docker using something like this.
   
   Dockerfile:
   ```
   FROM --platform=$TARGETPLATFORM rust:1.72-bullseye as builder
   
   COPY . /usr/src/arrow-datafusion
   COPY ./datafusion /usr/src/arrow-datafusion/datafusion
   
   COPY ./datafusion-cli /usr/src/arrow-datafusion/datafusion-cli
   
   WORKDIR /usr/src/arrow-datafusion/datafusion-cli
   
   RUN rustup component add rustfmt
   
   RUN cargo build --release
   
   FROM --platform=$TARGETPLATFORM debian:bullseye-slim
   
   COPY --from=builder 
/usr/src/arrow-datafusion/datafusion-cli/target/release/datafusion-cli 
/usr/local/bin
   
   ENTRYPOINT ["datafusion-cli"]
   
   CMD ["--data-path", "/data"]
   ```
   ```
   docker buildx create --use
   docker buildx build ./ -f ./datafusion-cli/Dockerfile --platform=linux/arm64
   ```
   The above changes to the Dockerfile and the commands I ran seemed to build 
both binaries. This may not be ideal though - the build process is horribly 
slow (~5000s locally) and the image I think may run under emulation which for 
the CLI may just be fine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to