nicolabs / nicobot

🤟 A collection of *cool* chat bots 🤟
MIT License
1 stars 0 forks source link

could not read directory '/usr/local/cargo/registry/index/github.com-1285ae84e5963aae/.git//refs': Value too large for defined data type; class=Os (2) #59

Open nicobo opened 3 years ago

nicobo commented 3 years ago

This problem seems to be caused by incompatible FS/cpu arch with Rust in some images (e.g. arm ones) and has already happened during the build of signal dependencies (see signal-debian.Dockerfile) but it now also happens during the build of slixmpp because newer versions of cryptography require Rust : slixmpp -> cryptography -> rust.

#62 817.8   running build_rust
#62 817.8       Updating crates.io index
#62 817.8   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)
#62 817.8   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)
#62 817.8   error: failed to get `pyo3` as a dependency of package `cryptography-rust v0.1.0 (/tmp/pip-install-gj5wjcf0/cryptography_b5957e0ba0674155830be25bbc0b6e7f/src/rust)`
#62 817.8   
#62 817.8   Caused by:
#62 817.8     failed to fetch `https://github.com/rust-lang/crates.io-index`
#62 817.8   
#62 817.8   Caused by:
#62 817.8     could not read directory '/usr/local/cargo/registry/index/github.com-1285ae84e5963aae/.git//refs': Value too large for defined data type; class=Os (2)
#62 817.8   
#62 817.8       =============================DEBUG ASSISTANCE=============================
#62 817.8       If you are seeing a compilation error please try the following steps to
#62 817.8       successfully install cryptography:
#62 817.8       1) Upgrade to the latest pip and try again. This will fix errors for most
#62 817.8          users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
#62 817.8       2) Read https://cryptography.io/en/latest/installation.html for specific
#62 817.8          instructions for your platform.
#62 817.8       3) Check our frequently asked questions for more information:
#62 817.8          https://cryptography.io/en/latest/faq.html
#62 817.8       4) Ensure you have a recent Rust toolchain installed:
#62 817.8          https://cryptography.io/en/latest/installation.html#rust
#62 817.8       5) If you are experiencing issues with Rust for *this release only* you may
#62 817.8          set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
#62 817.8       =============================DEBUG ASSISTANCE=============================
#62 817.8   

See full trace here : https://github.com/nicolabs/nicobot/runs/1866971889?check_suite_focus=true

The original issue is tracked here : docker/buildx#395

See also #57

nicobo commented 3 years ago

Should be fixed with 5805cbad4cd7a9cfb82e752fcb5d653eabf98af6. Keeping open however since it still should be fixed so that we can upgrade to the next cryptography releases.

alexyao2015 commented 3 years ago

Hey! I saw this issue linked to the larger buildx issue. Just wanted to mention that I did find a terrible workaround for it for my project... Not pretty though. https://github.com/hass-emulated-hue/base-image/commit/e530602a29ad0cbd13f39285eaee593db27802d9#diff-a894120de2d841cb7e1e40a5faee2225d8810cc3fe03ecd231b07322594fca1cR53

nicobo commented 3 years ago

@alexyao2015 thanks I will have a look at it !