| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- # Copyright The OpenTelemetry Authors
- # SPDX-License-Identifier: Apache-2.0
- load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
- load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
- #
- # MAINTAINER
- #
- # This file is used for the Bazel build.
- #
- # When changing (add, upgrade, remove) dependencies
- # please update:
- # - the CMake build, see file
- # <root>/third_party_release
- # - git submodule, see command
- # git submodule status
- #
- def opentelemetry_cpp_deps():
- """Loads dependencies need to compile the opentelemetry-cpp library."""
- # Google Benchmark library.
- # Only needed for benchmarks, not to build the OpenTelemetry library.
- maybe(
- http_archive,
- name = "com_github_google_benchmark",
- sha256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce",
- strip_prefix = "benchmark-1.8.3",
- urls = [
- "https://github.com/google/benchmark/archive/v1.8.3.tar.gz",
- ],
- )
- # GoogleTest framework.
- # Only needed for tests, not to build the OpenTelemetry library.
- maybe(
- http_archive,
- name = "com_google_googletest",
- sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
- strip_prefix = "googletest-1.14.0",
- urls = [
- "https://github.com/google/googletest/archive/v1.14.0.tar.gz",
- ],
- )
- # Load abseil dependency(optional)
- maybe(
- http_archive,
- name = "com_google_absl",
- sha256 = "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
- strip_prefix = "abseil-cpp-20240116.2",
- urls = [
- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.2.tar.gz",
- ],
- )
- # gRPC transitively depends on apple_support and rules_apple at older
- # versions. Bazel 7.x requires newer versions of these rules. By loading
- # them before grpc, these newer versions are preferrred.
- maybe(
- http_archive,
- name = "build_bazel_apple_support",
- sha256 = "c4bb2b7367c484382300aee75be598b92f847896fb31bbd22f3a2346adf66a80",
- url = "https://github.com/bazelbuild/apple_support/releases/download/1.15.1/apple_support.1.15.1.tar.gz",
- )
- maybe(
- http_archive,
- name = "build_bazel_rules_apple",
- sha256 = "b4df908ec14868369021182ab191dbd1f40830c9b300650d5dc389e0b9266c8d",
- url = "https://github.com/bazelbuild/rules_apple/releases/download/3.5.1/rules_apple.3.5.1.tar.gz",
- )
- # Load gRPC dependency
- maybe(
- http_archive,
- name = "com_github_grpc_grpc",
- sha256 = "f40bde4ce2f31760f65dc49a2f50876f59077026494e67dccf23992548b1b04f",
- strip_prefix = "grpc-1.62.0",
- urls = [
- "https://github.com/grpc/grpc/archive/refs/tags/v1.62.0.tar.gz",
- ],
- )
- # OTLP Protocol definition
- maybe(
- http_archive,
- name = "com_github_opentelemetry_proto",
- build_file = "@io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD",
- sha256 = "92682778affe8d00cd36f68308b49295db34fce379bef0a781c50837eccbc3c0",
- strip_prefix = "opentelemetry-proto-1.6.0",
- urls = [
- "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.6.0.tar.gz",
- ],
- )
- # JSON library
- maybe(
- http_archive,
- name = "github_nlohmann_json",
- build_file = "@io_opentelemetry_cpp//bazel:nlohmann_json.BUILD",
- sha256 = "b8cb0ef2dd7f57f18933997c9934bb1fa962594f701cd5a8d3c2c80541559372",
- urls = [
- "https://github.com/nlohmann/json/releases/download/v3.12.0/include.zip",
- ],
- )
- # C++ Prometheus Client library.
- maybe(
- http_archive,
- name = "com_github_jupp0r_prometheus_cpp",
- sha256 = "ac6e958405a29fbbea9db70b00fa3c420e16ad32e1baf941ab233ba031dd72ee",
- strip_prefix = "prometheus-cpp-1.3.0",
- urls = [
- "https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.3.0.tar.gz",
- ],
- )
- # bazel platforms
- maybe(
- http_archive,
- name = "platforms",
- sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
- urls = [
- "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
- "https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
- ],
- )
- # libcurl (optional)
- maybe(
- http_archive,
- name = "curl",
- build_file = "@io_opentelemetry_cpp//bazel:curl.BUILD",
- sha256 = "816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427",
- strip_prefix = "curl-8.4.0",
- urls = [
- "https://curl.haxx.se/download/curl-8.4.0.tar.gz",
- "https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.gz",
- ],
- )
- # rules foreign cc
- maybe(
- http_archive,
- name = "rules_foreign_cc",
- sha256 = "69023642d5781c68911beda769f91fcbc8ca48711db935a75da7f6536b65047f",
- strip_prefix = "rules_foreign_cc-0.6.0",
- url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.6.0.tar.gz",
- )
- # bazel skylib
- maybe(
- http_archive,
- name = "bazel_skylib",
- sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
- urls = [
- "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
- ],
- )
- # Opentracing
- maybe(
- http_archive,
- name = "com_github_opentracing",
- sha256 = "5b170042da4d1c4c231df6594da120875429d5231e9baa5179822ee8d1054ac3",
- strip_prefix = "opentracing-cpp-1.6.0",
- urls = [
- "https://github.com/opentracing/opentracing-cpp/archive/refs/tags/v1.6.0.tar.gz",
- ],
- )
- # Zlib (optional)
- maybe(
- http_archive,
- name = "zlib",
- build_file = "@io_opentelemetry_cpp//bazel:zlib.BUILD",
- sha256 = "d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98",
- strip_prefix = "zlib-1.2.13",
- urls = [
- "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.xz",
- "https://zlib.net/zlib-1.2.13.tar.xz",
- ],
- )
|