Closed Foadsf closed 3 weeks ago
I have cloned the fix-umf4-wrapper branch. The following diff may fix the issue with umfpack.h include.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -653,7 +653,7 @@ ELSE()
ADD_SUBDIRECTORY(umfpack)
SET(HAVE_UMFPACK TRUE)
SET(UMFPACK_LIBRARIES umfpack)
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/umfpack/include)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/umfpack/src/umfpack/include)
ENDIF()
ADD_SUBDIRECTORY(fhutiter)
But now I get a different error which does not seem related to msys2.
Fatal Error: Cannot open module file 'huti_interfaces.mod' for reading at (1): No such file or directory
The CMake build rules seem to be pretty dated.
I applied the following patch on top of your fix-umf4-wrapper
branch to be even able to configure with cmake -DWITH_MPI=OFF -DEXTERNAL_UMFPACK=ON -DWITH_OpenMP=ON -DCMAKE_C_FLAGS="-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration" .. --fresh
:
0001-Some-updates-for-CMake-build-rules.patch
Additionally, I made the following change to fix the build order (what @Biswa96 pointed out) and link to the necessary dependencies: 0002-WIP-build-order-and-library-dependencies.patch That one probably needs to be cleaned up because it looks like some of this is already done conditionally on MPI.
But even with these changes, building the tests (with cmake --build .
) doesn't work:
ninja: build stopped: multiple rules generate fmodules/toroidcurrents.mod.
So, I applied the following patch and configured with cmake -DWITH_MPI=OFF -DEXTERNAL_UMFPACK=ON -DWITH_OpenMP=ON -DCMAKE_C_FLAGS="-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration" -DENABLE_TESTING=OFF .. --fresh
:
0003-optional-tests.patch
With that, building succeeded. But I don't know how to test it now...
I hope that helps.
The new bootstrap.sh has many redundant checks. pacman -S --needed
already checks if a package is installed. pacman -Syu
also shows which packages are being updated.
@Biswa96 and @mmuetzel thanks a lot. Here is a summary of what I did:
git apply path/to/change.patch
mkdir build
and go inside cd build
cmake -DWITH_MPI=OFF -DEXTERNAL_UMFPACK=ON -DWITH_OpenMP=ON -DCMAKE_C_FLAGS="-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration" -DENABLE_TESTING=OFF .. --fresh
cmake --build .
fix-umf4-wrapper
branch, you can get the exact commit with git checkout 5a8b3d1a59583449a4bd7847f48d3d50feb90e1a
Given that you are MSYS2 experts, could you be kind enough to help me fix the bootstrap.sh
bash script? The idea is that anyone with a freshly installed environment should be able to run it to automatically check if it is being run in the right environment if the right dependency packages are installed, and if not install them, and then build and compile automatically.
P.S. Relevant discussion here on MSYS2 Discord
ElmerFEM is building with MSYS2 with the bundled UMFPACK and with the library that is distributed by MSYS2 in CI now.
I guess this could be closed.
Description
I'm encountering persistent issues with UMFPACK integration and the build process in the Windows MSYS2 environment. Despite several attempts to resolve these problems, I'm still facing difficulties in successfully building the project.
Current State
I'm currently on the
fix-umf4-wrapper
branch, commit 743306ef15087aa60b3ebe2c844716f93e809dc2. This branch represents my attempts to resolve UMFPACK-related issues and improve the build process.Steps to Reproduce
Clone the repository and checkout the
fix-umf4-wrapper
branch:Ensure you're in an MSYS2 MinGW 64-bit environment.
Run the bootstrap script:
Current Issues
CMake warns about unused
UMFPACK_ROOT
variable:Build process fails due to missing 'umfpack.h':
Potential issues with CMake configuration and UMFPACK integration.
What I've Tried
bootstrap.sh
to automatically install required packages, including UMFPACK via SuiteSparse.UMFPACK_ROOT
.CMakeLists.txt
files to better handle UMFPACK.Next Steps
I need assistance with:
umfpack.h
header is correctly located and included.Any insights or suggestions would be greatly appreciated. Thank you for your help!