From 9d2f6f861d88688d336f6390fdf831906cfba5a3 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 21 Apr 2021 14:52:53 -0700 Subject: [PATCH] configure: wait to configure ISA-L until all deps are checked Configuring ISA-L takes a bit of time, so it is better to check dependencies early and bail, rather than waiting 10-15 seconds to configure ISA-L, only to then fail because some dependency isn't found. Signed-off-by: Jim Harris Change-Id: I864a941df6517381761c9d4db58e2364c1776e4d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7541 Reviewed-by: Ben Walker Reviewed-by: Aleksey Marchuk Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins --- configure | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 30b96ca68..f117e9bcb 100755 --- a/configure +++ b/configure @@ -678,27 +678,6 @@ if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then fi fi -if [[ "${CONFIG[ISAL]}" = "y" ]]; then - if [ ! -f "$rootdir"/isa-l/autogen.sh ]; then - echo "ISA-L was not found; To install ISA-L run:" - echo " git submodule update --init" - exit 1 - fi - - cd $rootdir/isa-l - ISAL_LOG=$rootdir/isa-l/spdk-isal.log - if [[ -n "${CONFIG[CROSS_PREFIX]}" ]]; then - ISAL_OPTS=("--host=${CONFIG[CROSS_PREFIX]}") - else - ISAL_OPTS=() - fi - echo -n "Configuring ISA-L (logfile: $ISAL_LOG)..." - ./autogen.sh &> $ISAL_LOG - ./configure CFLAGS="-fPIC -g -O2" "${ISAL_OPTS[@]}" --enable-shared=no >> $ISAL_LOG 2>&1 - echo "done." - cd $rootdir -fi - if [[ "${CONFIG[PMDK]}" = "y" ]]; then if ! echo -e '#include \nint main(void) { return 0; }\n' \ | "${BUILD_CMD[@]}" -lpmemblk - 2> /dev/null; then @@ -825,6 +804,27 @@ if [ "${CONFIG[CET]}" = "y" ]; then fi fi +if [[ "${CONFIG[ISAL]}" = "y" ]]; then + if [ ! -f "$rootdir"/isa-l/autogen.sh ]; then + echo "ISA-L was not found; To install ISA-L run:" + echo " git submodule update --init" + exit 1 + fi + + cd $rootdir/isa-l + ISAL_LOG=$rootdir/isa-l/spdk-isal.log + if [[ -n "${CONFIG[CROSS_PREFIX]}" ]]; then + ISAL_OPTS=("--host=${CONFIG[CROSS_PREFIX]}") + else + ISAL_OPTS=() + fi + echo -n "Configuring ISA-L (logfile: $ISAL_LOG)..." + ./autogen.sh &> $ISAL_LOG + ./configure CFLAGS="-fPIC -g -O2" "${ISAL_OPTS[@]}" --enable-shared=no >> $ISAL_LOG 2>&1 + echo "done." + cd $rootdir +fi + # We are now ready to generate final configuration. But first do sanity # check to see if all keys in CONFIG array have its reflection in CONFIG file. if (($(grep -cE "^\s*CONFIG_[[:alnum:]_]+=" "$rootdir/CONFIG") != ${#CONFIG[@]})); then