On 7/26/2023 11:46 AM, Richard W.M. Jones wrote:
On Wed, Jul 26, 2023 at 08:55:43AM +0000, Tage Johansson wrote:
> On 7/25/2023 9:43 PM, Richard W.M. Jones wrote:
> --- stderr
> ./../../include/libnbd.h:33:10: fatal error: 'stdbool.h' file not
found
> thread 'main' panicked at 'Unable to generate bindings:
ClangDiagnostic("./../../include/libnbd.h:33:10: fatal error: 'stdbool.h'
file not found\n")', libnbd-sys/build.rs:53:10
>
> Rich.
>
>
> Seems that Clang is unable to find stdbool.h, which should be part
> of the C standard library since C99. This is strange, it seems that
> your Clang installation is not complete. See this link for
> instructions. This requirement should be removed when the
> requirement on rust-bindgen is removed.
It's a new machine and I don't have clang installed at all.
$ rpm -qa | grep clang
clang15-resource-filesystem-15.0.7-4.fc38.x86_64
clang15-libs-15.0.7-4.fc38.x86_64
clang-resource-filesystem-16.0.5-4.fc39.x86_64
clang-libs-16.0.5-4.fc39.x86_64
$ rpm -qa | grep llvm
llvm15-libs-15.0.7-4.fc38.x86_64
llvm-libs-16.0.5-2.fc39.x86_64
I have never used rpm, but if you are using Fedora, the following
command should be enough:
dnf install clang-devel
According to this link
<
https://rust-lang.github.io/rust-bindgen/requirements.html>.
I seem to remember in some project we had a configure-time test to
check if rust/cargo was working, compiling a simple test program, but
I can't find that right now.
Rich.
That was actually this project. I removed it because we both thought it
was unnecessary. And I actually think it wouldn't catch this problem
anyway because this is directly related to rust-bindgen.
Best regards,
Tage