Closed minrk closed 6 months ago
Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe
) and found it was in an excellent condition.
Thanks for giving this a go @minrk!
/cc @traversaro you might be interested
Currently stuck on CHOLMOD not finding LAPACK symbols:
[285/885] C:\Windows\system32\cmd.exe /C "C:\Windows\system32\cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=CHOLMOD\CMakeFiles\CHOLMOD.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\link.exe /nologo @CMakeFiles\CHOLMOD.rsp /out:CHOLMOD\cholmod.dll /implib:CHOLMOD\cholmod.lib /pdb:CHOLMOD\cholmod.pdb /dll /version:5.2 /machine:x64 /INCREMENTAL:NO /DEF:CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def && cd ."
FAILED: CHOLMOD/cholmod.dll CHOLMOD/cholmod.lib
C:\Windows\system32\cmd.exe /C "C:\Windows\system32\cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=CHOLMOD\CMakeFiles\CHOLMOD.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\link.exe /nologo @CMakeFiles\CHOLMOD.rsp /out:CHOLMOD\cholmod.dll /implib:CHOLMOD\cholmod.lib /pdb:CHOLMOD\cholmod.pdb /dll /version:5.2 /machine:x64 /INCREMENTAL:NO /DEF:CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def && cd ."
LINK: command "C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\link.exe /nologo @CMakeFiles\CHOLMOD.rsp /out:CHOLMOD\cholmod.dll /implib:CHOLMOD\cholmod.lib /pdb:CHOLMOD\cholmod.pdb /dll /version:5.2 /machine:x64 /INCREMENTAL:NO /DEF:CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def /MANIFEST:EMBED,ID=2" failed (exit code 1120) with the following output:
Creating library CHOLMOD\cholmod.lib and object CHOLMOD\cholmod.exp
cholmod_l_super_numeric.c.obj : error LNK2019: unresolved external symbol dtrsm referenced in function rd_cholmod_super_numeric_worker
cholmod_l_super_solve.c.obj : error LNK2001: unresolved external symbol dtrsm
(and so on for all used lapack symbols, I think)
I'm currently looking at the suitesparse-for-windows project we used for 5.4 for inspiration, but what i've tried so far doesn't seem to be working. If anyone has more Windows linking experience than me, feel free to contribute.
I've tried with both netlib and openblas (used in our previous windows build), producing the same result. I suspect this chunk of suitesparse-for-windows is relevant, but don't quite understand it. lapack is linked here.
I also had to exclude SPEX which requires GMP 6.1.2, which appears to be unavailable on Windows. It finds 6.0.0 (I think through MPIR?), but rejects that as too old.
FWIW, the CHOLMOD link line:
[289/885] C:\Windows\system32\cmd.exe /C "C:\Windows\system32\cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=CHOLMOD\CMakeFiles\CHOLMOD.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\link.exe /nologo @CMakeFiles\CHOLMOD.rsp /out:CHOLMOD\cholmod.dll /implib:CHOLMOD\cholmod.lib /pdb:CHOLMOD\cholmod.pdb /dll /version:5.2 /machine:x64 /INCREMENTAL:NO /DEF:CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def && cd ."
lacks any .lib
dependencies, while COLAMD succeeds and has several:
[65/885] C:\Windows\system32\cmd.exe /C "C:\Windows\system32\cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\CCOLAMD\CMakeFiles\CCOLAMD.dir\.\exports.def %SRC_DIR%\build\CCOLAMD\CMakeFiles\CCOLAMD.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=CCOLAMD\CMakeFiles\CCOLAMD.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\link.exe /nologo CCOLAMD\CMakeFiles\CCOLAMD.dir\Source\ccolamd.c.obj CCOLAMD\CMakeFiles\CCOLAMD.dir\Source\ccolamd_l.c.obj CCOLAMD\CMakeFiles\CCOLAMD.dir\Source\ccolamd_version.c.obj /out:CCOLAMD\ccolamd.dll /implib:CCOLAMD\ccolamd.lib /pdb:CCOLAMD\ccolamd.pdb /dll /version:3.3 /machine:x64 /INCREMENTAL:NO /DEF:CCOLAMD\CMakeFiles\CCOLAMD.dir\.\exports.def SuiteSparse_config\suitesparseconfig.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
which I suspect is the issue. I don't really understand what's causing the CHOLMOD to not link its explicitly stated dependencies with target_link_libraries
.
I suspect this chunk of suitesparse-for-windows is relevant, but don't quite understand it.
The cmake_minimum_required version of suitesparse 7 is 3.22 https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/v7.7.0/CMakeLists.txt#L22, so the CMP0022 and CMP0023 should be set to NEW
by that.
For reference, I checked what vcpkg is doing and apparently they are using directly the CMake from suitesparse-for-windows
(see https://github.com/microsoft/vcpkg/blob/cbf4a6641528cee6f172328984576f51698de726/ports/suitesparse/portfile.cmake#L3).
Ok, I was able to build locally without any need to hardcore openblas or similar. I will comment inline with the required modifications.
Ok, I was able to build locally without any need to hardcore openblas or similar. I will comment inline with the required modifications.
Comments added, with these modifications at least the build should end successfully (I did not checked the tests).
Thank you!
@conda-forge-admin please rerender
New fix: https://github.com/conda-forge/suitesparse-feedstock/pull/92/files#r1596523227 .
Problem reported upstream: https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/800 .
Ok, with the latest suggest modifications everything works with mkl, but still fails with netlib due to the linking error.
[289/885] C:\Windows\system32\cmd.exe /C "C:\Windows\system32\cmd.exe /C "%BUILD_PREFIX%\Library\bin\cmake.exe -E __create_def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def %SRC_DIR%\build\CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def.objs && cd %SRC_DIR%\build" && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=CHOLMOD\CMakeFiles\CHOLMOD.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\HostX64\x64\link.exe /nologo @CMakeFiles\CHOLMOD.rsp /out:CHOLMOD\cholmod.dll /implib:CHOLMOD\cholmod.lib /pdb:CHOLMOD\cholmod.pdb /dll /version:5.2 /machine:x64 /INCREMENTAL:NO /DEF:CHOLMOD\CMakeFiles\CHOLMOD.dir\.\exports.def && cd ."
I checked this. The difference here is that the blas.lib and lapack.lib are specified by Ninja in the @CMakeFiles\CHOLMOD.rsp
, but anyhow apparently they are correctly linked.
The problem is that CHOLMOD is looking for dtrsm
, while netlib/openblas library have the dtrsm_
(note the underscore).
The problem is that CHOLMOD is looking for
dtrsm
, while netlib/openblas library have thedtrsm_
(note the underscore).
This seems related: https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/31bdd56256b3d2a7dffaade1fbd074d48489865c/SuiteSparse_config/SuiteSparse_config.h#L538 and https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/722#issuecomment-1885186001 .
The problem is that CHOLMOD is looking for
dtrsm
, while netlib/openblas library have thedtrsm_
(note the underscore).This seems related: https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/31bdd56256b3d2a7dffaade1fbd074d48489865c/SuiteSparse_config/SuiteSparse_config.h#L538 and DrTimothyAldenDavis/SuiteSparse#722 (comment) .
Ok, I think I found the problem. The CMake logic for checking if fortran is available (in https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/31bdd56256b3d2a7dffaade1fbd074d48489865c/LAGraph/cmake_modules/SuiteSparsePolicy.cmake#L280) somehow is not detecting flang, so the logic for handling correctly the fortran mangling in https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/31bdd56256b3d2a7dffaade1fbd074d48489865c/SuiteSparse_config/CMakeLists.txt#L48 is not being used. Forcing CMake to use flang.exe seems to work fine: https://github.com/conda-forge/suitesparse-feedstock/pull/92/files#r1596642507 .
LGTM, thanks @minrk @traversaro!
Wonderful, thank you @traversaro!
Thanks for opening the PR @minrk !
Awesome work! :)
Windows builds haven't been updated since #65
here's hoping it's gotten easier since then
closes #51