Ceres 2.2.0 linker error with shared library and Schur specilizations disabled

46 views
Skip to first unread message

Ky Waegel

unread,
Jan 25, 2024, 6:47:23 PMJan 25
to Ceres Solver
I just started testing the Ceres 2.2.0 build,  and I'm getting linker errors on both Windows and Linux platforms using the CMake flags "-DBUILD_SHARED_LIBS=ON -DSCHUR_SPECIALIZATIONS=ON". Has anyone else run into this?

mold: error: undefined symbol: ceres::internal::PartitionedMatrixView<2, -1, -1>::PartitionedMatrixView(ceres::internal::LinearSolver::Options const&, ceres::internal::BlockSparseMatrix const&)
>>> referenced by fake_bundle_adjustment_jacobian.cc
>>>               internal/ceres/CMakeFiles/ceres_internal.dir/fake_bundle_adjustment_jacobian.cc.o:(ceres::internal::CreateFakeBundleAdjustmentPartitionedJacobian(int, int, int, int, double, std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul>&))


-Ky Waegel

Ky Waegel

unread,
Jan 25, 2024, 6:55:26 PMJan 25
to Ceres Solver
It looks like the problem is here: https://ceres-solver.googlesource.com/ceres-solver/+/refs/heads/master/internal/ceres/fake_bundle_adjustment_jacobian.cc#109

The return type is defined as PartitionedMatrixView<2, Eigen::Dynamic, Eigen::Dynamic>, but I think only fully dynamic types are supported if Schur specializations are disabled. If I change that line (and dependent lines) to  PartitionedMatrixView<Eigen::Dynamic , Eigen::Dynamic, Eigen::Dynamic> the linker succeeds.

-Ky Waegel

Sameer Agarwal

unread,
Jan 26, 2024, 12:49:10 PMJan 26
to ceres-...@googlegroups.com
oh this is definitely a bug. 
Thank you for flagging it, I will fix it shortly.
Sameer


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/43eea4ea-7b0c-4610-a36a-91830d180c00n%40googlegroups.com.

Sameer Agarwal

unread,
Jan 26, 2024, 3:02:36 PMJan 26
to ceres-...@googlegroups.com
should be fixed at head. 
Sameer

Reply all
Reply to author
Forward
0 new messages