Skip to content

Header search path failure on 1.8.2 (works in 1.8.1) related to clang executable search order changes #181

@jbg

Description

@jbg

I'm using autocxx to generate some bindings to a C++ library. autocxx enables the runtime feature of this crate unconditionally, something which will hopefully be improved.

As of this change, released in 1.8.2, my bindings always fail to generate unless I set CLANG_PATH=$(which clang) to override the above search order, because the bundled libclang fails to find some macOS system headers.

$ cargo update --precise 1.8.1 clang-sys
$ cargo check
...
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 02s

$ cargo update --precise 1.8.2 clang-sys
$ cargo check
...
  process didn't exit successfully: `/Users/.../build-script-build` (exit status: 1)
  --- stderr
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found

I'm not sure if this is something to be fixed here or not, as I don't fully understand why the bundled libclang doesn't work. But I suspect this problem affects others on macOS too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions