Broken image for linux/arm/v7
还没有人认领这个 Issue。
评估
调研方向
首先检查 linux/arm/v7 的 Docker 镜像构建过程,以及它如何调用标准的 sh.rustup.rs 安装程序,然后重现报告的 cargo install 失败问题。当 linux/arm/v7 镜像能够正确安装 Rust,并且能够构建 Rust 项目而不出现报告中的架构或文件系统错误时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Hi all,
I discovered a bit of a problem with the linux/arm/v7 version of the Rust image - attempting to build Rust projects with it breaks in various mysterious ways with errors like this:
> [builder 6/12] RUN cargo install cargo-build-dependencies:
#14 0.834 Updating crates.io index
#14 1.590 warning: spurious network error (2 tries remaining): could not read directory '/usr/local/cargo/registry/index/github.com-1285ae84e5963aae/.git//refs': Value too large for defined data type; class=Os (2)
#14 2.087 warning: spurious network error (1 tries remaining): could not read directory '/usr/local/cargo/registry/index/github.com-1285ae84e5963aae/.git//refs': Value too large for defined data type; class=Os (2)
#14 2.628 error: failed to fetch `https://github.com/rust-lang/crates.io-index`
#14 2.628
#14 2.628 Caused by:
#14 2.629 could not read directory '/usr/local/cargo/registry/index/github.com-1285ae84e5963aae/.git//refs': Value too large for defined data type; class=Os (2)
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c cargo install cargo-build-dependencies]: exit code: 101
I can't say for certain the cause, but I can say that if you install Rust on linux/arm/v7 using the "standard" sh.rustup.rs script, it is also broken, because of this function:
get_bitness() {
need_cmd head
# Architecture detection without dependencies beyond coreutils.
# ELF files start out "\x7fELF", and the following byte is
# 0x01 for 32-bit and
# 0x02 for 64-bit.
# The printf builtin on some shells like dash only supports octal
# escape sequences, so we use those.
local _current_exe_head
_current_exe_head=$(head -c 5 /proc/self/exe )
if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then
echo 32
elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then
echo 64
else
err "unknown platform bitness"
fi
}
This fails to set the bitness to 32bit, instead falling through to "unknown platform bitness" (because no /proc/self/exe), resulting in a broken installation of Rust.
If the Docker image build uses that standard rustup script, that's probably why the image is also broken.
- 主要语言
- Dockerfile
- 星标
- 540
- 派生
- 110
- 平均合并
- 25 分钟
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/docker-rust 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
rust-lang/docker-rust#159 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 48/100
rust-lang/docker-rust#278 ·
-
难度 5/5 一周以上 新手友好度 30/100
rust-lang/docker-rust#264 ·
-
难度 3/5 1-2 天 新手友好度 52/100
rust-lang/docker-rust#263 ·
-
难度 3/5 1-2 天 新手友好度 35/100
rust-lang/docker-rust#248 · 1 条评论 ·
查看 rust-lang/docker-rust 的全部 Issue
相似的 Issue
-
process
难度 1/5 1-3 小时 新手友好度 76/100
pyrite-wiki/pyrite#1036 ·
维护者通常 1 天内回复
-
bug dependencies github_actions
难度 2/5 1-3 小时 新手友好度 84/100
ChristianHandy/FleetPilot#233 ·
维护者通常 1 天内回复
-
area/ci good first issue size/S type/bug
难度 2/5 1-3 小时 新手友好度 88/100
lorica-labs/volant#680 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
hyperledger-cello/cello#850 ·
-
bug
难度 2/5 1-3 小时 新手友好度 86/100