Package Details: ceres-solver 2.1.0-1

Git Clone URL: https://aur.archlinux.org/ceres-solver.git (read-only, click to copy)
Package Base: ceres-solver
Description: Solver for nonlinear least squares problems
Upstream URL: http://ceres-solver.org/
Licenses: LGPL
Submitter: dtag
Maintainer: dtag
Last Packager: dtag
Votes: 19
Popularity: 0.27
First Submitted: 2015-11-27 09:36 (UTC)
Last Updated: 2022-03-29 06:23 (UTC)

Latest Comments

dtag commented on 2021-12-11 07:06 (UTC)

@xantares: Done @bartus: Done

xantares commented on 2021-12-10 20:20 (UTC) (edited on 2021-12-10 22:05 (UTC) by xantares)

hello,

it fails to build since the tbb update, could you backport that commit ?

https://github.com/ceres-solver/ceres-solver/commit/941ea13475913ef8322584f7401633de9967ccc8

bartus commented on 2021-08-31 13:07 (UTC) (edited on 2021-08-31 13:12 (UTC) by bartus)

Could we have eigen version pined during build to prevent desync of eigen and ceres resulting in a cmake error:

CMake Error at /usr/lib64/cmake/Ceres/CeresConfig.cmake:85 (message):
Failed to find Ceres - Found Eigen dependency, but the version of Eigen
found (3.4.0) does not exactly match the version of Eigen Ceres was
compiled with (3.3.9).  This can cause subtle bugs by triggering violations
of the One Definition Rule.  See the Wikipedia article
http://en.wikipedia.org/wiki/One_Definition_Rule for more details

Sample implementation (future-proof yet sane ;) : http://ix.io/3xxk/diff

