On Wed, Jul 27, 2022 at 11:48:24AM +0530, Viresh Kumar wrote: > On 27-07-22, 10:59, Kent Gibson wrote: > > Wouldn't build for me on a Debian bullseye VM. > > Apparently bindgen requires clang to find the system headers [1][2], > > Right. > > > and > > there is no dep check or warning about that. > > Ahh, I need to add that somewhere then. > > > Also not sure why the build wanted bindgen, as by default it uses the > > pre-generated bindings? > > Did you enable tests as well ? That enables "gpiosim", which enables "generate" > and bindgen will be required. Ahh, yeah I do --enable-tests as well. > > I thought it will be better to build bindings everytime for tests. > So you can't run tests on those platforms where bindgen is problematic? > > Anyway, for reference this was the build error without clang installed: > > Did it work for you after clang was installed ? > Yeah, all good once clang was installed. Cheers, Kent. > > > > ... > > Compiling thiserror v1.0.31 > > Compiling libgpiod-sys v0.1.0 (/home/dev/libgpiod/bindings/rust/libgpiod-sys) > > error: failed to run custom build command for `libgpiod-sys v0.1.0 (/home/dev/libgpiod/bindings/rust/libgpiod-sys)` > > > > Caused by: > > process didn't exit successfully: `/home/dev/libgpiod/bindings/rust/target/release/build/libgpiod-sys-0fb8ce8170c88d8f/build-script-build` (exit status: 101) > > --- stdout > > cargo:rerun-if-changed=wrapper.h > > cargo:rerun-if-changed=../../../lib/chip.c > > cargo:rerun-if-changed=../../../lib/chip-info.c > > cargo:rerun-if-changed=../../../lib/edge-event.c > > cargo:rerun-if-changed=../../../lib/info-event.c > > cargo:rerun-if-changed=../../../lib/internal.c > > cargo:rerun-if-changed=../../../lib/line-config.c > > cargo:rerun-if-changed=../../../lib/line-info.c > > cargo:rerun-if-changed=../../../lib/line-request.c > > cargo:rerun-if-changed=../../../lib/misc.c > > cargo:rerun-if-changed=../../../lib/request-config.c > > cargo:rerun-if-changed=../../../tests/gpiosim/gpiosim.c > > cargo:rerun-if-changed=gpiosim_wrapper.h > > cargo:rustc-link-lib=kmod > > cargo:rustc-link-lib=mount > > > > --- stderr > > /usr/include/string.h:33:10: fatal error: 'stddef.h' file not found > > /usr/include/string.h:33:10: fatal error: 'stddef.h' file not found, err: true > > thread 'main' panicked at 'Unable to generate bindings: ()', libgpiod-sys/build.rs:42:10 > > -- > viresh