Skip to content

Fix OpenBLAS install script avoid GitHub API JSON parsing#4985

Open
weimeng23 wants to merge 2 commits into
kaldi-asr:masterfrom
weimeng23:fix-extras-install-openblas
Open

Fix OpenBLAS install script avoid GitHub API JSON parsing#4985
weimeng23 wants to merge 2 commits into
kaldi-asr:masterfrom
weimeng23:fix-extras-install-openblas

Conversation

@weimeng23

Copy link
Copy Markdown

Summary

This PR improves tools/extras/install_openblas.sh by avoiding the GitHub API call used to resolve the OpenBLAS tarball URL.

The previous implementation fetched release metadata from the GitHub API and parsed tarball_url with Python:

wget -qO- "https://api.github.com/repos/OpenMathLib/OpenBLAS/releases/tags/v${OPENBLAS_VERSION}" \
  | python3 -c 'import sys,json;print(json.load(sys.stdin)["tarball_url"])'

On some environments, especially machines with restricted network access, proxy issues, GitHub API rate limits, or temporary API failures, this command may return empty or non-JSON content. In that case, the script fails with an error like:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Change

Instead of querying the GitHub API, this PR downloads the OpenBLAS release tarball directly from the stable tag archive URL:

https://github.com/OpenMathLib/OpenBLAS/archive/refs/tags/v${OPENBLAS_VERSION}.tar.gz

The script now uses the known OPENBLAS_VERSION value directly to construct the download URL.

Testing

Tested by running:

cd tools
bash extras/install_openblas.sh

Before this change, the script failed with:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

After this change, the script downloads the OpenBLAS tarball directly and proceeds to build/install OpenBLAS successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant