Fix the Ceres Android NDK build. The NDK build of Ceres was broken; this fixes it and also disables a useless warning that shows up in NDK 8b. Change-Id: I54cfb3de7ccea4a0864385f7ffdb55d8f3431f34
diff --git a/internal/ceres/solver_impl.cc b/internal/ceres/solver_impl.cc index 56295ae..64e0f8e 100644 --- a/internal/ceres/solver_impl.cc +++ b/internal/ceres/solver_impl.cc
@@ -817,7 +817,7 @@ #endif #if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE) - if (linear_solver_options.type == SPARSE_SCHUR) { + if (options->linear_solver_type == SPARSE_SCHUR) { *error = "Can't use SPARSE_SCHUR because neither SuiteSparse nor" "CXSparse was enabled when Ceres was compiled."; return NULL;
diff --git a/internal/ceres/types.cc b/internal/ceres/types.cc index 225384d..fc33a4c 100644 --- a/internal/ceres/types.cc +++ b/internal/ceres/types.cc
@@ -29,6 +29,7 @@ // Author: sameeragarwal@google.com (Sameer Agarwal) #include <algorithm> +#include <cctype> #include <string> #include "ceres/types.h" #include "glog/logging.h"
diff --git a/jni/Android.mk b/jni/Android.mk index 8677e37..da08b08 100644 --- a/jni/Android.mk +++ b/jni/Android.mk
@@ -90,6 +90,10 @@ -DCERES_NO_TR1 \ -DCERES_WORK_AROUND_ANDROID_NDK_COMPILER_BUG +# On Android NDK 8b, GCC gives spurrious warnings about ABI incompatibility for +# which there is no solution. Hide the warning instead. +LOCAL_CFLAGS += -Wno-psabi + LOCAL_SRC_FILES := $(CERES_SRC_PATH)/array_utils.cc \ $(CERES_SRC_PATH)/block_evaluate_preparer.cc \ $(CERES_SRC_PATH)/block_jacobian_writer.cc \ @@ -125,8 +129,7 @@ $(CERES_SRC_PATH)/loss_function.cc \ $(CERES_SRC_PATH)/miniglog/glog/logging.cc \ $(CERES_SRC_PATH)/normal_prior.cc \ - $(CERES_SRC_PATH)/ordering.cc \ - $(CERES_SRC_PATH)/parmeter_block_ordering.cc \ + $(CERES_SRC_PATH)/parameter_block_ordering.cc \ $(CERES_SRC_PATH)/partitioned_matrix_view.cc \ $(CERES_SRC_PATH)/polynomial_solver.cc \ $(CERES_SRC_PATH)/problem.cc \