From: Kent Gibson <warthog618@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [libgpiod][bug] building rust bindings requires clang headers
Date: Fri, 9 Jun 2023 10:37:10 +0800 [thread overview]
Message-ID: <ZIKQVol59uXI5PyI@sol> (raw)
When trying to build the libgpiod rust bindings on my Debian bullseye VM I get:
Compiling gpiosim-sys v0.1.0 (/home/dev/libgpiod/bindings/rust/gpiosim-sys)
error: failed to run custom build command for `gpiosim-sys v0.1.0 (/home/dev/libgpiod/bindings/rust/gpiosim-sys)`
Caused by:
process didn't exit successfully: `/home/dev/libgpiod/bindings/rust/target/release/build/gpiosim-sys-dfa257ecee3f0e2e/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=../../../tests/gpiosim/gpiosim.h
--- stderr
../../../tests/gpiosim/gpiosim.h:7:10: fatal error: 'stdbool.h' file not found
thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("../../../tests/gpiosim/gpiosim.h:7:10: fatal error: 'stdbool.h' file not found\n")', gpiosim-sys/build.rs:27:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The source of the error appears to be bindgen using libclang to parse
the gpiosim header, and that failing if the requisite headers are not
installed.
If I install them:
apt install libclang-common-11-dev
the build passes.
Can a dependency be added to the autotools configuration to check for
the availability of those headers if building the rust bindings?
I would add it myself, but I'm not sure how - or if there is some better
solution.
The configure.ac already has a AC_HEADER_STDBOOL, but that checks for
the gcc headers, not clang.
Cheers,
Kent.
next reply other threads:[~2023-06-09 2:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 2:37 Kent Gibson [this message]
2023-06-09 6:18 ` [libgpiod][bug] building rust bindings requires clang headers Viresh Kumar
2023-06-09 6:21 ` Kent Gibson
2023-06-09 6:24 ` Viresh Kumar
2023-06-10 5:27 ` Kent Gibson
2023-06-12 5:26 ` Erik Schilling
2023-06-12 7:32 ` Kent Gibson
2023-06-12 11:16 ` Erik Schilling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZIKQVol59uXI5PyI@sol \
--to=warthog618@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linux-gpio@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).