Public bug reported: When attempting a cmake build with the default apt installed `libceres- dev` I encountered the following error:
``` CMake Error at /usr/lib/cmake/ceres/CeresConfig.cmake:89 (else): Flow control statements are not properly nested. Call Stack (most recent call first): CMakeLists.txt:26 (find_package) ``` Digging into `/usr/lib/cmake/ceres/CeresConfig.cmake:89`, it looks like line 87 should be `elseif`, not `else`. Manually editing the file and rebuilding fixes my build. ``` 85 if (Ceres_FIND_QUIETLY) 86 message(STATUS "Failed to find Ceres - " ${REASON_MSG} ${ARGN}) 87 else (Ceres_FIND_REQUIRED) 88 message(FATAL_ERROR "Failed to find Ceres - " ${REASON_MSG} ${ARGN}) 89 else() ``` I'm not sure how this got mangled as the source code version seems to be right (see link). We've also been using this package / installation method for quite a while without any issues, so I believe this is a new problem (as of 03/23). https://github.com/ceres-solver/ceres-solver/blob/master/cmake/CeresConfig.cmake.in Other information: # lsb_release -rd Description: Ubuntu 16.04.7 LTS Release: 16.04 # apt-cache policy libceres-dev libceres-dev: Installed: 1.12.0+dfsg0-5 Candidate: 1.12.0+dfsg0-5 Version table: *** 1.12.0+dfsg0-5 100 100 /var/lib/dpkg/status ** Affects: ceres-solver (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1921113 Title: Invalid CMake Syntax To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ceres-solver/+bug/1921113/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs