Re: [libgpiod][bug] building rust bindings requires clang headers

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

 



On Fri, Jun 09, 2023 at 11:54:56AM +0530, Viresh Kumar wrote:
> On 09-06-23, 14:21, Kent Gibson wrote:
> > I think that is what the AC_HEADER_STDBOOL already does - but that
> > detects the gcc header, and the additional check needs to be for the clang
> > header.
> > 
> > Unless you can convince clang to use the gcc headers?
> 
> Ahh, my bad :(
> 

On a relate note, how do you run clippy now?

When I tried `cargo clippy` I got an error about pkg-config not finding
libgpiod. Fixed that by pointing PKG_CONFIG_PATH at my local libgpiod
build.

But now I get:

--- stderr
  wrapper.h:1:10: fatal error: 'gpiod.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("wrapper.h:1:10: fatal error: 'gpiod.h' file not found\n")', libgpiod-sys/build.rs:44:10


so I guess bindgen/clang needs to be pointed at the include directory,
but not sure how to do that without emulating whatever `make` is doing.

Same goes for `cargo build`, come think of it - now you have to build
using `make`.

How are you supposed to tell if your code is sub-par without clippy to
tell you?  Or, more generally, how does the development process for the
rust bindings work now?

Cheers,
Kent.




[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