Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ceres] fix broken SuiteSparse support, add METIS #43912

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Feb 19, 2025

The main change is to not drop the FindSuiteSparse.cmake and FindMETIS.cmake in the project. FindSuiteSparse is required due to SuiteSparse no longer providing a single config or module by that name and the official CMake configs don't export a SuiteSparse::Partition. The config installed by METIS uses a different capitalization. These CMake modules can probably be avoided with more patching, though.

I also restored a patch for CMakeLists.txt that was removed in #42475, which marks all find_package() calls that have been enabled as strictly REQUIRED. It helps avoid silent failures like SuiteSparse not actually being found.

I added METIS as a dependency for the eigensparse feature, since it gets actually enabled by it but was being silently ignored if not found. It could be moved under an additional feature called eigenmetis to match the CMake option name, though, but METIS functionality is valuable enough for sparse optimization to not separate the two, imo.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@valgur
Copy link
Contributor Author

valgur commented Feb 19, 2025

cc @ahojnnes

@jimwang118 jimwang118 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Feb 19, 2025
@ahojnnes
Copy link
Contributor

Thanks for fixing this and sorry if I messed this up in my last update to latest Ceres.

@valgur valgur marked this pull request as ready for review February 20, 2025 18:21
@jimwang118 jimwang118 self-requested a review February 21, 2025 01:59
@jimwang118
Copy link
Contributor

The following error occurred while installing feature eigensparse.

metis.lib(ometis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_init referenced in function METIS_NodeND
metis.lib(ometis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_cleanup referenced in function METIS_NodeND
metis.lib(options.c.obj) : error LNK2019: unresolved external symbol gk_malloc referenced in function libmetis__SetupCtrl
metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(ometis.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_malloc
metis.lib(minconn.c.obj) : error LNK2019: unresolved external symbol gk_free referenced in function libmetis__EliminateSubDomainEdges
metis.lib(mincover.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(debug.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(ometis.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(compress.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_free
metis.lib(ometis.c.obj) : error LNK2019: unresolved external symbol gk_sigtrap referenced in function METIS_NodeND
metis.lib(ometis.c.obj) : error LNK2019: unresolved external symbol gk_siguntrap referenced in function METIS_NodeND
metis.lib(refine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds

@jimwang118 jimwang118 marked this pull request as draft February 24, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ceres] Ceres on Windows can't find SuiteSparse
3 participants