Deu*_*ina 7 rust docker rust-cargo alpine-linux
这里完全是锈菜鸟。尝试为 linux x64 构建一个 sccache 二进制文件Redis: true。我从一个高山图像开始:
FROM rust:alpine3.10
WORKDIR /root
RUN apk --no-cache add --update curl
RUN curl -L https://github.com/mozilla/sccache/archive/0.2.11.tar.gz \
-o sccache.tar.gz
RUN tar xf sccache.tar.gz
RUN cd sccache-0.2.11 &&\
cargo build --features=all --release
Run Code Online (Sandbox Code Playgroud)
我得到:
error: cannot produce proc-macro for `derive-error v0.0.3` as the target `x86_64-unknown-linux-musl` does not support these crate types
Run Code Online (Sandbox Code Playgroud)
如果FROM rust基于buster. 我可以只用这个(我会),但是这里发生了什么?我太不自在了,我什至不知道该问什么问题。
该proc_macro板条箱依赖于一些仅适用于动态链接的可执行文件的功能,并且由于musl除此之外,您不能proc_macro在musl.
与此相关的问题在这里,Alex 很好地描述了一些问题和权衡,需要使这个板条箱在完整的静态目标上可用:https://github.com/rust-lang/rust/问题/40174
只是为了从容器中确认:
~# docker run -ti rust:alpine3.10 /bin/sh
/ # rustup show
Default host: x86_64-unknown-linux-musl
rustup home: /usr/local/rustup
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1201 次 |
| 最近记录: |