From 732db6c7d25d379a308274a9cc3b48b001efec28 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:31:18 +0200 Subject: [PATCH] Replace usage of LD_PRELOAD with LD_LIBRARY_PATH With LD_PRELOAD during the cargo build the dynamic linker complains that libz_rs.so can't be found. --- .github/workflows/checks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index fe9c3d5..480a18f 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -262,7 +262,7 @@ jobs: - name: "cdylib: default settings" working-directory: libz-rs-sys-cdylib env: - LD_PRELOAD: "target/${{matrix.target}}/release/deps/libz_rs.so" + LD_LIBRARY_PATH: "target/${{matrix.target}}/release/deps" run: | cargo build --release --target ${{matrix.target}} cc -o zpipe zpipe.c target/${{matrix.target}}/release/deps/libz_rs.so @@ -270,7 +270,7 @@ jobs: cmp -s Cargo.toml out.txt - name: "cdylib: rust-allocator" env: - LD_PRELOAD: "target/${{matrix.target}}/release/deps/libz_rs.so" + LD_LIBRARY_PATH: "target/${{matrix.target}}/release/deps" working-directory: libz-rs-sys-cdylib run: | cargo build --release --target ${{matrix.target}} --no-default-features --features="rust-allocator" @@ -279,7 +279,7 @@ jobs: cmp -s Cargo.toml out.txt - name: "cdylib: no_std" env: - LD_PRELOAD: "target/${{matrix.target}}/release/deps/libz_rs.so" + LD_LIBRARY_PATH: "target/${{matrix.target}}/release/deps" working-directory: libz-rs-sys-cdylib run: | cargo build --release --target ${{matrix.target}} --no-default-features