Value too large for defined data type; class=Os (2) (but only when using a build.rs)

Open
#9,545 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
github-actions, rust

Research direction

Start by reproducing the two GitHub Actions runs in the linked test-actions repository, comparing builds with and without the empty build.rs file. Check whether the error originates in Cargo or the GitHub Actions environment, using the reported Cargo version as context. Done means the cause is identified and a fix or confirmed workaround is validated.

Written by the indexing model from the issue text.

Description

A-build-scripts A-git A-rebuild-detection C-bug S-blocked-external

Problem

I see the error Value too large for defined data type; class=Os (2) when building with cargo on a github action IF AND ONLY IF I have a file build.rs (even if this file is literally just an empty function).
When I don't have this file, the problem disappears (the file is doing nothing functionally. it is literally empty)

Steps
fully reproducible here:

with only two commits (and two runs on the actions), so one can see that literally, when I remove the file build.rs , the build goes through.

Possible Solution(s)

Remove the file build.rs

Notes

cargo version 1.52.0 (69767412a 2021-04-21)


same issue here https://github.com/uraimo/run-on-arch-action/issues/46 but since I don't know if it is a cargo issue or github actions issue, I'll post on both (for now. I'll close the unrelated one when we discover what's happening)

Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/cargo

All issues in rust-lang/cargo

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.