Skip to content

Commit

Permalink
[BUILD] Add missing header to fix compile error for GCC11 & GCC12. (D…
Browse files Browse the repository at this point in the history
  • Loading branch information
lockmatrix authored Sep 22, 2022
1 parent bd22ca7 commit 8bc8026
Showing 3 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tensorflow/workspace.bzl
Original file line number Diff line number Diff line change
@@ -193,7 +193,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):

tf_http_archive(
name = "com_google_absl",
patch_file = clean_dep("//third_party:string_view_h.patch"),
patch_file = clean_dep("//third_party:0001-abseil.patch"),
build_file = clean_dep("//third_party:com_google_absl.BUILD"),
sha256 = "acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070", # SHARED_ABSL_SHA
strip_prefix = "abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f",
@@ -1046,6 +1046,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):

tf_http_archive(
name = "seastar_repo",
patch_file = clean_dep("//third_party:0001-seastar.patch"),
sha256 = "bf97d343149f95983317888dd39a3231639f67c39d826413ea226f9c9c5267d4",
strip_prefix = "seastar-b9357c525a552ad21b5609622c900e0649921712",
build_file = str(Label("//third_party:seastar.BUILD")),
12 changes: 12 additions & 0 deletions third_party/string_view_h.patch → third_party/0001-abseil.patch
Original file line number Diff line number Diff line change
@@ -16,3 +16,15 @@ diff -Naur a/absl/strings/string_view.h b/absl/strings/string_view.h
}

const char* ptr_;
diff --git "a/absl/synchronization/internal/graphcycles.cc" "b/absl/synchronization/internal/graphcycles.cc"
index 19f9aab5..27fec216 100644
--- "a/absl/synchronization/internal/graphcycles.cc"
+++ "b/absl/synchronization/internal/graphcycles.cc"
@@ -37,6 +37,7 @@

#include <algorithm>
#include <array>
+#include <limits>
#include "absl/base/internal/hide_ptr.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"
23 changes: 23 additions & 0 deletions third_party/0001-seastar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/util/noncopyable_function.hh b/util/noncopyable_function.hh
index 3928709f..0fb0b189 100644
--- a/util/noncopyable_function.hh
+++ b/util/noncopyable_function.hh
@@ -21,6 +21,7 @@

#pragma once

+#include <cstddef>
#include <utility>
#include <type_traits>
#include <functional>
diff --git a/core/apply.hh b/core/apply.hh
index 437166ad..9790d98f 100644
--- a/core/apply.hh
+++ b/core/apply.hh
@@ -22,6 +22,7 @@
#ifndef APPLY_HH_
#define APPLY_HH_

+#include <cstddef>
#include <tuple>
#include <utility>

0 comments on commit 8bc8026

Please sign in to comment.