diff --git a/Cargo.lock b/Cargo.lock index 88566f185f4ceb..b2a8b39ace28ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,6 +265,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +[[package]] +name = "autotools" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701" +dependencies = [ + "cc", +] + [[package]] name = "axum" version = "0.5.1" @@ -3547,6 +3556,15 @@ dependencies = [ "prost 0.11.0", ] +[[package]] +name = "protobuf-src" +version = "1.0.5+3.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe57f68bf9767f48f8cbcbceb5da21524e2b1330a821c1c2502c447d8043f078" +dependencies = [ + "autotools", +] + [[package]] name = "qstring" version = "0.7.2" @@ -6274,6 +6292,7 @@ dependencies = [ "bs58", "enum-iterator", "prost 0.11.0", + "protobuf-src", "serde", "solana-account-decoder", "solana-sdk 1.11.5", diff --git a/programs/bpf/Cargo.lock b/programs/bpf/Cargo.lock index 7e715aee553c97..e5acdd8acd2194 100644 --- a/programs/bpf/Cargo.lock +++ b/programs/bpf/Cargo.lock @@ -251,6 +251,15 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +[[package]] +name = "autotools" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701" +dependencies = [ + "cc", +] + [[package]] name = "axum" version = "0.5.3" @@ -3215,6 +3224,15 @@ dependencies = [ "prost 0.11.0", ] +[[package]] +name = "protobuf-src" +version = "1.0.5+3.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe57f68bf9767f48f8cbcbceb5da21524e2b1330a821c1c2502c447d8043f078" +dependencies = [ + "autotools", +] + [[package]] name = "qstring" version = "0.7.2" @@ -5562,6 +5580,7 @@ dependencies = [ "bincode", "bs58", "prost 0.11.0", + "protobuf-src", "serde", "solana-account-decoder", "solana-sdk 1.11.5", diff --git a/storage-bigtable/build-proto/Cargo.lock b/storage-bigtable/build-proto/Cargo.lock index 12bfee987d28b2..015ad69ca3d283 100644 --- a/storage-bigtable/build-proto/Cargo.lock +++ b/storage-bigtable/build-proto/Cargo.lock @@ -14,6 +14,15 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +[[package]] +name = "autotools" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701" +dependencies = [ + "cc", +] + [[package]] name = "bitflags" version = "1.2.1" @@ -26,6 +35,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +[[package]] +name = "cc" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" + [[package]] name = "cfg-if" version = "1.0.0" @@ -206,9 +221,19 @@ dependencies = [ name = "proto" version = "1.11.5" dependencies = [ + "protobuf-src", "tonic-build", ] +[[package]] +name = "protobuf-src" +version = "1.0.5+3.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe57f68bf9767f48f8cbcbceb5da21524e2b1330a821c1c2502c447d8043f078" +dependencies = [ + "autotools", +] + [[package]] name = "quote" version = "1.0.7" diff --git a/storage-bigtable/build-proto/Cargo.toml b/storage-bigtable/build-proto/Cargo.toml index 74acdef788289f..9388e4f4bc4a97 100644 --- a/storage-bigtable/build-proto/Cargo.toml +++ b/storage-bigtable/build-proto/Cargo.toml @@ -12,4 +12,5 @@ version = "1.11.5" [workspace] [dependencies] +protobuf-src = "1.0.5" tonic-build = "0.8.0" diff --git a/storage-bigtable/build-proto/src/main.rs b/storage-bigtable/build-proto/src/main.rs index 4aa408937239fe..09639e457be898 100644 --- a/storage-bigtable/build-proto/src/main.rs +++ b/storage-bigtable/build-proto/src/main.rs @@ -1,4 +1,5 @@ fn main() -> Result<(), std::io::Error> { + std::env::set_var("PROTOC", protobuf_src::protoc()); let manifest_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")); let out_dir = manifest_dir.join("../proto"); diff --git a/storage-proto/Cargo.toml b/storage-proto/Cargo.toml index a876533e16bcc1..e5963d5c15e936 100644 --- a/storage-proto/Cargo.toml +++ b/storage-proto/Cargo.toml @@ -29,4 +29,5 @@ name = "solana_storage_proto" targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] +protobuf-src = "1.0.5" tonic-build = "0.8.0" diff --git a/storage-proto/build.rs b/storage-proto/build.rs index b1ea9903d4fb11..0141e55600cd4b 100644 --- a/storage-proto/build.rs +++ b/storage-proto/build.rs @@ -1,4 +1,5 @@ fn main() -> Result<(), std::io::Error> { + std::env::set_var("PROTOC", protobuf_src::protoc()); let proto_base_path = std::path::PathBuf::from("proto"); let proto_files = ["confirmed_block.proto", "transaction_by_addr.proto"]; let mut protos = Vec::new();