From c47a4b671647a477d685da6ef4eebfcab714b917 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 29 Dec 2023 06:54:08 +0900 Subject: [PATCH 1/2] scx_utils: Explain what's going on with bindgen version and suppress deprecation warning This is a followup to https://github.com/sched-ext/scx/pull/50. See the comment in BpfBuilder::bindgen_bpf_intf() for details. --- rust/scx_utils/Cargo.toml | 2 ++ rust/scx_utils/src/bpf_builder.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/rust/scx_utils/Cargo.toml b/rust/scx_utils/Cargo.toml index 55384581..0fd2eba0 100644 --- a/rust/scx_utils/Cargo.toml +++ b/rust/scx_utils/Cargo.toml @@ -9,6 +9,8 @@ description = "Utilities for sched_ext schedulers" [dependencies] anyhow = "1.0" +# FIXME - We need to allow both 0.68 and 0.69 to accommodate fedora. See the +# comment in BpfBuilder::bindgen_bpf_intf() for details. bindgen = ">=0.68, <0.70" glob = "0.3" lazy_static = "1.4" diff --git a/rust/scx_utils/src/bpf_builder.rs b/rust/scx_utils/src/bpf_builder.rs index 9796d5d8..d7faa416 100644 --- a/rust/scx_utils/src/bpf_builder.rs +++ b/rust/scx_utils/src/bpf_builder.rs @@ -493,6 +493,14 @@ impl BpfBuilder { // Tell cargo to invalidate the built crate whenever the wrapper changes deps.insert(input.to_string()); + // FIXME - bindgen's API changed between 0.68 and 0.69 so that + // `bindgen::CargoCallbacks::new()` should be used instead of + // `bindgen::CargoCallbacks`. Unfortunately, as of Dec 2023, fedora + // is shipping 0.68. To accommodate fedora, allow both 0.68 and 0.69 + // of bindgen and suppress deprecation warning. Remove the following + // once fedora can be updated to bindgen >= 0.69. + #[allow(deprecated)] + // The bindgen::Builder is the main entry point to bindgen, and lets // you build up options for the resulting bindings. let bindings = bindgen::Builder::default() From 98773131df64fc91a6ea3540b1bc8c0ab1cd356f Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 29 Dec 2023 06:58:45 +0900 Subject: [PATCH 2/2] Bump versions to publish scx_utils fedora compat change --- meson.build | 2 +- rust/scx_utils/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e17f750e..8df4cae3 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('sched_ext schedulers', 'c', - version: '0.1.3', + version: '0.1.4', license: 'GPL-2.0') if meson.version().version_compare('<1.2') diff --git a/rust/scx_utils/Cargo.toml b/rust/scx_utils/Cargo.toml index 0fd2eba0..5af4511d 100644 --- a/rust/scx_utils/Cargo.toml +++ b/rust/scx_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "scx_utils" -version = "0.4.0" +version = "0.4.1" edition = "2021" authors = ["Tejun Heo "] license = "GPL-2.0-only"