Bug 267746 - math/ceres-solver: SuiteSparse 6.0.0 is deactivated
Summary: math/ceres-solver: SuiteSparse 6.0.0 is deactivated
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thierry Thomas
URL: https://github.com/ceres-solver/ceres...
Keywords:
Depends on:
Blocks: 267742
  Show dependency treegraph
 
Reported: 2022-11-13 17:07 UTC by Thierry Thomas
Modified: 2022-11-27 11:13 UTC (History)
2 users (show)

See Also:
yuri: maintainer-feedback+


Attachments
Add a patch to find SuiteSparse (1.86 KB, patch)
2022-11-14 21:10 UTC, Thierry Thomas
no flags Details | Diff
Patch from upstream (3.14 KB, patch)
2022-11-17 17:40 UTC, Thierry Thomas
thierry: maintainer-approval? (yuri)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2022-11-13 17:07:02 UTC
Trying to build ceres-solver against the recent SuiteSparse 6.0.0 (see PR 267742) disables SuiteSparse support:

-- Disabling use of Eigen as a sparse linear algebra library.
   This does not affect the covariance estimation algorithm 
   which can still use the EIGEN_SPARSE_QR algorithm.
-- Did not find CUDA library, disabling CUDA support.
-- Found LAPACK library: /usr/local/lib/libopenblas.so;/usr/local/lib/libopenblas.so
-- Found CHOLMOD headers in: /usr/local/include/suitesparse
-- Found CHOLMOD library: /usr/local/lib/libcholmod.so
-- Found SPQR headers in: /usr/local/include/suitesparse
-- Found SPQR library: /usr/local/lib/libspqr.so
-- Found Config headers in: /usr/local/include/suitesparse
-- Found Config library: /usr/local/lib/libsuitesparseconfig.so
-- Found AMD headers in: /usr/local/include/suitesparse
-- Found AMD library: /usr/local/lib/libamd.so
-- Found CAMD headers in: /usr/local/include/suitesparse
-- Found CAMD library: /usr/local/lib/libcamd.so
-- Found CCOLAMD headers in: /usr/local/include/suitesparse
-- Found CCOLAMD library: /usr/local/lib/libccolamd.so
-- Found COLAMD headers in: /usr/local/include/suitesparse
-- Found COLAMD library: /usr/local/lib/libcolamd.so
-- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB.
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Found METIS: /usr/local/include (found version "5.1.0") 
-- Failed to find some/all required components of SuiteSparse.: Found unsuitable version "..", but required is at least "4.0" (found /usr/local/include/suitesparse, found components: CHOLMOD SPQR Config AMD CAMD CCOLAMD COLAMD)
-- Did not find all SuiteSparse dependencies, disabling SuiteSparse support.
-- Found CXSparse: /usr/local/include/suitesparse (found version "4.0.0") 
-- Found CXSparse version: 4.0.0, building with CXSparse.

This problem has been reported at <https://github.com/ceres-solver/ceres-solver/issues/919>.

Remark: the build continues without SuiteSparse, but install fails because two modules are missing.
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2022-11-14 21:10:47 UTC
Created attachment 238079 [details]
Add a patch to find SuiteSparse

With the attached patch, ceres-solver builds fine and enable SuiteSparse 6.0.1.

See <https://github.com/ceres-solver/ceres-solver/issues/919#issuecomment-1314261085>
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-14 21:18:18 UTC
Thank you, Thierry.

Approved. Please commit it.


Yuri
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2022-11-14 21:24:17 UTC
Thanks!
I shall commit it together with PR 267742 if upstream has not released a new version meanwhile.
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2022-11-17 17:40:25 UTC
Created attachment 238143 [details]
Patch from upstream

The previous patch was bad: ceres-solver built successfully, but its cmake module caused an error when configuring openturns.

See <https://github.com/ceres-solver/ceres-solver/issues/919#issuecomment-1317719072>.

Patch from <https://ceres-solver.googlesource.com/ceres-solver/+/5614cb4f415c4275074f0498180bf1d057308a8d%5E%21/>.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-17 18:17:52 UTC
Approved.
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-11-27 11:11:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=20b1cb36dae15be1adeb92f297b5815151999029

commit 20b1cb36dae15be1adeb92f297b5815151999029
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-11-26 18:54:41 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-11-27 11:09:57 +0000

    math/ceres-solver: chase the upgrade of SuiteSparse

    Patch from upstream
    <https://github.com/ceres-solver/ceres-solver/issues/919>.

    PR:             267746
    Approved by:    yuri (maintainer)
    Obtained from:  https://github.com/ceres-solver/ceres-solver/issues/919

 math/ceres-solver/Makefile                         |  1 +
 .../files/patch-cmake_FindSuiteSparse.cmake (new)  | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)
Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2022-11-27 11:13:52 UTC
Committed, thanks!