From 65637510f413757a1f21f916f09b8b038a5ab3ac Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 9 Dec 2021 02:27:48 +1100 Subject: [PATCH] dump config.log when configure fails (#6981) * dump config.log when configure fails Motivated by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41899 which I'm unable to debug locally, but would have also saved time for previous failures at configure time, e.g. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41424 * send config.log to stderr too Co-authored-by: Damien Miller --- projects/openssh/build.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/projects/openssh/build.sh b/projects/openssh/build.sh index e9c0de2e8..6dd5cfc5c 100755 --- a/projects/openssh/build.sh +++ b/projects/openssh/build.sh @@ -24,11 +24,16 @@ sed -i 's|\(usleep.*\)|// \1|' ssh-agent.c # Build project autoreconf env -env CFLAGS="" ./configure \ - --without-zlib-version-check \ - --with-cflags="-DWITH_XMSS=1" \ - --with-cflags-after="$CFLAGS" \ - --with-ldflags-after="-g $CFLAGS" +if ! env CFLAGS="" ./configure \ + --without-zlib-version-check \ + --with-cflags="-DWITH_XMSS=1" \ + --with-cflags-after="$CFLAGS" \ + --with-ldflags-after="-g $CFLAGS" ; then + echo "------ config.log:" 1>&2 + cat config.log 1>&2 + echo "ERROR: configure failed" 1>&2 + exit 1 +fi make -j$(nproc) all # Build fuzzers