Skip to content

Commit

Permalink
[pybind11] Update Include Paths to Use Base Builder Python 3.10
Browse files Browse the repository at this point in the history
Updates hardocded references to Python 3.8 installation paths
to point to the Python 3.10 equivalents instead.
  • Loading branch information
DaveLak committed Aug 28, 2024
1 parent 8a4f8e2 commit 2633c02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions projects/pybind11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
FROM gcr.io/oss-fuzz-base/base-builder

RUN apt-get update && \
apt-get install -y python-is-python3 build-essential pip python3-dev
RUN python3 -m pip install --upgrade pip
apt-get install -y build-essential

RUN git clone https://github.com/pybind/pybind11
COPY build.sh *_fuzzer.cc $SRC/
Expand Down
6 changes: 3 additions & 3 deletions projects/pybind11/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ cmake -S . -B build -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON
cmake --build build -j4
python3 -m pip install .

cp /usr/local/lib/libpython3.8.so.1.0 $OUT/
cp /usr/local/lib/libpython3.10.so.1.0 $OUT/
for f in $SRC/*_fuzzer.cc; do
fuzzer=$(basename "$f" _fuzzer.cc)
$CXX $CXXFLAGS \
-I$SRC/pybind11/include -isystem /usr/local/include/python3.8 \
-I$SRC/pybind11/include -isystem /usr/local/include/python3.10 \
$SRC/${fuzzer}_fuzzer.cc -o $OUT/${fuzzer}_fuzzer \
/usr/local/lib/libpython3.8.so.1.0 \
/usr/local/lib/libpython3.10.so.1.0 \
$LIB_FUZZING_ENGINE -lpthread
patchelf --set-rpath '$ORIGIN/' $OUT/${fuzzer}_fuzzer
done

0 comments on commit 2633c02

Please sign in to comment.