JuliaInterop / Clang.jl

C binding generator and Julia interface to libclang
https://juliainterop.github.io/Clang.jl/
MIT License
217 stars 68 forks source link

`sanity check failed` thrown when generating bindings for `lexbor` #499

Closed MichaelHatherly closed 3 weeks ago

MichaelHatherly commented 3 weeks ago

The error message requested filing an error here. This may, perhaps, be user-error rather than a problem with the package :)

Here's a reproducible example of the failure: https://github.com/MichaelHatherly/lexbor_clang_issues. See the CI failure in the following link: https://github.com/MichaelHatherly/lexbor_clang_issues/actions/runs/9664367322/job/26658816002#step:5:180, which also happens locally for me.

Perhaps the

┌ Warning: [CollectDependentSystemNode]: found symbols in the system headers: [:intptr_t]
└ @ Clang.Generators ~/.julia/packages/Clang/uJQ2L/src/generator/passes.jl:95

warning that prints prior to the error has something to do with it.

Potentially useful information:

Gnimuc commented 3 weeks ago

It hit this:

https://github.com/JuliaInterop/Clang.jl/blob/f2f4ae43eed608fda8c58208059e15fc201f5b85/src/generator/audit.jl#L26-L81

I don't have time to fix this at the moment. But you can add no_audit = true to the .toml file to skip the audit phase:

[general]
no_audit = true