- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建 Ceres 1.13.0适用于使用 Xcode 9.2 (9C40b) 和 CMake 3.11.0-rc3 的 iOS 10+。似乎 CMake 无法识别 Xcode 9 提供的 clang 版本。这是怎么回事?看起来不像,因为旧版本的 Ceres 曾经构建得很好。
这question似乎暗示 CMake 不支持 AppleClang,这对我来说似乎很可笑。这里的另一个团队仅使用 Xcode 提供的 clang 在 macOS 上使用 CMake 构建了我们的大量代码。
我还尝试修改 Ceres iOS.cmake 文件以按照该 SO 答案的建议设置 CMP0025 策略,但没有任何区别。
更新
我注意到了一些事情。当 CMake 用于其他构建时,它会将编译器正确标识为 AppleClang 9.0.0.9000039
。当它失败时,您可以看到下面的消息(它称之为“Clang”)。在这两种情况下,它都在 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
处标识 CXX 编译器。下面的输出显示了无法识别编译器的情况
$ cmake $CERES_DIR -DCMAKE_TOOLCHAIN_FILE=$CERES_DIR/cmake/iOS.cmake -DCXX11=ON -DLAPACK=OFF -DEIGEN_INCLUDE_DIR=$EIGEN_INCLUDE_DIR -DIOS_PLATFORM=OS -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../
-- Building with Xcode version: 9.2
-- Configuring iOS build for platform: OS, architecture(s): arm64
-- Using C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Using CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Using libtool: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Building for minimum iOS version: 11.2 (SDK version: 11.2)
-- Detected Ceres version: 1.13.0 from /Users/me/Projects/Clients/MyCompany/repo/thirdparty/ceres-solver-1.13.0/include/ceres/version.h
-- Building Ceres for iOS platform: OS
-- Building for iOS: Forcing use of miniglog instead of glog.
-- Building for iOS: SuiteSparse, CXSparse, LAPACK, gflags, and OpenMP are not available.
-- Building for iOS: Will not build examples.
-- 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: /usr/local/share/eigen3/cmake
-- Found Eigen version 3.3.4: /usr/local/include/eigen3
===============================================================
Disabling the 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.
===============================================================
-- Building without LAPACK.
-- Building without SuiteSparse.
-- Building without CXSparse.
===============================================================
Compiling without any sparse library: SuiteSparse, CXSparse
& Eigen (Sparse) are all disabled or unavailable. No sparse
linear solvers (SPARSE_NORMAL_CHOLESKY & SPARSE_SCHUR)
will be available when Ceres is used.
===============================================================
-- Google Flags disabled; no tests or tools will be built!
-- Compiling minimal glog substitute into Ceres.
-- Using minimal glog substitute (include): internal/ceres/miniglog
-- Max log level for minimal glog substitute: 2
-- Building without OpenMP (disabling multithreading).
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE
-- Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE - Success
-- Found unordered_map/set in std namespace.
-- Looking for C++ include memory
-- Looking for C++ include memory - found
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE - Success
-- Found shared_ptr in std namespace using <memory> header.
==============================================================
Compiling Ceres using C++11. This will result in a version
of Ceres that will require the use of C++11 in client code.
==============================================================
-- Building Ceres as a static library.
-- Enabling CERES_NO_LAPACK in Ceres config.h
-- Enabling CERES_NO_SUITESPARSE in Ceres config.h
-- Enabling CERES_NO_CXSPARSE in Ceres config.h
-- Enabling CERES_USE_CXX11 in Ceres config.h
-- Enabling CERES_NO_THREADS in Ceres config.h
-- Enabling CERES_STD_UNORDERED_MAP in Ceres config.h
CMake Error at cmake/AddCeresCXX11RequirementsToTarget.cmake:70 (target_compile_features):
target_compile_features no known features for CXX compiler
"Clang"
version 9.0.0.9000039.
Call Stack (most recent call first):
internal/ceres/CMakeLists.txt:223 (add_ceres_cxx11_requirements_to_target)
-- Do not build any example.
-- Configuring incomplete, errors occurred!
See also "/Users/me/Projects/Clients/MyCompany/repo/iOS/lib/ceres/build/CMakeFiles/CMakeOutput.log".
Xcode 版本:
$ /usr/bin/clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
非常感谢指导。
最佳答案
啊,看来我需要删除中间 CMake 文件。它感到困惑。这样做可以解决问题(还必须指定 iOS 11 之前的最低部署目标,或者找到一种方法告诉 Ceres 除了 arm64 之外不要构建任何东西)。
关于ios - 使用 Xcode 9 为 iOS 构建 Ceres 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49411682/
我是 ceres(非线性最小二乘)求解器和 C++ 模板编程的新手。我已经通过下载 http://grail.cs.washington.edu/projects/bal/ 上发布的数据集成功安装了
我正在尝试修改 ceres 的默认行为,即计算残差的平方和作为成本函数。我希望它只计算总和(残差已经以只能为正的方式计算) 根据文档,我应该使用 ConditionedCostFunction 这是我
我尝试使用类似于 Features2D + Homography to find a known object 的方法比较图像而是将findHomography()替换为自己编写的findAffine
我想用 Ceres 优化一个有 n 个参数的函数。如何找到这个函数的梯度尚不清楚,尽管我确实有一个明确定义的成本。到目前为止,我一直在使用具有数值微分功能的 GSL,但我想我会尝试使用具有自动差异功能
我有 ubuntu 16.04.4 LTS xenial,我想安装 ceres,但不是作为静态库。我想将它安装为共享库。 我通过此链接按照说明进行操作:http://ceres-solver.org/
据我了解,Ceres的接口(interface)要求将每个残差定义为一个仿函数,其中 operator()是 const成员函数。这是我感兴趣的示例: class some_residual {
我想使用ceres计算三角形坐标。 对于这个问题,我需要解决网格中的网格坐标。每个三角形都有自己的顶点,但可以使用三角形(3 个顶点)和边(4 个顶点)等结构。 示例数据(伪代码): triangle
Ceres 求解器允许使用分段三次 hermite 插值进行插值,我正尝试使用它来为 Eigen 创建三次插值。 This snippet from ceres/examples展示了如何设置插值器。
本文整理了Java中com.bc.ceres.binding.dom.XppDomElement类的一些代码示例,展示了XppDomElement类的具体用法。这些代码示例主要来源于Github/St
Google Ceres Solver 解决了稳健的非线性边界约束最小二乘问题。 我可以使用非线性最小二乘求解器来求解非线性方程组的解吗? 来自维基百科:“最小二乘法是一种标准方法,用于求解超定系统的
我正在尝试编译 ceres 求解器并将其部署到 Android 项目中。 我成功编译了 ceres(1.8.0 和 1.9.0,都试过了),从 ceres jni 文件夹运行 ndk-build。 然
我一直在使用ceres-solver很长一段时间以来,它是一个了不起的工具。到目前为止,我的使用并不是基于可重用代码,我正在努力改进这一点。 Ceres 使用具有特定模板化方法的特定结构作为其 aut
我使用 brew 安装了 Eigen 和 Ceres-Solver 作为现有项目的先决条件。 当我为项目运行 make 时,我收到以下消息 Found Eigen dependency, but th
我有一个模板库,其中一些函数专门用于 float 和 double 类型。此特化使用 sse/avx,因此,此库具有 -march=native -mavx2 编译器标志。当我尝试使用此库的某些函数(
我正在尝试使用 Google 的 Ceres Solver 求解非线性系统。下面的示例来自此页面:http://terpconnect.umd.edu/~petersd/460/html/newton
本文整理了Java中com.bc.ceres.binding.dom.XppDomElement.()方法的一些代码示例,展示了XppDomElement.()的具体用法。这些代码示例主要来源于Git
我正在尝试将 ceres 求解器与我的 android 应用程序一起使用,但似乎没有很多关于正确使用它们的文档。我遵循了 ceres 求解器网站的构建说明以及这个有用的教程: http://tech.
我正在为一个项目使用 ceres 求解器,当我调用 ceres::Solve 函数时,库开始输出如下行: iterative_schur_complement_solver.cc:88 No para
我正在尝试构建 Ceres 1.13.0适用于使用 Xcode 9.2 (9C40b) 和 CMake 3.11.0-rc3 的 iOS 10+。似乎 CMake 无法识别 Xcode 9 提供的 c
我安装了 ceres-solver 使用 brew install ceres-solver 在 macOS 上。 我为使用 Ceres 的客户项目创建了一个 CMake.txt。 cmake_min
我是一名优秀的程序员,十分优秀!