Skip to content

docs(rust): mention protobuf requirement in README #2956

@daipom

Description

@daipom

What feature or improvement would you like to see?

Current

## Development
To run the integration tests you must:
1. Install [SQLite](https://www.sqlite.org/) and have its dynamic library in path.
1. Build the official ADBC SQLite driver by following the [documentation](../CONTRIBUTING.md).
1. Place the resulting object file into your dynamic loader path or set
`LD_LIBRARY_PATH/DYLD_LIBRARY_PATH` appropriately.
1. Run `cargo test --all-features --workspace`

Issue

It would be helpful to have a note saying that a recent version of protobuf is required.

Without installing protobuf, the build fails as follows.

$ cargo test
...
   Compiling datafusion-common v47.0.0
error: failed to run custom build command for `substrait v0.55.1`

Caused by:
  process didn't exit successfully: `/home/daipom/work/apache-arrow/arrow-adbc/rust/target/debug/build/substrait-0a2276d408d79f0a/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=FORCE_REBUILD
  cargo:rerun-if-changed=substrait
  cargo:rerun-if-changed=substrait/text/simple_extensions_schema.yaml
  cargo:rerun-if-changed=substrait/proto/substrait/plan.proto
  cargo:rerun-if-changed=substrait/proto/substrait/type_expressions.proto
  cargo:rerun-if-changed=substrait/proto/substrait/extended_expression.proto
  cargo:rerun-if-changed=substrait/proto/substrait/algebra.proto
  cargo:rerun-if-changed=substrait/proto/substrait/function.proto
  cargo:rerun-if-changed=substrait/proto/substrait/capabilities.proto
  cargo:rerun-if-changed=substrait/proto/substrait/extensions/extensions.proto
  cargo:rerun-if-changed=substrait/proto/substrait/type.proto
  cargo:rerun-if-changed=substrait/proto/substrait/parameterized_types.proto

  --- stderr
  Error: Custom { kind: NotFound, error: "Could not find `protoc`. If `protoc` is installed, try setting the `PROTOC` environment variable to the path of the `protoc` binary. To install it on Debian, run `apt-get install protobuf-compiler`. It is also available at https://github.com/protocolbuffers/protobuf/releases  For more information: https://docs.rs/prost-build/#sourcing-protoc" }

In addition, if you install protobuf-compiler by apt as described in this error message, a very old version of protoc is installed, and the build eventually fails.

$ cargo test
...
Compiling substrait v0.55.1
error: failed to run custom build command for `substrait v0.55.1`
Caused by:
  process didn't exit successfully: `/home/daipom/work/apache-arrow/arrow-adbc/rust/target/debug/build/substrait-0a2276d408d79f0a/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=FORCE_REBUILD
  cargo:rerun-if-changed=substrait
  cargo:rerun-if-changed=substrait/text/simple_extensions_schema.yaml
  cargo:rerun-if-changed=substrait/proto/substrait/plan.proto
  cargo:rerun-if-changed=substrait/proto/substrait/type_expressions.proto
  cargo:rerun-if-changed=substrait/proto/substrait/extended_expression.proto
  cargo:rerun-if-changed=substrait/proto/substrait/algebra.proto
  cargo:rerun-if-changed=substrait/proto/substrait/function.proto
  cargo:rerun-if-changed=substrait/proto/substrait/capabilities.proto
  cargo:rerun-if-changed=substrait/proto/substrait/extensions/extensions.proto
  cargo:rerun-if-changed=substrait/proto/substrait/type.proto
  cargo:rerun-if-changed=substrait/proto/substrait/parameterized_types.proto
  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: substrait/algebra.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.\n" }

Improve

Add the following steps:

  • Download a recent version of protobuf from the release page and add protoc to the PATH.

ref:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions