How to compile the rust code? #1017
-
|
I cloned the latest cargo install --locked --path .However, the build fails with a compilation error in the I can reliably reproduce this issue in a clean Docker environment. FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y \
git \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
echo "Rust installed successfully"
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /workspace
RUN git clone https://github.com/zkonduit/ezkl.git && \
echo "ezkl repository cloned successfully"
WORKDIR /workspace/ezkl
RUN echo "Starting cargo build..." && \
cargo install --locked --path . && \
echo "ezkl installed successfully"
CMD ["/bin/bash"]Build with docker build -t ezkl:latest . --network hostPlease let me know if there is a recommended workaround (e.g., pinning a specific svm-rs version). Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
this is a known issue with svm-rs duplicate definitions. the build script generates duplicate entries. workarounds:
git checkout <known-working-commit>
cargo install ezkl
[patch.crates-io]
svm-rs-builds = { git = "https://github.com/roynalnaruto/svm-rs", branch = "main" }
docker pull zkonduit/ezkl:latestthe error happens because solc 0.8.31 appears twice in the generated builds.rs file. this is upstream issue in svm-rs, not ezkl itself. id suggest opening issue on ezkl repo to pin svm-rs version that works |
Beta Was this translation helpful? Give feedback.
this is a known issue with svm-rs duplicate definitions. the build script generates duplicate entries.
workarounds:
the error happens because solc 0.8.31 appears twice in the generated builds.rs file. this is upstream issue in svm-rs, not ezkl itself.
id suggest opening issue on ezkl repo to pin svm-rs version that works