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 Jun 4, 2024
1 parent f5bf756 commit a5bbdb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions projects/pybind11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
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 python3 -m pip install 'pyinstaller==6.7.0'

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 a5bbdb3

Please sign in to comment.