Tage Johansson
2023-Jul-26 09:58 UTC
[Libguestfs] [libnbd PATCH v3 01/10] rust: create basic Rust bindings
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_64I 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230726/6ac74566/attachment.htm>
Richard W.M. Jones
2023-Jul-27 07:43 UTC
[Libguestfs] [libnbd PATCH v3 01/10] rust: create basic Rust bindings
On Wed, Jul 26, 2023 at 09:58:03AM +0000, Tage Johansson wrote:> I have never used rpm, but if you are using Fedora, the following command > should be enough: > > ??? dnf install clang-develWe need to work with whatever environment we find ourselves in. We can't just fail because of a missing dependency, but instead should disable the rust bindings (we can however fail at ./configure time if --enable-rust was given explicitly but is not possible). This is the reason for having ./configure at all.> According to this link. > > > 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.Since this seems to be caused by rust-bindgen, which we don't need, can we get rid of bindgen now? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit