高山码头文件:"cannot produce proc-macro...does not support these crate types"
Alpine dockerfile: "cannot produce proc-macro...does not support these crate types"
这里是铁锈新手。尝试使用 Redis: true
为 linux x64 构建一个 sccache 二进制文件。我从高山图像开始:
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
我得到:
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
如果我 FROM rust
工作正常,它基于 buster
。我可以接受这个(我会的),但这是怎么回事?我太不适应了,我什至不知道该问什么问题。
proc_macro
crate 依赖于一些只对动态链接的可执行文件可用的特性,并且由于 musl
是除此之外的任何东西,你不能在 [=12] 上使用 proc_macro
=].
与此相关的问题在这里,Alex 很好地描述了一些问题和权衡,这些问题和权衡需要使这个板条箱在完整的静态目标上可用:https://github.com/rust-lang/rust/issues/40174
只是从容器中确认:
~# docker run -ti rust:alpine3.10 /bin/sh
/ # rustup show
Default host: x86_64-unknown-linux-musl
rustup home: /usr/local/rustup
这里是铁锈新手。尝试使用 Redis: true
为 linux x64 构建一个 sccache 二进制文件。我从高山图像开始:
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
我得到:
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
如果我 FROM rust
工作正常,它基于 buster
。我可以接受这个(我会的),但这是怎么回事?我太不适应了,我什至不知道该问什么问题。
proc_macro
crate 依赖于一些只对动态链接的可执行文件可用的特性,并且由于 musl
是除此之外的任何东西,你不能在 [=12] 上使用 proc_macro
=].
与此相关的问题在这里,Alex 很好地描述了一些问题和权衡,这些问题和权衡需要使这个板条箱在完整的静态目标上可用:https://github.com/rust-lang/rust/issues/40174
只是从容器中确认:
~# docker run -ti rust:alpine3.10 /bin/sh
/ # rustup show
Default host: x86_64-unknown-linux-musl
rustup home: /usr/local/rustup