From 4b1f2bbdc5f16fbfc4cf8d25a3c085fd963694c2 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 10 Nov 2023 10:00:40 -0500 Subject: [PATCH 1/2] rust build: fixup failed workflow Signed-off-by: Maryam Tahhan --- .github/workflows/rust-build.yml | 13 +++++++++++++ lang/rs/apis/cne/src/util.rs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index 01c02dc4..96952c79 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -27,6 +27,19 @@ jobs: libnl-3-dev libnl-cli-3-dev libnuma-dev libpcap-dev meson\ pkg-config wget libbpf-dev llvm-dev libclang-dev clang + - name: Install libbpf and libxdp + run: | + sudo apt update + sudo apt install -y wget build-essential golang + sudo wget http://security.ubuntu.com/ubuntu/pool/main/libb/libbpf/libbpf1_1.1.0-1_amd64.deb + sudo wget http://security.ubuntu.com/ubuntu/pool/main/libb/libbpf/libbpf-dev_1.1.0-1_amd64.deb + sudo wget https://mirrors.edge.kernel.org/ubuntu/pool/main/x/xdp-tools/libxdp1_1.3.0-2ubuntu2_amd64.deb + sudo wget https://mirrors.edge.kernel.org/ubuntu/pool/main/x/xdp-tools/libxdp-dev_1.3.0-2ubuntu2_amd64.deb + sudo apt install -y ./libbpf1_1.1.0-1_amd64.deb + sudo apt install -y ./libbpf-dev_1.1.0-1_amd64.deb + sudo apt install -y ./libxdp1_1.3.0-2ubuntu2_amd64.deb + sudo apt install -y ./libxdp-dev_1.3.0-2ubuntu2_amd64.deb + - name: Build and Install CNDP run: make; sudo CNE_DEST_DIR=/ make install diff --git a/lang/rs/apis/cne/src/util.rs b/lang/rs/apis/cne/src/util.rs index 6a1706fe..a701ad0f 100644 --- a/lang/rs/apis/cne/src/util.rs +++ b/lang/rs/apis/cne/src/util.rs @@ -12,7 +12,7 @@ pub fn get_cstring_from_str(s: &str) -> CString { } pub fn free_cchar_ptr(ptr: *mut i8) { - unsafe { CString::from_raw(ptr) }; + unsafe { let _ = CString::from_raw(ptr); }; } #[allow(dead_code)] From 6a243369bcf7464dedb4d9b06b5f545a6f72530c Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 10 Nov 2023 10:11:52 -0500 Subject: [PATCH 2/2] rust-build: fix pkgconfig path Signed-off-by: Maryam Tahhan --- .github/workflows/rust-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index 96952c79..ae24b7ad 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -8,7 +8,7 @@ on: env: CARGO_TERM_COLOR: always - PKG_CONFIG_PATH: "$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig" + PKG_CONFIG_PATH: "$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu" jobs: @@ -27,6 +27,7 @@ jobs: libnl-3-dev libnl-cli-3-dev libnuma-dev libpcap-dev meson\ pkg-config wget libbpf-dev llvm-dev libclang-dev clang + - name: Install libbpf and libxdp run: | sudo apt update