← All tasks
cppRainerKuemmerle/g2o #182Not a task: not reproduced

g2o library doesn't export suitesparse related include headers

envgap__RainerKuemmerle__g2o-182

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
5575db93f5d5790d6422177339e2001205311248
Manifest
g2o/solvers/csparse/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

RainerKuemmerle/g2o #182 · read the original issue
In a client (user) code of this library I need to depend on suitesparse explicitly, `find_package` and add its `_INCLUDE_DIRS` because g2o has headers that include suitesparse headers, but it doesn't export the suitesparse `_INCLUDE_DIRS`.



E.g.:



If I use a `LinearSolverCSparse`, I need to `#include <g2o/solvers/csparse/linear_solver_csparse.h>`.

This header includes `csparse_helper.h`:

https://github.com/RainerKuemmerle/g2o/blob/master/g2o/solvers/csparse/linear_solver_csparse.h#L30

Which includes `cs.h` from suitesparse:

https://github.com/RainerKuemmerle/g2o/blob/master/g2o/solvers/csparse/csparse_helper.h#L23



Since `LinearSolverCSparse` it's a template class, it's not trivial (if possible) to avoid this situation.

Either way, that's not wrong, the problem is that because of this, any client (user) code using this, needs to add the suitesparse headers path. The g2o library should export/add that to its `cflags` (I think), so `-I` has the headers path (as `-L` for libraries); if I knew how to do it, I'd create a PR.



@RainerKuemmerle What do you think?



FYI @v-mehta
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]