Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failure Debug Techniques #1378

Open
johnoneil opened this issue Jun 25, 2024 · 1 comment
Open

Build Failure Debug Techniques #1378

johnoneil opened this issue Jun 25, 2024 · 1 comment

Comments

@johnoneil
Copy link

Describe the bug

I'm really looking for some suggestion in how to debug autocxx Builder errors.

When I generate Rust bindings on a very large C++ codebase as follows:

    let mut autocxx_build =
        autocxx_build::Builder::new("src/xxx.rs", include_paths.as_slice())
            .extra_clang_args(clang_args.as_slice())
            .build()
            .unwrap();

I get a pretty obscure fatal error.

called `Result::unwrap()` on an `Err` value: ParseError(AutocxxCodegenError(Conversion(Cpp(UnsupportedType("[u64 ; 4usize]")))))

The project we're generating bindings to is large with many hundreds of headers and the codebase changes often. I'm unsure what header changed to cause this error.

What is your best suggestion to find the header which this error originates from? Is there a more verbose setting for the builder for it to dump what .h files it's currently scanning? Any other options?

I'm currently just hand editing a local copy of autocxx to see if I can shoehorn in some more info to help trace the offending .h file.

To Reproduce
See above.

Expected behavior
Just looking for debugging advice.

Additional context
N/A

@adetaylor
Copy link
Collaborator

You can see lots of debug information by following these instructions; good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants