DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.15k stars 259 forks source link

Mongoose: Fix linking errors reported by Visual Studio 2022 #686

Closed whuaegeanse closed 8 months ago

whuaegeanse commented 8 months ago

Linking errors reported by Visual Studio 2022

mongoose.obj : error LNK2019: 无法解析的外部符号 "private: static float * Mongoose::Logger::times" (?times@Logger@Mongoose@@0PAMA),函数 main 中 引用了该符号 [F:\Li bs\suitesparse\SuiteSparse-dev2-x64\Mongoose\build\mongoose_exe.vcxproj] F:\Libs\suitesparse\SuiteSparse-dev2-x64\Mongoose\build\Release\suitesparse_mongoose.exe : fatal error LNK1120: 1 个无法解析的外部命令 [F:\Libs\suitespars e\SuiteSparse-dev2-x64\Mongoose\build\mongoose_exe.vcxproj]

linking-errors

mmuetzel commented 8 months ago

Hmm... We didn't see that error in CI. How did you configure and build SuiteSparse to reproduce the error?

DrTimothyAldenDavis commented 8 months ago

I'm happy to make this change; it's a fairly simple one and I doubt it would affect performance. But it would be helpful to understand why it's occurring.

DrTimothyAldenDavis commented 8 months ago

However, if you can't figure out why the error is occurring, it would still be a good idea to make this change. Both the existing static inline methods, and your revised functions, work just fine for MSVC in the CI tests on github. So either way is fine with me, from that perspective.

So it would make sense to fix this for your case. Others might encounter the same issue sometime. MS Visual Studio can be a nightmare ...

It's just that knowing why it's different might help for other cases.

whuaegeanse commented 8 months ago

@DrTimothyAldenDavis @mmuetzel

  1. My configure SuiteSparse is built with following options.
 -DBUILD_SHARED_LIBS=ON
 -DBUILD_STATIC_LIBS=OFF

It means that static libs are not built.

  1. Global data symbols For function symbols, WINDOWS_EXPORT_ALL_SYMBOLS works well for MS-compatible tools on Windows. Global data symbols should be imported when compiling against the code in the shared libs.
New in version 3.4.

This property is implemented only for MS-compatible tools on Windows.

Enable this boolean property to automatically create a module definition (.def) file with all global symbols found in the input .obj files for a SHARED library (or executable with [ENABLE_EXPORTS](https://cmake.org/cmake/help/latest/prop_tgt/ENABLE_EXPORTS.html#prop_tgt:ENABLE_EXPORTS)) on Windows. The module definition file will be passed to the linker causing all symbols to be exported from the .dll. For global data symbols, __declspec(dllimport) must still be used when compiling against the code in the .dll. All other function symbols will be automatically exported and imported by callers. This simplifies porting projects to Windows by reducing the need for explicit dllexport markup, even in C++ classes.

When this property is enabled, zero or more .def files may also be specified as source files of the target. The exports named by these files will be merged with those detected from the object files to generate a single module definition file to be passed to the linker. This can be used to export symbols from a .dll that are not in any of its object files but are added by the linker from dependencies (e.g. msvcrt.lib).

This property is initialized by the value of the [CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS](https://cmake.org/cmake/help/latest/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html#variable:CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS) variable if it is set when a target is created.
  1. The CI does not cover the case The CI builds both shared libs and static libs. The CMakelist.txt links static libraries with higher priority than shared libs. Therefore, msvc in ci does not report link errors.

The logs of msvc (with OpenMP with CUDA)

==> Installing libraries
-- Install configuration: "Release"
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/suitesparseconfig.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/suitesparseconfig.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparse_config.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/suitesparseconfig_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparse_config.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparseBLAS.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparseBLAS32.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparseBLAS[64](https://github.com/DrTimothyAldenDavis/SuiteSparse/actions/runs/7400259929/job/20133521586?pr=686#step:21:65).cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparseLAPACK.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparsePolicy.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparseReport.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse/SuiteSparse__thread.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_config/SuiteSparse_configTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_config/SuiteSparse_configTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_config/SuiteSparse_configConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_config/SuiteSparse_configConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/suitesparse_mongoose.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/suitesparse_mongoose.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/Mongoose.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/suitesparse_mongoose_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/Mongoose.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/suitesparse_mongoose.exe
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_Mongoose/SuiteSparse_MongooseTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_Mongoose/SuiteSparse_MongooseTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_Mongoose/SuiteSparse_MongooseConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_Mongoose/SuiteSparse_MongooseConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/amd.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/amd.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/amd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/amd_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/amd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/AMD/AMDTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/AMD/AMDTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/AMD/AMDConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/AMD/AMDConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/btf.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/btf.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/btf.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/btf_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/btf.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/BTF/BTFTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/BTF/BTFTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/BTF/BTFConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/BTF/BTFConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/camd.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/camd.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/camd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/camd_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/camd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CAMD/CAMDTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CAMD/CAMDTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CAMD/CAMDConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CAMD/CAMDConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/ccolamd.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/ccolamd.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ccolamd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/ccolamd_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ccolamd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CCOLAMD/CCOLAMDTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CCOLAMD/CCOLAMDTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CCOLAMD/CCOLAMDConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CCOLAMD/CCOLAMDConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/colamd.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/colamd.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/colamd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/colamd_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/colamd.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/COLAMD/COLAMDTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/COLAMD/COLAMDTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/COLAMD/COLAMDConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/COLAMD/COLAMDConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cholmod.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/cholmod.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/cholmod.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cholmod_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/cholmod.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CHOLMOD/CHOLMODTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CHOLMOD/CHOLMODTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CHOLMOD/CHOLMODConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CHOLMOD/CHOLMODConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cxsparse.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/cxsparse.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/cs.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cxsparse_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/cs.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CXSparse/CXSparseTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CXSparse/CXSparseTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CXSparse/CXSparseConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/CXSparse/CXSparseConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/ldl.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/ldl.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ldl.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/ldl_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ldl.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LDL/LDLTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LDL/LDLTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LDL/LDLConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LDL/LDLConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/klu.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/klu.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/klu.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/klu_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/klu.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU/KLUTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU/KLUTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU/KLUConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU/KLUConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/klu_cholmod.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/klu_cholmod.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/klu_cholmod.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/klu_cholmod_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/klu_cholmod.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU_CHOLMOD/KLU_CHOLMODTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU_CHOLMOD/KLU_CHOLMODTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU_CHOLMOD/KLU_CHOLMODConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/KLU_CHOLMOD/KLU_CHOLMODConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/umfpack.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/umfpack.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/umfpack.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/umfpack_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/umfpack.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/UMFPACK/UMFPACKTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/UMFPACK/UMFPACKTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/UMFPACK/UMFPACKConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/UMFPACK/UMFPACKConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/paru.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/paru.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ParU.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ParU_C.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ParU_definitions.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/ParU_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ParU.hpp
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ParU_C.h
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/ParU_definitions.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/ParU/ParUTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/ParU/ParUTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/ParU/ParUConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/ParU/ParUConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/rbio.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/rbio.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/RBio.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/rbio_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/RBio.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/RBio/RBioTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/RBio/RBioTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/RBio/RBioConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/RBio/RBioConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/suitesparse_gpuruntime.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/suitesparse_gpuruntime.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparse_GPURuntime.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/suitesparse_gpuruntime_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparse_GPURuntime.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_GPURuntime/SuiteSparse_GPURuntimeTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_GPURuntime/SuiteSparse_GPURuntimeTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_GPURuntime/SuiteSparse_GPURuntimeConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SuiteSparse_GPURuntime/SuiteSparse_GPURuntimeConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/gpuqrengine.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/gpuqrengine.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/GPUQREngine.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/gpuqrengine_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/GPUQREngine.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GPUQREngine/GPUQREngineTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GPUQREngine/GPUQREngineTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GPUQREngine/GPUQREngineConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GPUQREngine/GPUQREngineConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/spqr.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/spqr.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/spqr_static.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparseQR_C.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparseQR_definitions.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SuiteSparseQR.hpp
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPQR/SPQRTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPQR/SPQRTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPQR/SPQRConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPQR/SPQRConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/spex.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/spex.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SPEX.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/spex_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/SPEX.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPEX/SPEXTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPEX/SPEXTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPEX/SPEXConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPEX/SPEXConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPEX/FindGMP.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/SPEX/FindMPFR.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/graphblas.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/graphblas.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/GraphBLAS.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GraphBLAS/GraphBLASTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GraphBLAS/GraphBLASTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GraphBLAS/GraphBLASConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/GraphBLAS/GraphBLASConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/lagraph.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/lagraph.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/LAGraph.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/lagraphx.lib
-- Installing: D:/a/SuiteSparse/SuiteSparse/bin/lagraphx.dll
-- Installing: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/LAGraphX.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/lagraph_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/LAGraph.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/lagraphx_static.lib
-- Up-to-date: D:/a/SuiteSparse/SuiteSparse/include/suitesparse/LAGraphX.h
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LAGraph/LAGraphTargets.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LAGraph/LAGraphTargets-release.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LAGraph/LAGraphConfig.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LAGraph/LAGraphConfigVersion.cmake
-- Installing: D:/a/SuiteSparse/SuiteSparse/lib/cmake/LAGraph/FindGraphBLAS.cmake
whuaegeanse commented 8 months ago

@mmuetzel The CI logs are inconsistent with the build document, because the document states that static libraries are not built by default. The CI should be modified to support three types: static libs, shared libs, static and shared libs.

mmuetzel commented 8 months ago

Thank you for clarifying your configuration. I can reproduce the issue locally. I'm working on a fix that should bring Mongoose more in line with the other sub-projects when it comes to the preference of shared linking.

the document states that static libraries are not built by default.

That might be a documentation issue. Could you please point to where it states that static libraries are not built by default?

The CI should be modified to support three types: static libs, shared libs, static and shared libs.

That should no longer be necessary once Mongoose also starts to prefer shared linking over static linking.

whuaegeanse commented 8 months ago

That might be a documentation issue. Could you please point to where it states that static libraries are not built by default?

Oh, I'm so sorry. It's my fault. Since my own build script is configured with -DBUILD_STATIC_LIBS=OFF, I confused its relationship with SuiteSparse's Cmakelist.txt.

mmuetzel commented 8 months ago

That should no longer be necessary once Mongoose also starts to prefer shared linking over static linking.

Should we add new

My reasoning for not adding CI that builds shared-only was that everything should be linking with shared libraries if shared and static libraries are built. (Turns out that wasn't the case for Mongoose. But it should be if #695 is accepted.)

It might be worth adding a runner that builds only static libraries with MSVC though...

whuaegeanse commented 8 months ago

It might be worth adding a runner that builds only static libraries with MSVC though...

Good idea.

DrTimothyAldenDavis commented 8 months ago

@whuaegeanse: Thanks for the feedback and your help in catching this issue, and thanks for the fix, @mmuetzel .