onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[Build] Unable to build ONNX Runtime 1.22 due to dependency update

Open mc-nv opened this issue 6 months ago • 4 comments

Describe the issue

Release branch version rel-1.22 has a dependency changes and not able to pass the validation.

Urgency

As soon as possible

Target platform

Linux, Windows

Build script

./build.sh --config Release --skip_submodule_sync --parallel --build_shared_lib     --compile_no_warning_as_error --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='75;80;86;89;90;100;120'  --cmake_extra_defines CMAKE_POLICY_VERSION_MINIMUM=3.5  --update --build --use_cuda --cuda_home "/usr/local/cuda" --cudnn_home "/usr" --use_tensorrt --use_tensorrt_builtin_parser --tensorrt_home "/usr/src/tensorrt" --allow_running_as_root --use_openvino CPU

Error / output

Change Dir: '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 
#17 17.96 Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile
#17 17.96 /usr/bin/cmake -S/workspace/build/Release/_deps/eigen3-subbuild -B/workspace/build/Release/_deps/eigen3-subbuild --check-build-system CMakeFiles/Makefile.cmake 0
#17 17.96 /usr/bin/cmake -E cmake_progress_start /workspace/build/Release/_deps/eigen3-subbuild/CMakeFiles /workspace/build/Release/_deps/eigen3-subbuild//CMakeFiles/progress.marks
#17 17.96 /usr/bin/gmake  -f CMakeFiles/Makefile2 all
#17 17.96 gmake[1]: Entering directory '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 /usr/bin/gmake  -f CMakeFiles/eigen3-populate.dir/build.make CMakeFiles/eigen3-populate.dir/depend
#17 17.96 gmake[2]: Entering directory '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 cd /workspace/build/Release/_deps/eigen3-subbuild && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /workspace/build/Release/_deps/eigen3-subbuild /workspace/build/Release/_deps/eigen3-subbuild /workspace/build/Release/_deps/eigen3-subbuild /workspace/build/Release/_deps/eigen3-subbuild /workspace/build/Release/_deps/eigen3-subbuild/CMakeFiles/eigen3-populate.dir/DependInfo.cmake "--color="
#17 17.96 gmake[2]: Leaving directory '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 /usr/bin/gmake  -f CMakeFiles/eigen3-populate.dir/build.make CMakeFiles/eigen3-populate.dir/build
#17 17.96 gmake[2]: Entering directory '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 [ 11%] Creating directories for 'eigen3-populate'
#17 17.96 /usr/bin/cmake -Dcfgdir= -P /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/tmp/eigen3-populate-mkdirs.cmake
#17 17.96 /usr/bin/cmake -E touch /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen3-populate-stamp/eigen3-populate-mkdir
#17 17.96 [ 22%] Performing download step (download, verify and extract) for 'eigen3-populate'
#17 17.96 cd /workspace/build/Release/_deps && /usr/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen3-populate-stamp/download-eigen3-populate.cmake
#17 17.96 -- Downloading...
#17 17.96    dst='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96    timeout='none'
#17 17.96    inactivity timeout='none'
#17 17.96 -- Using src='https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- verifying file...
#17 17.96        file='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- SHA1 hash of
#17 17.96     /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip
#17 17.96   does not match expected value
#17 17.96     expected: '5ea4d05e62d7f954a46b3213f9b2535bdd866803'
#17 17.96       actual: '51982be81bbe52572b54180454df11a3ece9a934'
#17 17.96 -- Hash mismatch, removing...
#17 17.96 -- Using src='https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- verifying file...
#17 17.96        file='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- SHA1 hash of
#17 17.96     /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip
#17 17.96   does not match expected value
#17 17.96     expected: '5ea4d05e62d7f954a46b3213f9b2535bdd866803'
#17 17.96       actual: '51982be81bbe52572b54180454df11a3ece9a934'
#17 17.96 -- Hash mismatch, removing...
#17 17.96 -- Using src='https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- verifying file...
#17 17.96        file='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- SHA1 hash of
#17 17.96     /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip
#17 17.96   does not match expected value
#17 17.96     expected: '5ea4d05e62d7f954a46b3213f9b2535bdd866803'
#17 17.96       actual: '51982be81bbe52572b54180454df11a3ece9a934'
#17 17.96 -- Hash mismatch, removing...
#17 17.96 -- Using src='https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- verifying file...
#17 17.96        file='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- SHA1 hash of
#17 17.96     /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip
#17 17.96   does not match expected value
#17 17.96     expected: '5ea4d05e62d7f954a46b3213f9b2535bdd866803'
#17 17.96       actual: '51982be81bbe52572b54180454df11a3ece9a934'
#17 17.96 -- Hash mismatch, removing...
#17 17.96 -- Using src='https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- verifying file...
#17 17.96        file='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- SHA1 hash of
#17 17.96     /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip
#17 17.96   does not match expected value
#17 17.96     expected: '5ea4d05e62d7f954a46b3213f9b2535bdd866803'
#17 17.96       actual: '51982be81bbe52572b54180454df11a3ece9a934'
#17 17.96 -- Hash mismatch, removing...
#17 17.96 -- Using src='https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- verifying file...
#17 17.96        file='/workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip'
#17 17.96 -- SHA1 hash of
#17 17.96     /workspace/build/Release/_deps/eigen3-subbuild/eigen3-populate-prefix/src/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip
#17 17.96   does not match expected value
#17 17.96     expected: '5ea4d05e62d7f954a46b3213f9b2535bdd866803'
#17 17.96       actual: '51982be81bbe52572b54180454df11a3ece9a934'
#17 17.96 -- Hash mismatch, removing...
#17 17.96 CMake Error at eigen3-subbuild/eigen3-populate-prefix/src/eigen3-populate-stamp/download-eigen3-populate.cmake:163 (message):
#17 17.96   Each download failed!
#17 17.96 
#17 17.96     
#17 17.96     
#17 17.96 
#17 17.96 
#17 17.96 gmake[2]: *** [CMakeFiles/eigen3-populate.dir/build.make:100: eigen3-populate-prefix/src/eigen3-populate-stamp/eigen3-populate-download] Error 1
#17 17.96 gmake[2]: Leaving directory '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 gmake[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/eigen3-populate.dir/all] Error 2
#17 17.96 gmake[1]: Leaving directory '/workspace/build/Release/_deps/eigen3-subbuild'
#17 17.96 gmake: *** [Makefile:91: all] Error 2
#17 17.96 
#17 17.96 
#17 17.96 CMake Error at /usr/share/cmake-4.0/Modules/FetchContent.cmake:1918 (message):
#17 17.96   Build step for eigen3 failed: 2
#17 17.96 Call Stack (most recent call first):
#17 17.96   /usr/share/cmake-4.0/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
#17 17.96   /usr/share/cmake-4.0/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
#17 17.96   /usr/share/cmake-4.0/Modules/FetchContent.cmake:2145 (cmake_language)
#17 17.96   /usr/share/cmake-4.0/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
#17 17.96   external/helper_functions.cmake:22 (FetchContent_MakeAvailable)
#17 17.96   external/eigen.cmake:13 (onnxruntime_fetchcontent_makeavailable)
#17 17.96   external/onnxruntime_external_deps.cmake:536 (include)
#17 17.96   CMakeLists.txt:698 (include)
#17 17.96 
#17 17.96 
#17 17.96 CMake Warning in CMakeLists.txt:
#17 17.96   CMAKE_SKIP_INSTALL_RULES was enabled even though installation rules have
#17 17.96   been specified
#17 17.96 
#17 17.96 
#17 17.96 -- Configuring incomplete, errors occurred!

