youknowone / apple-sys

The auto-managed -sys crate for Apple platforms using bindgen directly from build environment
BSD 2-Clause "Simplified" License
50 stars 11 forks source link

Build error when include ScreenCaptureKit #14

Closed bigduu closed 1 year ago

bigduu commented 1 year ago
apple-sys = { version = "*", features = ["ScreenCaptureKit"] }

/Users/bigduu/.cargo/registry/src/github.com-1ecc6299db9ec823/apple-sys-0.2.0/ScreenCaptureKit.h:1:2: fatal error: malformed or corrupted AST file: 'duplicate DECL_OFFSET record in AST file' /Users/bigduu/.cargo/registry/src/github.com-1ecc6299db9ec823/apple-sys-0.2.0/ScreenCaptureKit.h:1:2: note: after modifying system headers, please delete the module cache at '/var/folders/xw/5cb3hk_x61zfbcyf_8ww7zlm0000gn/C/clang/ModuleCache/Z1130PPJ7JDN' thread 'main' panicked at 'libclang error; possible causes include:

youknowone commented 1 year ago

Could you share more details? I can't reproduce it on macOS 13.3.1 with MacOSX13.3.sdk

Even more, It is libclang error. apple-sys doesn't have much things to do with libclang error. apple-sys uses bindgen, and bindgen uses libclang.

youknowone commented 1 year ago

Please update llvm if your llvm version is an old one.