mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 08:10:21 +08:00
Patch prometheus-cpp internally (#6281)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
load("@com_github_ray_project_ray//java:dependencies.bzl", "gen_java_deps")
|
||||
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
|
||||
load("@com_github_jupp0r_prometheus_cpp//:repositories.bzl", "prometheus_cpp_repositories")
|
||||
load("@com_github_jupp0r_prometheus_cpp//bazel:repositories.bzl", "prometheus_cpp_repositories")
|
||||
load("@com_github_checkstyle_java//:repo.bzl", "checkstyle_deps")
|
||||
load("@com_github_grpc_grpc//third_party/py:python_configure.bzl", "python_configure")
|
||||
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
||||
|
||||
@@ -178,11 +178,14 @@ def ray_deps_setup():
|
||||
# OpenCensus depends on jupp0r/prometheus-cpp
|
||||
github_repository(
|
||||
name = "com_github_jupp0r_prometheus_cpp",
|
||||
commit = "5c45ba7ddc0585d765a43d136764dd2a542bd495",
|
||||
remote = "https://github.com/ray-project/prometheus-cpp",
|
||||
# TODO(qwang): We should use the repository of `jupp0r` here when this PR
|
||||
# `https://github.com/jupp0r/prometheus-cpp/pull/225` getting merged.
|
||||
sha256 = "c80293276166d405188b1af62cd11178fbcec0f1a8ab0dbece19d4bdc79d45e7",
|
||||
commit = "60eaa4ea47b16751a8e8740b05fe70914c68a480",
|
||||
remote = "https://github.com/jupp0r/prometheus-cpp",
|
||||
sha256 = "9756bd2d573e7722f97dbe6d35934e43b9a79e6a87fc5e1da79774a621cddd8e",
|
||||
patches = [
|
||||
# https://github.com/jupp0r/prometheus-cpp/pull/225
|
||||
"//thirdparty/patches:prometheus-windows-zlib.patch",
|
||||
"//thirdparty/patches:prometheus-windows-pollfd.patch",
|
||||
]
|
||||
)
|
||||
|
||||
github_repository(
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
Target an older version of Windows SDK so that we don't get a conflicting definition of struct pollfd
|
||||
|
||||
Windows Vista and later SDKs define struct pollfd for WSAPoll(), but it has a permanent bug:
|
||||
- https://curl.haxx.se/mail/lib-2012-08/0014.html
|
||||
- https://curl.haxx.se/mail/lib-2012-10/0038.html
|
||||
civetweb provides its own implementation of poll, but it has a conflicting definition for pollfd.
|
||||
Hence we block Windows from defining pollfd (which this project doesn't use).
|
||||
---
|
||||
bazel/civetweb.BUILD | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git bazel/civetweb.BUILD bazel/civetweb.BUILD
|
||||
index e8d6024..162f234 100644
|
||||
--- bazel/civetweb.BUILD
|
||||
+++ bazel/civetweb.BUILD
|
||||
@@ -34,6 +34,7 @@ cc_library(
|
||||
"-DNO_CACHING",
|
||||
"-DNO_SSL",
|
||||
"-DNO_FILES",
|
||||
+ "-D_WIN32_WINNT=0x0502",
|
||||
"-UDEBUG",
|
||||
],
|
||||
includes = [
|
||||
--
|
||||
@@ -0,0 +1,45 @@
|
||||
From 78ac107937ee3b94f0b011f9ef0c12b912a222e7 Mon Sep 17 00:00:00 2001
|
||||
From: easy <g-easy@users.noreply.github.com>
|
||||
Date: Wed, 14 Nov 2018 16:49:24 +1100
|
||||
Subject: [PATCH] Rename net_zlib_zlib to com_github_madler_zlib to match gRPC.
|
||||
|
||||
diff --git README.md README.md
|
||||
index be8e683..1dbc917 100644
|
||||
--- README.md
|
||||
+++ README.md
|
||||
@@ -139,7 +139,7 @@ you introduce the following dependencies, if they do not exist yet, to your proj
|
||||
* `load_com_google_googletest()` to load `com_google_googletest` rules for Google gtest
|
||||
* `load_com_google_googlebenchmark()` to load `com_github_google_benchmark` rules for Googlebenchmark
|
||||
* `load_com_github_curl()` to load `com_github_curl` rules for curl
|
||||
-* `load_net_zlib_zlib()` to load `net_zlib_zlib` rules for zlib
|
||||
+* `load_com_github_madler_zlib()` to load `com_github_madler_zlib` rules for zlib
|
||||
|
||||
The list of dependencies is also available from file `repositories.bzl`.
|
||||
|
||||
diff --git pull/BUILD.bazel pull/BUILD.bazel
|
||||
index 6d90c23..d35f63e 100644
|
||||
--- pull/BUILD.bazel
|
||||
+++ pull/BUILD.bazel
|
||||
@@ -23,6 +23,6 @@ cc_library(
|
||||
deps = [
|
||||
"//core",
|
||||
"@civetweb",
|
||||
- "@net_zlib_zlib//:z",
|
||||
+ "@com_github_madler_zlib//:z",
|
||||
],
|
||||
)
|
||||
diff --git bazel/repositories.bzl bazel/repositories.bzl
|
||||
index 258b73f..91398cf 100644
|
||||
--- bazel/repositories.bzl
|
||||
+++ bazel/repositories.bzl
|
||||
@@ -47,7 +47,8 @@ def prometheus_cpp_repositories():
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
- name = "net_zlib_zlib",
|
||||
+ # Named "com_github_madler_zlib" to match gRPC's import of zlib.
|
||||
+ name = "com_github_madler_zlib",
|
||||
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
|
||||
strip_prefix = "zlib-1.2.11",
|
||||
urls = [
|
||||
--
|
||||
Reference in New Issue
Block a user