Merge with git am -s < <(curl -s http://ix.io/3xxk)

dtag commented on 2020-11-02 14:15 (UTC) (edited on 2020-11-02 14:16 (UTC) by dtag)

@greve: I have changed the PKGBUILD accordingly. Please try reinstalling.

greve commented on 2020-11-01 13:17 (UTC)

@dtag: Yes, it builds when adding the -DBUILD_BENCHMARKS=OFF flag to the cmake command.

dtag commented on 2020-10-31 07:17 (UTC) (edited on 2020-10-31 07:20 (UTC) by dtag)

@greve: I have looked into this. The errror-causing files are related to benchmarking functionality within ceres. This benchmarking part is only built when the Google 'benchmark' library is found. (At least, the AUR version benchmark-git does not appear to compile for me.) Why your seemingly valid configuration gets you these unresolved externals is not quite clear to me, but you could try to avoid the issue by adding -D BUILD_BENCHMARKS=OFF to see if that fixes things for you? If it does, I think we could just add BUILD_BENCHMARKS=OFF to the PKGBUILD, as I do not believe it is required for any functionality.

greve commented on 2020-10-30 23:43 (UTC) (edited on 2020-10-31 00:01 (UTC) by greve)

Error when compiling (already retried with cleaned cache). Using yay:

[ 92%] Building CXX object internal/ceres/CMakeFiles/ceres.dir/generated/schur_eliminator_d_d_d.cc.o
[ 93%] Linking CXX shared library ../../lib/libceres.so
[ 93%] Built target ceres
Scanning dependencies of target schur_eliminator_benchmark
[ 93%] Building CXX object internal/ceres/CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o
/home/nico/.cache/yay/ceres-solver/src/ceres-solver-2.0.0/internal/ceres/schur_eliminator_benchmark.cc:130:6: warning: no previous declaration for ‘void ceres::internal::BM_SchurEliminatorEliminate(benchmark::State&)’ [-Wmissing-declarations]
  130 | void BM_SchurEliminatorEliminate(benchmark::State& state) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nico/.cache/yay/ceres-solver/src/ceres-solver-2.0.0/internal/ceres/schur_eliminator_benchmark.cc:153:6: warning: no previous declaration for ‘void ceres::internal::BM_SchurEliminatorBackSubstitute(benchmark::State&)’ [-Wmissing-declarations]
  153 | void BM_SchurEliminatorBackSubstitute(benchmark::State& state) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nico/.cache/yay/ceres-solver/src/ceres-solver-2.0.0/internal/ceres/schur_eliminator_benchmark.cc:181:6: warning: no previous declaration for ‘void ceres::internal::BM_SchurEliminatorForOneFBlockEliminate(benchmark::State&)’ [-Wmissing-declarations]
  181 | void BM_SchurEliminatorForOneFBlockEliminate(benchmark::State& state) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nico/.cache/yay/ceres-solver/src/ceres-solver-2.0.0/internal/ceres/schur_eliminator_benchmark.cc:195:6: warning: no previous declaration for ‘void ceres::internal::BM_SchurEliminatorForOneFBlockBackSubstitute(benchmark::State&)’ [-Wmissing-declarations]
  195 | void BM_SchurEliminatorForOneFBlockBackSubstitute(benchmark::State& state) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 94%] Linking CXX executable ../../bin/schur_eliminator_benchmark
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BM_SchurEliminatorEliminate(benchmark::State&)':
schur_eliminator_benchmark.cc:(.text+0x65): undefined reference to `ceres::internal::ThreadPool::ThreadPool()'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x109): undefined reference to `ceres::internal::SchurEliminatorBase::Create(ceres::internal::LinearSolver::Options const&)'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x11e): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x3a1): undefined reference to `ceres::internal::ThreadPool::~ThreadPool()'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x484): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BM_SchurEliminatorBackSubstitute(benchmark::State&)':
schur_eliminator_benchmark.cc:(.text+0x675): undefined reference to `ceres::internal::ThreadPool::ThreadPool()'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x719): undefined reference to `ceres::internal::SchurEliminatorBase::Create(ceres::internal::LinearSolver::Options const&)'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x72e): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x92b): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0xa11): undefined reference to `ceres::internal::ThreadPool::~ThreadPool()'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0xaf2): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BM_SchurEliminatorForOneFBlockEliminate(benchmark::State&)':
schur_eliminator_benchmark.cc:(.text+0xd22): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x1065): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BM_SchurEliminatorForOneFBlockBackSubstitute(benchmark::State&)':
schur_eliminator_benchmark.cc:(.text+0x1262): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text+0x147f): undefined reference to `ceres::internal::BlockSparseMatrix::block_structure() const'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o:schur_eliminator_benchmark.cc:(.text+0x15f5): more undefined references to `ceres::internal::BlockSparseMatrix::block_structure() const' follow
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::ContextImpl::~ContextImpl()':
schur_eliminator_benchmark.cc:(.text._ZN5ceres8internal11ContextImplD2Ev[_ZN5ceres8internal11ContextImplD5Ev]+0x11): undefined reference to `ceres::internal::ThreadPool::~ThreadPool()'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::ContextImpl::~ContextImpl()':
schur_eliminator_benchmark.cc:(.text._ZN5ceres8internal11ContextImplD0Ev[_ZN5ceres8internal11ContextImplD5Ev]+0x15): undefined reference to `ceres::internal::ThreadPool::~ThreadPool()'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BenchmarkData::BenchmarkData(int)':
schur_eliminator_benchmark.cc:(.text._ZN5ceres8internal13BenchmarkDataC2Ei[_ZN5ceres8internal13BenchmarkDataC5Ei]+0x241): undefined reference to `ceres::internal::BlockSparseMatrix::BlockSparseMatrix(ceres::internal::CompressedRowBlockStructure*)'
/usr/bin/ld: schur_eliminator_benchmark.cc:(.text._ZN5ceres8internal13BenchmarkDataC2Ei[_ZN5ceres8internal13BenchmarkDataC5Ei]+0x3dc): undefined reference to `ceres::internal::BlockRandomAccessDenseMatrix::BlockRandomAccessDenseMatrix(std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BM_SchurEliminatorEliminate(benchmark::State&) [clone .cold]':
schur_eliminator_benchmark.cc:(.text.unlikely+0x37): undefined reference to `ceres::internal::ThreadPool::~ThreadPool()'
/usr/bin/ld: CMakeFiles/schur_eliminator_benchmark.dir/schur_eliminator_benchmark.cc.o: in function `ceres::internal::BM_SchurEliminatorBackSubstitute(benchmark::State&) [clone .cold]':
schur_eliminator_benchmark.cc:(.text.unlikely+0x96): undefined reference to `ceres::internal::ThreadPool::~ThreadPool()'
collect2: error: ld returned 1 exit status
make[2]: *** [internal/ceres/CMakeFiles/schur_eliminator_benchmark.dir/build.make:108: bin/schur_eliminator_benchmark] Error 1
make[1]: *** [CMakeFiles/Makefile2:171: internal/ceres/CMakeFiles/schur_eliminator_benchmark.dir/all] Error 2
make: *** [Makefile:160: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: ceres-solver

The weird thing is, that it compiled without any errors on my laptop.

And when pulling the official ceres-solver repo and compiling the master branch like so, it compiles just fine.

dtag commented on 2020-10-08 10:45 (UTC) (edited on 2020-10-11 09:24 (UTC) by dtag)

@xantares: This appears to be a bug in the current Eigen release as you can see here: https://bugs.archlinux.org/task/68118 the link also lists a possible workaround. I guess we have to wait until this is fixed in the Eigen package?

Edit: Compilation works again as per eigen 3.3.8-3

xantares commented on 2020-10-08 10:09 (UTC) (edited on 2020-10-08 11:10 (UTC) by xantares)

hello, it seems it fails to build with the eigen update

edit nevermind, see eigen-qfix

schmidtbag commented on 2019-09-09 23:15 (UTC)

@dtag: I too noticed it was weird how it pointed to /share/eigen3/cmake, but /share is a symlink to /usr/share. That being said, I confirmed eigen3 is in /usr/share/eigen3/cmake; as expected. I'm not really sure when Arch started doing this symlink; I know I didn't do that. I actually didn't even notice it until right now. I wonder if perhaps this symlink is somehow screwing with the build? I'm a bit wary of deleting it, since I don't know why it exists in the first place.

dtag commented on 2019-09-09 11:26 (UTC)

@schmidtbag: Might be an issue on your end. I cannot reproduce this on multiple machines. Also, it is weird that it says "-- Found installed version of Eigen: /share/eigen3/cmake". This is not a location where you should have installed eigen. Specifically, the eigen package does not do that. It should be saying: "-- Found installed version of Eigen: /usr/share/eigen3/cmake".

schmidtbag commented on 2019-09-08 16:08 (UTC) (edited on 2019-09-08 16:09 (UTC) by schmidtbag)

Seems to have issues finding eigen:

-- No preference for use of exported Eigen CMake configuration set, and no hints for include directory provided. Defaulting to preferring an installed/exported Eigen CMake configuration if available.
-- Found installed version of Eigen: /share/eigen3/cmake
CMake Error at cmake/FindEigen.cmake:89 (message):
Failed to find Eigen - Could not find file:
//include/eigen3/Eigen/src/Core/util/Macros.h containing version
information in Eigen install located at: //include/eigen3.
Call Stack (most recent call first):
cmake/FindEigen.cmake:219 (eigen_report_not_found)
CMakeLists.txt:212 (find_package)

xantares commented on 2019-07-01 09:02 (UTC)

hi, I dont think openmp dependency is needed, that's the llvm variant, whereas we build with gcc here

xantares commented on 2019-06-24 17:33 (UTC)

no need to bump the build number, this triggers unnecessary rebuilds as the package content did not change

dtag commented on 2019-06-19 12:34 (UTC)

@xantares: Thank you. I've Added those flags.

xantares commented on 2019-06-19 10:04 (UTC)

hi, you can avoid to build examples with: -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF

dtag commented on 2019-04-26 11:30 (UTC)

Hi @xantares, Makes sense; I've made the changes you suggested.

xantares commented on 2019-04-25 08:29 (UTC) (edited on 2019-04-25 08:30 (UTC) by xantares)

hi,

linux packages ship shared libs, here the static lib is provided instead,

could you add -DBUILD_SHARED_LIBS=ON cmake option ?

also 'gcc-libs' in makedepends is useless

xan.

dtag commented on 2016-12-18 17:29 (UTC)

@maggeych: Done.

maggeych commented on 2016-12-17 17:40 (UTC)

This needs an update to version 1.12. Version 1.11 fails to build against the latest eigen3.

dtag commented on 2016-10-30 15:33 (UTC)

@arcnmx: I have gflags installed and I am not getting any errors. Can you elaborate on what the issue is?

arcnmx commented on 2016-10-28 19:02 (UTC)

Fails to build if the gflags package is installed on the system.

dtag commented on 2016-10-21 10:20 (UTC)

@bartus: Fixed.

bartus commented on 2016-10-20 22:48 (UTC)

The protobuf seams to not be needed at all for compiling the package.

dtag commented on 2016-08-16 12:36 (UTC) (edited on 2016-08-16 12:39 (UTC) by dtag)

Hi, I am (of course) using a 64-bit system. I have done some research and found this piece of code in internal/ceres/CMakeLists.txt: # Heuristic for determining LIB_SUFFIX. FHS recommends that 64-bit systems # install native libraries to lib64 rather than lib. Most distros seem to # follow this convention with a couple notable exceptions (Debian-based and # Arch-based distros) which we try to detect here. if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT DEFINED LIB_SUFFIX AND NOT CMAKE_CROSSCOMPILING AND CMAKE_SIZEOF_VOID_P EQUAL "8" AND NOT EXISTS "/etc/debian_version" AND NOT EXISTS "/etc/arch-release") set(LIB_SUFFIX "64") endif () I do not see how this can result in LIB_SUFFIX being set to "64" on an Arch system. It would require the /etc/arch-release file to be non-existent. Since it does not happen for me, I am unable to debug what exactly is going on for you guys. @korken89, @kertase: I have pushed an update that explictly sets LIB_SUFFIX to "". Maybe you can try and see if it fixes things for you.

commented on 2016-08-15 16:15 (UTC)

Hi, I do have the same issue on my machine I do not think that it is a problem with just @korken89 machine. I checked the package it has /usr/lib64 folder which has a libceres.a inside, @dtag maybe you do not have a 64 bit machine? I hope this problem can be solved Thanks

dtag commented on 2016-07-04 07:57 (UTC)

Hi @korken89, I have tried to reinstall the package and did not encounter any issues. I also checked the contents of the package via pacman -Ql ceres-solver. It only contains /usr/lib/libceres.a as a library. Nothing inside lib64. Maybe something is wrong on your machine?

korken89 commented on 2016-07-02 08:33 (UTC)

Hi! With the changes in Arch the install might need to be updated: error: failed to commit transaction (conflicting files) ceres-solver: /usr/lib64 exists in filesystem Errors occurred, no packages were upgraded. https://www.archlinux.org/news/update-filesystem-201301-1-and-glibc-217-2-together/ I think should install to /usr/lib now, if I have understood the news correctly. Could you have a look into this? Thanks!

dtag commented on 2016-05-18 17:35 (UTC) (edited on 2016-05-18 17:35 (UTC) by dtag)

@srivats2 I have added -Wno-error=nonnull-compare -Wno-error=address, which - despite generally treating warnings as errors - treats nonnull-compare and address as warnings. The flags are added via sed to the CMakeLists.txt file. See the PKGBUILD.

srivats2 commented on 2016-05-18 17:10 (UTC)

@dtag Thanks for the fix. Works perfectly now. Just curious since I didn't see the GCC 6 patch in the filelist. How was this patched? The authors removed the Werror flags in the code in the original repo.

dtag commented on 2016-05-18 10:09 (UTC)

Thank you. Fixed the GCC 6 issue.

srivats2 commented on 2016-05-17 17:33 (UTC)

Need GCC 6 patch to compile : -Werror=nonnull-compare -Werror=address

dtag commented on 2016-03-10 08:14 (UTC)

Thank you for your comment. I have addressed the issue with -j9. As for the license: The PKGBUILD uses EIGENSPARSE=ON. If you read http://ceres-solver.org/building.html it says: EIGENSPARSE [Default: OFF]: By default, Ceres will not use Eigen’s sparse Cholesky factorization. The is because this part of the code is licensed under the LGPL and since Eigen is a header only library, including this code will result in an LGPL licensed version of Ceres. So LGPL is the correct license for this specific PKGBUILD, I think.

bchretien commented on 2016-03-10 07:14 (UTC)

Oh, and the license is New BSD, see http://ceres-solver.org/license.html.

bchretien commented on 2016-03-10 07:12 (UTC)

Just a simple remark on the PKGBUILD: "make -j9" should be changed to "make". MAKEFLAGS defined in /etc/makepkg.conf are automatically used, and this is where you should define how many simultaneous jobs you want to run with make.