All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski <brgl@bgdev.pl>,
	erik.schilling@linaro.org
Subject: Re: [libgpiod][bug] building rust bindings requires clang headers
Date: Sat, 10 Jun 2023 13:27:06 +0800	[thread overview]
Message-ID: <ZIQJquwzNacp1Nuh@sol> (raw)
In-Reply-To: <20230609062456.fqw3mqvtcactx2zj@vireshk-i7>

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.


  reply	other threads:[~2023-06-10  5:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09  2:37 [libgpiod][bug] building rust bindings requires clang headers Kent Gibson
2023-06-09  6:18 ` Viresh Kumar
2023-06-09  6:21   ` Kent Gibson
2023-06-09  6:24     ` Viresh Kumar
2023-06-10  5:27       ` Kent Gibson [this message]
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=ZIQJquwzNacp1Nuh@sol \
    --to=warthog618@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=erik.schilling@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.