Visual Studio Version

No response

GCC / Compiler Version

No response

mc-nv avatar Jun 17 '25 22:06 mc-nv

cc: @snnn

mc-nv avatar Jun 17 '25 22:06 mc-nv

yes, it's a known issue.

snnn avatar Jun 18 '25 00:06 snnn

It can go to lower priority or won't do, as long as we can use following as WAR:

sed -i 's/5ea4d05e62d7f954a46b3213f9b2535bdd866803/51982be81bbe52572b54180454df11a3ece9a934/g' cmake/deps.txt

mc-nv avatar Jun 18 '25 00:06 mc-nv

Going forward, the best way to avoid such interruptions is to setup a mirror for all the source tarballs. For example, you may use vcpkg and VCPKG's asset cache to do so: https://onnxruntime.ai/docs/build/dependencies.html

snnn avatar Jun 18 '25 00:06 snnn

I'm trying to use vcpkg, following the onnxruntime docs. However, I'm still getting this error:

-- Loading Dependencies URLs ...
-- Loading Dependencies ...
-- Abseil source dir:/Users/project/src/wasm/modules/onnx/build/Release/_deps/abseil_cpp-src
CMake Deprecation Warning at /Users/project/src/wasm/modules/onnx/build/Release/_deps/protobuf-src/CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- 
-- 3.21.12.0
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Deprecation Warning at /Users/project/src/wasm/modules/onnx/build/Release/_deps/date-src/CMakeLists.txt:18 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Warning (dev) at external/onnxruntime_external_deps.cmake:280 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:698 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR)
Call Stack (most recent call first):
  /Applications/CMake.app/Contents/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  /Applications/CMake.app/Contents/share/cmake-3.31/Modules/FindBoost.cmake:2409 (find_package_handle_standard_args)
  external/onnxruntime_external_deps.cmake:280 (find_package)
  CMakeLists.txt:698 (include)

Andonvr avatar Jun 21 '25 16:06 Andonvr

(To me, the whole issue with "Each download failed" is not only on the "rel-1.22" branch, btw. I'm on tags/v1.22.0.) [Edit: Just noticed how nonsensical my statement was]

Andonvr avatar Jun 21 '25 16:06 Andonvr

@Andonvr , the support for building wasm with vcpkg was incomplete in the last release. Please try the latest main.

snnn avatar Jun 21 '25 17:06 snnn

Switched to main, and am still getting the error about Boost.

Also, I'm not sure I completely understand: In a previous setup I used v1.19.2 without vcpkg. Now that the hashes don't match anymore, and vcpkg not working, will I actually be able to build it again at some point? Is the hashes not matching just a temporal thing that can be fixed?

Andonvr avatar Jun 22 '25 10:06 Andonvr

I think the initial error posted about eigen was fixed here: https://github.com/microsoft/onnxruntime/pull/24884 latest works for me.

cjm715 avatar Jul 09 '25 22:07 cjm715

Is the hashes not matching just a temporal thing that can be fixed?

Not temporal. The file on gitlab server was changed. Maybe the file content didn't change, but the compressed file was changed.

snnn avatar Jul 09 '25 23:07 snnn

Fixed in 1.22.1 patch release.

snnn avatar Jul 15 '25 20:07 snnn