Re: [PATCH V4 8/8] libgpiod: Integrate building of rust bindings with make

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

I thought it will be better to build bindings everytime for tests.

> Anyway, for reference this was the build error without clang installed:

Did it work for you after clang was installed ?

> 
> ...
>    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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux