From bf47e1a36829f62697b930241d0a353932f34090 Mon Sep 17 00:00:00 2001 From: Sameer Agarwal Date: Tue, 13 Oct 2020 10:00:22 -0700 Subject: [PATCH] Fix the Bazel build. 1. Fix the path to eigen, now that it uses gitlab instead of bitbucket. 2. Remove an unrecognized compiler option. 3. Remove an obsolete benchmark. This CL only unbreaks the build, it is likely that it is still not at par with the cmake build. https://github.com/ceres-solver/ceres-solver/issues/628 Change-Id: I470209cbb48b6a4f499564a86b52436e0c8d98ef --- BUILD | 4 +--- WORKSPACE | 8 ++++---- bazel/ceres.bzl | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/BUILD b/BUILD index 2d0a5f0b6..5e04e03f6 100644 --- a/BUILD +++ b/BUILD @@ -164,14 +164,13 @@ TEST_COPTS = [ # trigger incorrectly on parts of rotation_test. For now, disable them, # but in the future disable these warnings only for rotation_test. # TODO(keir): When the tests are macro-ified, apply these selectively. - "-Wno-nonnull-compare", "-Wno-address", ] TEST_DEPS = [ "//:ceres", "//:test_util", - "@com_github_eigen_eigen//:eigen", + "@com_gitlab_libeigen_eigen//:eigen", "@com_github_gflags_gflags//:gflags", ] @@ -210,7 +209,6 @@ TEST_DEPS = [ copts = TEST_COPTS, deps = TEST_DEPS + ["@com_github_google_benchmark//:benchmark"], ) for benchmark_name in [ - "autodiff_cost_function_benchmark", "small_blas_gemm_benchmark", "small_blas_gemv_benchmark", ]] diff --git a/WORKSPACE b/WORKSPACE index 7264bedab..e1e5ecac1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -57,11 +57,11 @@ http_archive( # External dependency: Eigen; has no Bazel build. http_archive( - name = "com_github_eigen_eigen", - sha256 = "dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6", - strip_prefix = "eigen-eigen-5a0156e40feb", + name = "com_gitlab_libeigen_eigen", + sha256 = "0215c6593c4ee9f1f7f28238c4e8995584ebf3b556e9dbf933d84feb98d5b9ef", + strip_prefix = "eigen-3.3.8", urls = [ - "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2", + "https://gitlab.com/libeigen/eigen/-/archive/3.3.8/eigen-3.3.8.tar.bz2", ], build_file_content = """ diff --git a/bazel/ceres.bzl b/bazel/ceres.bzl index 9f12f1b92..ce170b243 100644 --- a/bazel/ceres.bzl +++ b/bazel/ceres.bzl @@ -204,7 +204,7 @@ def ceres_library(name, ], visibility = ["//visibility:public"], deps = [ - "@com_github_eigen_eigen//:eigen", + "@com_gitlab_libeigen_eigen//:eigen", "@com_github_google_glog//:glog", ], )