Skip to content

Commit 261e9e8

Browse files
authored
fix: Unbreak neqo compilation (#14319)
As described in mozilla/neqo#3147, we made changes to assume a release build of NSS to be present for neqo, which is failing in `oss-fuzz` due to toolchain issues. Work around this. Also switch to pulling NSPR from the Mercurial repository, as the GitHub mirror is not being updated it seems. Finally, build NSS like we do for neqo, modulo not doing a release build.
1 parent a1035f6 commit 261e9e8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

projects/neqo/Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,24 @@
1616

1717
FROM gcr.io/oss-fuzz-base/base-builder-rust
1818

19-
RUN git clone --depth 1 https://github.com/nss-dev/nspr $SRC/nspr
20-
RUN git clone --depth 1 https://github.com/nss-dev/nss $SRC/nss
21-
RUN git clone --depth 1 https://github.com/mozilla/neqo $SRC/neqo
22-
RUN ls -l $SRC
23-
2419
RUN apt-get update && apt-get install -y --no-install-recommends \
25-
libclang-dev gyp ninja-build python-is-python3 zlib1g-dev \
20+
libclang-dev gyp ninja-build python-is-python3 zlib1g-dev mercurial \
2621
&& apt-get autoremove -y && apt-get clean -y \
2722
&& rm -rf /var/lib/apt/lists/*
2823

2924
# We unfortunately need to build NSS from source, because the Debian package
3025
# in the base distribution is too old.
26+
RUN hg clone https://hg.mozilla.org/projects/nspr $SRC/nspr
27+
RUN git clone --depth 1 https://github.com/nss-dev/nss $SRC/nss
28+
RUN git clone --depth 1 https://github.com/mozilla/neqo $SRC/neqo
3129
ENV NSS_DIR=$SRC/nss NSS_PREBUILT=1
3230

3331
# FIXME: Optimized NSS build fails with assembler errors.
3432
# Maybe not critical since the fuzzer uses AeadNull.
35-
RUN CXX="$CXX -stdlib=libc++" $SRC/nss/build.sh --static --disable-tests
33+
RUN CXX="$CXX -stdlib=libc++" $NSS_DIR/build.sh --static -Ddisable_tests=1 -Ddisable_dbm=1 -Ddisable_libpkix=1 -Ddisable_ckbi=1 -Ddisable_fips=1
34+
35+
# neqo expects a Release build of NSS, but (see above) that is failing. Work around this.
36+
RUN ln -s $SRC/dist/Debug $SRC/dist/Release
3637

3738
RUN rustup default nightly
3839
RUN rustup component add --toolchain nightly rust-src

0 commit comments

Comments
 (0)