-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Description
svMultiPhysics integration tests suddenly started failing due to a build error in svZeroDSolver (when svMultiPhysics git clones and builds it). You can see the build error logs in this current PR.
Already on 'master'
Your branch is up to date with 'origin/master'.
[ 33%] Performing update step for 'eigen-populate'
fatal: No rebase in progress?
error: Your local changes to the following files would be overwritten by merge:
debug/msvc/eigen.natvis
debug/msvc/eigen_autoexp_part.dat
Please commit your changes or stash them before you merge.
Aborting
Index was not unstashed.
The stash entry is kept in case you need it again.
CMake Error at /__w/svMultiPhysics/svMultiPhysics/svZeroDSolver/build/_deps/eigen-subbuild/eigen-populate-prefix/tmp/eigen-populate-gitupdate.cmake:216 (message):
Failed to rebase in:
'/__w/svMultiPhysics/svMultiPhysics/svZeroDSolver/build/_deps/eigen-src'.
Output from the attempted rebase follows:
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
You will have to resolve the conflicts manually
gmake[2]: *** [CMakeFiles/eigen-populate.dir/build.make:133: eigen-populate-prefix/src/eigen-populate-stamp/eigen-populate-update] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/eigen-populate.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
CMake Error at /cmake/share/cmake-3.29/Modules/FetchContent.cmake:1714 (message):
Build step for eigen failed: 2
Call Stack (most recent call first):
/cmake/share/cmake-3.29/Modules/FetchContent.cmake:1854:EVAL:2 (__FetchContent_directPopulate)
/cmake/share/cmake-3.29/Modules/FetchContent.cmake:1854 (cmake_language)
/cmake/share/cmake-3.29/Modules/FetchContent.cmake:2081 (FetchContent_Populate)
CMakeLists.txt:80 (FetchContent_MakeAvailable)
-- Configuring incomplete, errors occurred!
This is saying that CMake is fetching Eigen, then git pulling Eigen again. Upon pulling, it encounters a merge conflict in debug/msvc/eigen.natvis and debug/msvc/eigen_autoexp_part.dat. According to chatGPT, these are likely meaningless file format changes, probably line endings.
This was almost certainly triggered by this Eigen commit earlier today.
Reproduction
Rerun the integration tests for a current svMultiPhysics PR, such as https://github.com/SimVascular/svMultiPhysics/actions/runs/17996284788/job/51196368039?pr=437.
Expected behavior
svZeroDSolver should build successfully.
Additional context
I did a little digging and chatGPT prompting, and here is a suggested solution to try. In svZeroDSolver/CMakeLists.txt, where Eigen is fetched, add set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE) to prevent FetchContent from rechecking for updates once Eigen is downloaded. Here is a proposed solution snippet for CMakeLists.txt
# -----------------------------------------------------------------------------
# Fetch Eigen
# -----------------------------------------------------------------------------
# Eigen is a header-only C++ template library for linear algebra.
include(FetchContent)
# Tell FetchContent not to re-check for updates once Eigen is downloaded
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
FetchContent_Declare(
Eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG master
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
# Disable Eigen features we don't need
set(EIGEN_BUILD_DOC OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(Eigen)
Code of Conduct
- I agree to follow this project's Code of Conduct and Contributing Guidelines