Possible Regression: Error: the current crate is indistinguishable from one of its dependencies #111349
Open
Description
I'm attempting to compile a crate which depends on inline_python
.
The crate is compiled in the context of this docker file:
# syntax=docker/dockerfile:1
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install dependencies
RUN apt-get update && \
apt-get install -y curl unzip sudo build-essential libssl-dev pkg-config git && \
rm -rf /var/lib/apt/lists/*
# Install Rust & Cargo
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly && \
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc && \
. ~/.bashrc && \
rustup update
# Update PATH to include Cargo
ENV PATH="/root/.cargo/bin:$PATH"
WORKDIR /app
COPY ./app /app
RUN cd /app && cargo clean
RUN rm -rf ~/.cargo/registry/
# Fetch and build in separate steps, so that the fetch step can be cached
RUN cd /app && cargo fetch
RUN cd /app && cargo build
...
This fails on the cargo build
step with the following error:
#28 280.5 Compiling inline-python v0.10.0
#28 280.6 <jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
#28 280.6 <jemalloc>: (This is the expected behaviour if you are running under QEMU)
#28 280.9 error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `inline_python_macros` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
#28 280.9 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-0.10.0/src/lib.rs:138:9
#28 280.9 |
#28 280.9 138 | pub use inline_python_macros::python;
#28 280.9 | ^^^^^^^^^^^^^^^^^^^^
#28 280.9
#28 281.5 For more information about this error, try `rustc --explain E0519`.
#28 281.5 error: could not compile `inline-python` (lib) due to previous error
#28 281.5 warning: build failed, waiting for other jobs to finish...
#28 ERROR: executor failed running [/bin/sh -c cd /app/sd_worker && cargo build]: exit code: 101
------
> [20/21] RUN cd /app && cargo build:
------
executor failed running [/bin/sh -c cd /app && cargo build]: exit code: 101
This docker-file previously built successfully, a few days ago, and all that changed was the base image.
The relevant dependency looks like this:
[dependencies]
inline-python = "0.10"
I believe it might be a regression in nightly, since nothing should have changed which would make this suddenly start failing.
Activity