Bug 2216665

Summary: keylime-agent-rust: FTBFS after clang 16 update
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: keylime-agent-rustAssignee: Sergio Correia <scorreia>
Status: CLOSED MIGRATED QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: ansasaki, dueno, ksrot, pkoncity
Target Milestone: rcKeywords: MigratedToJIRA
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-05 13:12:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florian Weimer 2023-06-22 07:18:40 UTC
The build fails with this output:

error: failed to run custom build command for `tss-esapi-sys v0.3.0`
Caused by:
  process didn't exit successfully: `/builddir/build/BUILD/rust-keylime-0.1.0/target/release/build/tss-esapi-sys-efb3eb08194f131f/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=TSS2_SYS_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_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:version=3.0.3
  --- stderr
  thread 'main' panicked at '"__pthread_cond_s_union_(anonymous_at_/usr/include/bits/thread-shared-types_h_94_17)" is not a valid Ident', /builddir/build/BUILD/rust-keylime-0.1.0/vendor/proc-macro2/src/fallback.rs:700:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I believe you need to update bindgen to a version that includes:

clang: Detect anonymous items explicitly, rather than relying on empty names.
<https://github.com/rust-lang/rust-bindgen/commit/80738016a36e803fe3bf8b8f6f388c6589d86a1c>