Closed mortenhauan closed 1 year ago
Removing wokwi-server from --extra-crates "ldproxy cargo-espflash wokwi-server web-flash" \
in Dockerfile fixes it for now.
You also need the --locked
flag, see https://github.com/MabezDev/wokwi-server#installation. This was fixed in this Dockerfile, but didn't get updated here.
Thank you @MabezDev. My current working Dockerfile is this:
ARG VARIANT=bullseye
FROM debian:${VARIANT}
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# Arguments
ARG CONTAINER_USER=esp
ARG CONTAINER_GROUP=esp
ARG TOOLCHAIN_VERSION=1.61.0.0
ARG ESP_IDF_VERSION=release/v4.4
ARG ESP_BOARD=esp32
ARG INSTALL_RUST_TOOLCHAIN=install-rust-toolchain.sh
# Install dependencies
RUN apt-get update \
&& apt-get install -y git curl gcc clang ninja-build libudev-dev unzip xz-utils\
python3 python3-pip python3-venv libusb-1.0-0 libssl-dev pkg-config libtinfo5 libpython2.7 \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
# Set users
RUN adduser --disabled-password --gecos "" ${CONTAINER_USER}
USER ${CONTAINER_USER}
WORKDIR /home/${CONTAINER_USER}
# Install Rust toolchain, extra crates and esp-idf
ENV PATH=${PATH}:/home/${CONTAINER_USER}/.cargo/bin:/home/${CONTAINER_USER}/opt/bin
ADD --chown=${CONTAINER_USER}:${CONTAINER_GROUP} \
https://github.com/esp-rs/rust-build/releases/download/v${TOOLCHAIN_VERSION}/${INSTALL_RUST_TOOLCHAIN} \
/home/${CONTAINER_USER}/${INSTALL_RUST_TOOLCHAIN}
RUN chmod a+x ${INSTALL_RUST_TOOLCHAIN} \
&& ./${INSTALL_RUST_TOOLCHAIN} \
--extra-crates "ldproxy cargo-espflash web-flash" \
--clear-cache "YES" --export-file /home/${CONTAINER_USER}/export-esp.sh \
--esp-idf-version "${ESP_IDF_VERSION}" \
--minified-esp-idf "YES" \
--build-target "${ESP_BOARD}" \
&& rustup component add clippy rustfmt
# Install wokwi-server
RUN RUSTFLAGS="--cfg tokio_unstable" cargo install wokwi-server --git https://github.com/MabezDev/wokwi-server --locked
# Activate ESP environment
RUN echo "source /home/${CONTAINER_USER}/export-esp.sh" >> ~/.bashrc
CMD [ "/bin/bash" ]
Which platform are you using? I assume you are using aarch64 (m1), is that correct? As you mentioned, at this moment, installing wokwi-server
via --extra-crates
argument of the installer fails as it does not set RUSTFLAGS
and does not use --locked
. This is already fixed, but since the Dockerfile pulls the installer from the releases, those changes are not present, I would recommend using your Dockerfile as a temporary solution, and waiting for 1.62.0.0
release which will probably come up next week and would solve the issue.
Also https://github.com/tokio-rs/tokio/issues/4535 is nearing stabilization, so we won't need the unstable cfg soon.
I'm using M1 yes, @SergioGasquez. It is no problem using my own Dockerfile as a temporary solution for now.
I'm using M1 yes, @SergioGasquez. It is no problem using my own Dockerfile as a temporary solution for now.
Great, we expect to have 1.62.0.0
finished by the end of this week, I'll keep you updated!
Update: Release 1.62.0.0 is out! Using your custom Dockerfile should no longer be required, I'll try to do some testing later on today to confirm that is working fine Update2: Just tested it using my M1 and seems to be working fine!
Could you give it a try and report back the results with the new installer @mortenhauan? Thanks!
Hello @mortenhauan, did you have a chance to confirm that is working for you? I would like to close the issue as it should be already fixed with the 1.62.0.0
release
In VSCode on starting DevContainer for first time, it stops with the following error:
I can see that it is related to this issue in wokwi-server. I tried adding
ENV RUSTFLAGS="--cfg tokio_unstable"
to the Dockerfile. That gets around theno JoinSet in task
error, but it still failes on the other errors.