From 9ecf8d2283481edf1147941322be54a38e974b89 Mon Sep 17 00:00:00 2001 From: Groovie | Mango <95291500+grooviegermanikus@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:55:06 +0100 Subject: [PATCH] tools: fixes openssl link problem (macos+aarch64) (#236) building the rdkafka crate fails on mac per default configuration see https://github.com/fede1024/rust-rdkafka/issues/491 --- Cargo.lock | 10 ++++++++++ yellowstone-grpc-tools/Cargo.toml | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5a135d1..2c53213 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2437,6 +2437,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.1.6+3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.93" @@ -2445,6 +2454,7 @@ checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/yellowstone-grpc-tools/Cargo.toml b/yellowstone-grpc-tools/Cargo.toml index d42dfe2..3c13b6d 100644 --- a/yellowstone-grpc-tools/Cargo.toml +++ b/yellowstone-grpc-tools/Cargo.toml @@ -23,7 +23,6 @@ hyper = { version = "0.14.27", features = ["server"] } json5 = "0.4.1" lazy_static = "1.4.0" prometheus = "0.13.2" -rdkafka = { version = "0.34.0", features = ["ssl", "sasl"] } serde = { version = "1.0.145", features = ["derive"] } serde_json = "1.0.86" serde_yaml = "0.9.25" @@ -37,6 +36,12 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } yellowstone-grpc-client = { path = "../yellowstone-grpc-client" } yellowstone-grpc-proto = { path = "../yellowstone-grpc-proto" } +[target.'cfg(not(all(target_os = "macos", target_arch = "aarch64")))'.dependencies] +rdkafka = { version = "0.34.0", features = ["ssl", "sasl"] } + +[target.'cfg(all(target_os = "macos", target_arch = "aarch64"))'.dependencies] +rdkafka = { version = "0.34.0", features = ["ssl-vendored", "sasl"] } + [build-dependencies] anyhow = "1.0.62" cargo-lock = "9.0.0"