rust-lang / rust-lang/rust-bindgen

FreeBSD i386: mismatch value on libxml binding

Open
#3,319 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Hi,

I'm not really familiar with rust, but since a couple of months I have this bindgen error when compiling
the rust-libxml crate:

error[E0080]: evaluation of constant value failed
   --> /home/jc/rust-libxml/target/debug/build/libxml-0db722a43088e767/out/bindings.rs:407:29
    |
407 |   ["Size of __max_align_t"][::std::mem::size_of::<__max_align_t>() - 20usize];
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `16_usize - 20_usize`, which would overflow

I reporte this issue to the hurl project and the rust-libxml without success.

Environment:
FreeBSD 14.3 i385
rust 1.91.1
bindgen v0.71.1

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.

Research direction

Start by reproducing the bindgen v0.71.1 failure on FreeBSD 14.3 i386 and inspect the generated bindings.rs around line 407. Compare the reported __max_align_t size with the expected value, then determine what bindgen should do for this platform and verify the fix by regenerating the bindings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.