Skip to content

Commit b2e9647

Browse files
committed
Copy libgio2 dynamic libs to build-runners
1 parent 4e5462b commit b2e9647

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

projects/connectedhomeip/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FROM gcr.io/oss-fuzz-base/base-builder:ubuntu-24-04
2121
RUN apt-get update && \
2222
apt-get install -y --no-install-recommends pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libglib2.0-0\
2323
libavahi-client-dev ninja-build libmount-dev libblkid-dev \
24-
unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
24+
unzip libgirepository1.0-dev libcairo2-dev libreadline-dev patchelf file
2525

2626
# Install Rust for building `cryptography` python package when bootstraping pigweed
2727
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

projects/connectedhomeip/build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,16 @@ deactivate
5959
ninja -C out/fuzz_targets fuzz_tests
6060

6161
cp out/fuzz_targets/tests/* $OUT/
62+
63+
# Copy required shared libraries related to libgio to $OUT/lib
64+
mkdir -p $OUT/lib
65+
cp /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 $OUT/lib/
66+
cp /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 $OUT/lib/
67+
cp /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 $OUT/lib/
68+
cp /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 $OUT/lib/
69+
70+
for f in $OUT/fuzz-*; do
71+
file "$f" | grep -q "ELF" && patchelf --set-rpath '$ORIGIN/lib' "$f"
72+
done
73+
patchelf --set-rpath '$ORIGIN' $OUT/lib/*.so* 2>/dev/null
74+

0 commit comments

Comments
 (0)