rust-lang / rust-lang/rust-bindgen

Unable to generate bindings ("Unable to get layout information?")

Open
#2,990 0 comments 0 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

This seems like it might be related to #1768. I'm working to generate bindings for this file. But, I'm hitting a wall. I've proven that a simple case works, so this seems related to something potentially deep in the include-tree so I'm kind of scared to dig into this.

I've attached my build logs running my code against both of:

  1. rust-bindgen 0.70.1 (upstream)
  2. my fork of rust-bindgen which includes @Danielmelody's patch to try to resolve this issue. That seemed to get me farther, but it still broke.

build.upstream.txt
build.danielmelody.txt

If you have nix then you should be able to reproduce (executed on x86_64-linux) using

  1. nix build -L 'github:johnrichardrinehart/f-u?rev=c3e82b4a470b0cefff91a2ac6fd22015603d020f' (upstream)
  2. nix build -L 'github:johnrichardrinehart/f-u?rev=fb8f0e7aa0972c6c2ebce1ed2b4ac74779814d1d' (@Danielmelody's patch)

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 with src/lib/binding.hh and the referenced Nix flake.hh, then reproduce both cases using the two nix build commands in the issue. Compare the upstream rust-bindgen 0.70.1 logs with the fork containing the referenced patch to isolate where layout information is lost. Done means binding generation succeeds for the reported flake.hh input.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.