Tage Johansson
2023-Jul-26 08:55 UTC
[Libguestfs] [libnbd PATCH v3 01/10] rust: create basic Rust bindings
On 7/25/2023 9:43 PM, Richard W.M. Jones wrote:> Here's another compilation bug: > > Compiling libnbd-sys v0.1.0 (/home/rjones/d/libnbd-rust-bindings/rust/libnbd-sys) > error: failed to run custom build command for `libnbd-sys v0.1.0 (/home/rjones/d/libnbd-rust-bindings/rust/libnbd-sys)` > > Caused by: > process didn't exit successfully: `/home/rjones/d/libnbd-rust-bindings/rust/target/debug/build/libnbd-sys-823324fb8c9967ef/build-script-build` (exit status: 101) > --- stdout > cargo:rerun-if-env-changed=LIBNBD_NO_PKG_CONFIG > cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG > cargo:rerun-if-env-changed=PKG_CONFIG > cargo:rerun-if-env-changed=LIBNBD_STATIC > cargo:rerun-if-env-changed=LIBNBD_DYNAMIC > cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC > cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC > cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH > cargo:rerun-if-env-changed=PKG_CONFIG_PATH > cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR > cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR > cargo:rerun-if-env-changed=SYSROOT > cargo:rerun-if-env-changed=LIBNBD_STATIC > cargo:rerun-if-env-changed=LIBNBD_DYNAMIC > cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC > cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC > cargo:rustc-link-search=native=/home/rjones/d/libnbd-rust-bindings/lib/.libs > cargo:rustc-link-lib=nbd > cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG > cargo:rerun-if-env-changed=PKG_CONFIG > cargo:rerun-if-env-changed=LIBNBD_STATIC > cargo:rerun-if-env-changed=LIBNBD_DYNAMIC > cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC > cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC > cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH > cargo:rerun-if-env-changed=PKG_CONFIG_PATH > cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR > cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR > cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR > cargo:rerun-if-changed=wrapper.h > cargo:rerun-if-env-changed=TARGET > cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu > cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu > cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS > > --- 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 <https://rust-lang.github.io/rust-bindgen/requirements.html#clang> for instructions.? This requirement should be removed when the requirement on rust-bindgen is removed. Best regards, Tage -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230726/0ccbef4b/attachment.htm>
Richard W.M. Jones
2023-Jul-26 09:46 UTC
[Libguestfs] [libnbd PATCH v3 01/10] rust: create basic Rust bindings
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 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. -- 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