diff --git a/.cargo/config.toml b/.cargo/config.toml index 74b272a9..344995e9 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,7 +1,5 @@ [env] COMPILE_ENV = { value = "compile-env", relative = true, force = false } -SYSROOT = { value = "compile-env/sysroot", relative = true, force = false } - PATH = { value = "compile-env/bin", relative = true, force = true } LD_LIBRARY_PATH = { value = "compile-env/lib", relative = true, force = true } LIBCLANG_PATH = { value = "compile-env/lib", relative = true, force = true } diff --git a/dpdk-sysroot-helper/src/lib.rs b/dpdk-sysroot-helper/src/lib.rs index 91515643..236c0475 100644 --- a/dpdk-sysroot-helper/src/lib.rs +++ b/dpdk-sysroot-helper/src/lib.rs @@ -33,7 +33,8 @@ pub fn get_compile_env() -> String { } pub fn get_sysroot() -> String { - let sysroot_env = env::var("SYSROOT").expect("sysroot env not set"); + let compile_env = env::var("COMPILE_ENV").expect("COMPILE_ENV not set"); + let sysroot_env = format!("{compile_env}/sysroot"); let target = get_target_name(); let profile = get_profile_name(); let expected_sysroot = format!("{sysroot_env}/{target}/{profile}"); diff --git a/justfile b/justfile index 14486acf..aeb88fdb 100644 --- a/justfile +++ b/justfile @@ -38,8 +38,7 @@ profile := "dev" _container_repo := "ghcr.io/githedgehog/dataplane" rust := "stable" _dpdk_sys_container_repo := "ghcr.io/githedgehog/dpdk-sys" -_env_branch := "main" -_dpdk_sys_container_tag := _env_branch + "-rust-" + rust + "-" + dpdk_sys_commit +_dpdk_sys_container_tag := dpdk_sys_commit + "-rust-" + rust _dev_env_container := _dpdk_sys_container_repo + "/dev-env:" + _dpdk_sys_container_tag _doc_env_container := _dpdk_sys_container_repo + "/doc-env:" + _dpdk_sys_container_tag _compile_env_container := _dpdk_sys_container_repo + "/compile-env:" + _dpdk_sys_container_tag diff --git a/scratch/Cargo.toml b/scratch/Cargo.toml index 5119fd47..f8fd9794 100644 --- a/scratch/Cargo.toml +++ b/scratch/Cargo.toml @@ -8,11 +8,10 @@ publish = false dpdk-sys = { path = "../dpdk-sys" } dpdk = { path = "../dpdk" } +rand = { version = "0.8.5" } thiserror = { workspace = true } tracing = { workspace = true, features = ["attributes"] } tracing-subscriber = { workspace = true } -rand = { version = "0.8" } - [build-dependencies] dpdk-sysroot-helper = { path = "../dpdk-sysroot-helper" } diff --git a/scratch/build.rs b/scratch/build.rs index 7a28a907..c18a3acb 100644 --- a/scratch/build.rs +++ b/scratch/build.rs @@ -5,6 +5,6 @@ fn main() { rerun_if_changed.iter().for_each(|file| { println!("cargo:rerun-if-changed={file}"); }); - println!("cargo:rustc-link-search=all={sysroot}/lib"); + println!("cargo:rustc-link-search=native={sysroot}/lib"); println!("cargo:rustc-link-arg=--sysroot={sysroot}"); } diff --git a/scripts/dpdk-sys.env b/scripts/dpdk-sys.env index b38aa5a8..a2b0349f 100644 --- a/scripts/dpdk-sys.env +++ b/scripts/dpdk-sys.env @@ -1,2 +1,2 @@ DPDK_SYS_BRANCH="main" -DPDK_SYS_COMMIT="02d235e5f259dd591401911b3336f72dea4c824a" +DPDK_SYS_COMMIT="e4055e30aa6c44dcf97d7b4c992c6db5a1894241"