Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: glog_library(with_gflags=0) to workaround glog coredump issue #12982

Merged
merged 4 commits into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cyber/component/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ cc_library(
":component_base",
"//cyber/blocker:blocker_manager",
"//cyber/timer",
"//cyber/transport/transmitter",
"//cyber/transport/message:history",
"//cyber/transport/transmitter",
],
)

Expand All @@ -53,6 +53,7 @@ cc_library(
"//cyber/base:thread_pool",
"//cyber/class_loader",
"//cyber/node",
"@com_github_gflags_gflags//:gflags",
],
)

Expand Down
2 changes: 2 additions & 0 deletions cyber/record/file/record_file_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include <unistd.h>
#include <atomic>
#include <string>

#include "gflags/gflags.h"
#include "gtest/gtest.h"

#include "cyber/record/file/record_file_base.h"
Expand Down
3 changes: 3 additions & 0 deletions modules/common/math/kalman_filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ namespace common {
namespace math {

class KalmanFilterTest : public ::testing::Test {
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

public:
KalmanFilterTest() : kf_() {}

Expand Down
2 changes: 1 addition & 1 deletion modules/control/submodules/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//tools:cpplint.bzl", "cpplint")

package(default_visibility = ["//visibility:public"])

PREPROCESS_SUB_COPTS = ["-DMODULE_NAME=\\\"preprocessor_submodule\\\""]

cc_library(
Expand Down Expand Up @@ -44,7 +45,6 @@ cc_library(
"//modules/control/proto:preprocessor_cc_proto",
"//modules/localization/proto:localization_cc_proto",
"//modules/planning/proto:planning_cc_proto",
"@com_github_gflags_gflags//:gflags",
],
)

Expand Down
1 change: 1 addition & 0 deletions modules/control/submodules/preprocessor_submodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@ class PreprocessorSubmodule final : public cyber::Component<LocalView> {
};

CYBER_REGISTER_COMPONENT(PreprocessorSubmodule);

} // namespace control
} // namespace apollo
1 change: 1 addition & 0 deletions modules/map/hdmap/hdmap_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
#include <chrono>

#include "absl/strings/str_cat.h"
#include "gflags/gflags.h"
#include "gtest/gtest.h"

#include "cyber/common/file.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "Eigen/Core"
#include "Eigen/Dense"
#include "gflags/gflags.h"

#include "modules/transform/buffer.h"

Expand Down
5 changes: 5 additions & 0 deletions third_party/glog/glog.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Tailored from https://github.com/google/glog/blob/master/BUILD

load(":bazel/glog.bzl", "glog_library")

glog_library(with_gflags=0)
10 changes: 10 additions & 0 deletions third_party/glog/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Sanitize a dependency so that it works correctly from code that includes
# Apollo as a submodule.
def clean_dep(dep):
return str(Label(dep))

# TODO(infra):
# Remove the build_file settings when glog issue #53 was resolved
# Link: https://github.com/google/glog/issues/53#issuecomment-136418497

def repo():
http_archive(
name = "com_google_glog",
sha256 = "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c",
strip_prefix = "glog-0.4.0",
url = "https://github.com/google/glog/archive/v0.4.0.tar.gz",
build_file = clean_dep("//third_party/glog:glog.BUILD"),
)