rust-lang / rust-lang/rust-bindgen
aarch64 size_t mismatch
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
Input C/C++ Header
Bindgen Invocation
and
cargo build --target aarch64-unknown-linux-gnu
Actual Results
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `4`,
right: `8`: Target platform requires `--no-size_t-is-usize`. The size of `ssize_t` (4) does not match the target pointer size (8)', /home/wtf/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.68.1/codegen/mod.rs:908:25
Expected Results
Hi,
I'm trying to build for 64 bit arm but it complains the size t is 32 bit and mismatch.
what could be missed?
ty
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with cargo build --target aarch64-unknown-linux-gnu, then inspect the bindgen invocation in boring-sys/build/main.rs at the linked lines. Read bindgen's size_t assertion near codegen/mod.rs:908 and compare the target's pointer and ssize_t sizes. Done means aarch64 binding generation completes without the panic with correct size_t handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, rust
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100