From 26a811f7a55364d557ccdc2d9b6cccb0bfb89c39 Mon Sep 17 00:00:00 2001 From: Christoph Herrmann Date: Mon, 22 Sep 2025 10:03:40 +1000 Subject: [PATCH] Fix openblas related errors in configuration When running the configuration, two issues can arise: 1. The script searches for the OpenBLAS libraries in ./tools/OpenBLAS/install yet the default scripts lead to this being created in ./tools/extras/OpenBLAS/install 2. When compiling statically, the flag for -lgfortran is added without space, leading to the configuration trying to link -l:libopenblas.a-lgfortran as one string --- src/configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure b/src/configure index 1dc564e1030..5e1e55d4993 100755 --- a/src/configure +++ b/src/configure @@ -1351,7 +1351,7 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)." # --openblas-root fails fatally if the path does not exist, so we trust # that if set, the variable contains the existing path, converted to # absolute form). - OPENBLASROOT="$(rel2abs ../tools/OpenBLAS/install)" || + OPENBLASROOT="$(rel2abs ../tools/extras/OpenBLAS/install)" || Die "OpenBLAS not found in '../tools/OpenBLAS/install'. ** This is the only place we look for it. The best option is to build OpenBLAS ** tuned for your system and CPU. To do that, run the following commands: @@ -1389,7 +1389,7 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)." OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a" # No Fortran for OpenBLAS if [[ "$HOST" != WASM ]]; then - OPENBLASLIBS+="-lgfortran" + OPENBLASLIBS+=" -lgfortran" fi else if [ -f $OPENBLASROOT/lib/libopenblas.so ]; then