From dbf711884c9cfb9ce0eaa23152ed304d38c750b0 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 6 Jun 2023 21:30:43 +0800 Subject: [PATCH] opentelemetry-cpp: fix test Follow-up to #131405. --- Formula/opentelemetry-cpp.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Formula/opentelemetry-cpp.rb b/Formula/opentelemetry-cpp.rb index 2207ba09f015c..58a0acbff02c0 100644 --- a/Formula/opentelemetry-cpp.rb +++ b/Formula/opentelemetry-cpp.rb @@ -1,12 +1,23 @@ class OpentelemetryCpp < Formula desc "OpenTelemetry C++ Client" homepage "https://opentelemetry.io/" + # TODO: Check if we can use unversioned `grpc` and `protobuf` at version bump. url "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.8.2.tar.gz" sha256 "20fa97e507d067e9e2ab0c1accfc334f5a4b10d01312e55455dc3733748585f4" license "Apache-2.0" revision 1 head "https://github.com/open-telemetry/opentelemetry-cpp.git", branch: "main" + bottle do + sha256 cellar: :any_skip_relocation, arm64_ventura: "cbeb1ac7f62d885b1da78d5dd696aba5a64419b633a4632bd697a86bdf75296f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "53a1cabdf23d90daf3eb90b93255ff789ecc82799ab22eed6abf649e6eeb404b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "165e17e92ff42b8c44c227ed26347fc9c91d178d51f059756980af066c1ca23c" + sha256 cellar: :any_skip_relocation, ventura: "265f8a37577dac9e432aae815243499794c458c6b33a58c5a73769f13e600a98" + sha256 cellar: :any_skip_relocation, monterey: "5c33a21581e4041b8a53e0b5ea8b52d8eff4f070694294578af5cf2d01b8a64a" + sha256 cellar: :any_skip_relocation, big_sur: "3aa32ff2ea64217b303a7634842c9d43049bfe6525e779c6c7d058e63fa67ff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cea05e8a8cf47639e53aa33adcb3b65d7e111fe468f7e58971de30421cd89611" + end + depends_on "cmake" => :build depends_on "boost" depends_on "grpc@1.54" @@ -62,7 +73,10 @@ def install auto scoped_span = trace_api::Scope(tracer->StartSpan("test")); } EOS - system ENV.cxx, "test.cc", "-std=c++11", "-I#{include}", "-L#{lib}", + # Manual `protobuf` include can be removed when we depend on unversioned protobuf. + system ENV.cxx, "test.cc", "-std=c++17", + "-I#{include}", "-L#{lib}", + "-I#{Formula["protobuf@21"].opt_include}", "-lopentelemetry_resources", "-lopentelemetry_trace", "-lopentelemetry_exporter_ostream_span",