Bug 2216706

Summary: fido-device-onboard: FTBFS after Clang 16 update
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: fido-device-onboardAssignee: Peter Robinson <perobins>
Status: CLOSED NEXTRELEASE QA Contact: Xiaofeng Wang <xiaofwan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: miabbott
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fido-device-onboard-0.4.12-1.el9_2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-27 12:20:35 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 10:23:13 UTC
The build fails with this output:

error: failed to run custom build command for `devicemapper-sys v0.1.3`

Caused by:
  process didn't exit successfully: `/builddir/build/BUILD/fido-device-onboard-rs-0.4.7/target/release/build/devicemapper-sys-5afd9b270eb658d3/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/dm-ioctl_h_235_1)" is not a valid Ident', /builddir/build/BUILD/fido-device-onboard-rs-0.4.7/vendor/proc-macro2/src/fallback.rs:756:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

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>

Comment 1 Peter Robinson 2023-06-23 14:21:56 UTC
> clang: Detect anonymous items explicitly, rather than relying on empty names.
> <https://github.com/rust-lang/rust-bindgen/commit/
> 80738016a36e803fe3bf8b8f6f388c6589d86a1c>

So it looks like this landed in v0.62.0, we've already moved to bindgen 0.63 in the 0.4.9 release and we're do to do a new build shortly. It also builds fine on F-38 which has clang-16 so I think we're covered here already.

Comment 2 Peter Robinson 2023-07-20 20:51:36 UTC
So we now have a problem where we don't have an new enough version of rust:
error: package `devicemapper v0.33.5` cannot be built because it requires rustc 1.69.0 or newer, while the currently active rustc version is 1.66.1
Either upgrade to rustc 1.69.0 or newer, or use
cargo update -p devicemapper.5 --precise ver