ONNX Runtime Compilation Interrupted Due to Eigen Library Download Failure
Symptom
During ONNX Runtime compilation, the Eigen library download fails. As a result, the compilation process is interrupted, and the following error message is displayed:
-- Hash mismatch, removing...
-- Using src='https://gitlab.com/libeigen/eigen/-/archive/e7248b26a1ed53fa030c5c459f7ea095dfd276ac/eigen-e7248b26a1ed53fa030c5c459f7ea095dfd276ac.zip'
-- verifying file...
file='/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/build/RelWithDebInfo/_deps/eigen-subbuild/eigen-populate-prefix/src/eigen-e7248b26a1ed53fa030c5c459f7ea095dfd276ac.zip'
-- SHA1 hash of
/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/build/RelWithDebInfo/_deps/eigen-subbuild/eigen-populate-prefix/src/eigen-e7248b26a1ed53fa030c5c459f7ea095dfd276ac.zip
does not match expected value
expected: 'be8be39fdbc6e60e94fa7870b280707069b5b81a'
actual: '32b145f525a8308d7ab1c09388b2e288312d8eba'
-- Hash mismatch, removing...
CMake Error at eigen-subbuild/eigen-populate-prefix/src/eigen-populate-stamp/download-eigen-populate.cmake:163 (message):
Each download failed!
gmake[2]: *** [CMakeFiles/eigen-populate.dir/build.make:100: eigen-populate-prefix/src/eigen-populate-stamp/eigen-populate-download] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/eigen-populate.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
CMake Error at /home/rrx/usr/cmake-3.30.0/Modules/FetchContent.cmake:1918 (message):
Build step for eigen failed: 2
Call Stack (most recent call first):
/home/rrx/usr/cmake-3.30.0/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
/home/rrx/usr/cmake-3.30.0/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
/home/rrx/usr/cmake-3.30.0/Modules/FetchContent.cmake:2145 (cmake_language)
/home/rrx/usr/cmake-3.30.0/Modules/FetchContent.cmake:1978:EVAL:1 (__FetchContent_Populate)
/home/rrx/usr/cmake-3.30.0/Modules/FetchContent.cmake:1978 (cmake_language)
external/eigen.cmake:12 (FetchContent_Populate)
external/onnxruntime_external_deps.cmake:500 (include)
CMakeLists.txt:598 (include)
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/tools/ci_build/build.py", line 2971, in <module>
sys.exit(main())
File "/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/tools/ci_build/build.py", line 2826, in main
generate_build_tree(
File "/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/tools/ci_build/build.py", line 1664, in generate_build_tree
run_subprocess(
File "/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/tools/ci_build/build.py", line 860, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/tools/python/util/run.py", line 49, in run
completed_process = subprocess.run(
File "/usr/lib64/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/rrx/usr/cmake-3.30.0/bin/cmake', '/home/rrx/testKonnx/onnxruntime/onnxruntime-1.19.2/cmake', '--compile-no-warning-as-error', '-Donnxruntime_RUN_ONNX_TESTS=OFF', '-Donnxruntime_GENERATE_TEST_REPORTS=ON', '-DPython_EXECUTABLE=/bin/python3', '-DPYTHON_EXECUTABLE=/bin/python3', '-Donnxruntime_USE_MIMALLOC=OFF', '-Donnxruntime_ENABLE_PYTHON=OFF', '-Donnxruntime_BUILD_CSHARP=OFF', '-Donnxruntime_BUILD_JAVA=OFF', '-Donnxruntime_BUILD_NODEJS=OFF', '-Donnxruntime_BUILD_OBJC=OFF', '-Donnxruntime_BUILD_SHARED_LIB=ON', '-Donnxruntime_BUILD_APPLE_FRAMEWORK=OFF', '-Donnxruntime_USE_DNNL=OFF', '-Donnxruntime_USE_NNAPI_BUILTIN=OFF', '-Donnxruntime_USE_VSINPU=OFF', '-Donnxruntime_USE_RKNPU=OFF', '-Donnxruntime_USE_LLVM=OFF', '-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF', '-Donnxruntime_USE_VITISAI=OFF', '-Donnxruntime_USE_TENSORRT=OFF', '-Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON', '-Donnxruntime_USE_TVM=OFF', '-Donnxruntime_TVM_CUDA_RUNTIME=OFF', '-Donnxruntime_TVM_USE_HASH=OFF', '-Donnxruntime_USE_MIGRAPHX=OFF', '-Donnxruntime_DISABLE_CONTRIB_OPS=OFF', '-Donnxruntime_DISABLE_ML_OPS=OFF', '-Donnxruntime_DISABLE_RTTI=OFF', '-Donnxruntime_DISABLE_EXCEPTIONS=OFF', '-Donnxruntime_MINIMAL_BUILD=OFF', '-Donnxruntime_EXTENDED_MINIMAL_BUILD=OFF', '-Donnxruntime_MINIMAL_BUILD_CUSTOM_OPS=OFF', '-Donnxruntime_REDUCED_OPS_BUILD=OFF', '-Donnxruntime_USE_DML=OFF', '-Donnxruntime_USE_WINML=OFF', '-Donnxruntime_BUILD_MS_EXPERIMENTAL_OPS=OFF', '-Donnxruntime_USE_TELEMETRY=OFF', '-Donnxruntime_ENABLE_LTO=OFF', '-Donnxruntime_USE_ACL=OFF', '-Donnxruntime_USE_ACL_1902=OFF', '-Donnxruntime_USE_ACL_1905=OFF', '-Donnxruntime_USE_ACL_1908=OFF', '-Donnxruntime_USE_ACL_2002=OFF', '-Donnxruntime_USE_ACL_2308=OFF', '-Donnxruntime_USE_ARMNN=OFF', '-Donnxruntime_ARMNN_RELU_USE_CPU=ON', '-Donnxruntime_ARMNN_BN_USE_CPU=ON', '-Donnxruntime_USE_JSEP=OFF', '-Donnxruntime_ENABLE_NVTX_PROFILE=OFF', '-Donnxruntime_ENABLE_TRAINING=OFF', '-Donnxruntime_ENABLE_TRAINING_OPS=OFF', '-Donnxruntime_ENABLE_TRAINING_APIS=OFF', '-Donnxruntime_ENABLE_CPU_FP16_OPS=OFF', '-Donnxruntime_USE_NCCL=OFF', '-Donnxruntime_BUILD_BENCHMARKS=OFF', '-Donnxruntime_USE_ROCM=OFF', '-Donnxruntime_GCOV_COVERAGE=OFF', '-Donnxruntime_USE_MPI=OFF', '-Donnxruntime_ENABLE_MEMORY_PROFILE=OFF', '-Donnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO=OFF', '-Donnxruntime_USE_CUDA_NHWC_OPS=OFF', '-Donnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING=ON', '-Donnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING=ON', '-Donnxruntime_WEBASSEMBLY_RUN_TESTS_IN_BROWSER=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=OFF', '-Donnxruntime_ENABLE_LAZY_TENSOR=OFF', '-Donnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS=OFF', '-Donnxruntime_ENABLE_CUDA_PROFILING=OFF', '-Donnxruntime_ENABLE_ROCM_PROFILING=OFF', '-Donnxruntime_USE_XNNPACK=OFF', '-Donnxruntime_USE_WEBNN=OFF', '-Donnxruntime_USE_CANN=OFF', '-Donnxruntime_USE_TRITON_KERNEL=OFF', '-Donnxruntime_DISABLE_FLOAT8_TYPES=OFF', '-Donnxruntime_DISABLE_SPARSE_TENSORS=OFF', '-Donnxruntime_DISABLE_OPTIONAL_TYPE=OFF', '-DCMAKE_OSX_ARCHITECTURES=arm64', '-DCMAKE_TLS_VERIFY=ON', '-DFETCHCONTENT_QUIET=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DCMAKE_PREFIX_PATH=build/RelWithDebInfo/installed']' returned non-zero exit status 1.
Key Process and Cause Analysis
During the Eigen library download, a hash mismatch occurs, causing the download to fail. CMake expects the SHA1 hash value be8be39fdbc6e60e94fa7870b280707069b5b81a, but the downloaded file has SHA1 32b145f525a8308d7ab1c09388b2e288312d8eba.
Conclusion and Solution
Search for the expected hash value in the ONNX Runtime source code and replace it with the actual downloaded value.
- Go to the /path/to/ONNX_Runtime/onnxruntime-1.19.2 directory.
cd /path/to/ONNX_Runtime/onnxruntime-1.19.2
- Search for the file that contains the expected hash value.
grep -r "be8be39fdbc6e60e94fa7870b280707069b5b81a" .
Command output:

- Replace it with the actual hash value.
grep -r "be8be39fdbc6e60e94fa7870b280707069b5b81a" . | cut -d: -f1 | sort -u | xargs sed -i.bak 's/be8be39fdbc6e60e94fa7870b280707069b5b81a/32b145f525a8308d7ab1c09388b2e288312d8eba/g'
- Recompile ONNX Runtime.
Parent topic: Troubleshooting