lancedb / lance

Modern columnar data format for ML and LLMs implemented in Rust. Convert from parquet in 2 lines of code for 100x faster random access, vector index, and data versioning. Compatible with Pandas, DuckDB, Polars, Pyarrow, and PyTorch with more integrations coming..
https://lancedb.github.io/lance/
Apache License 2.0
3.98k stars 227 forks source link

Remove `protoc` requirement #3073

Open emilk opened 3 weeks ago

emilk commented 3 weeks ago

Trying to add lance as a dependency currently results in a build error:

error: failed to run custom build command for `lance-encoding v0.18.2`
Caused by:
  process didn't exit successfully: `lance-encoding-b1cb34df4c6a6aa9/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=protos

  --- 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" }

You should instead check in the generated code, and include it in the crate. The build.rs should do nothing (or ideally, not exist).

loloxwg commented 4 days ago

error: failed to run custom build command for lance-encoding v0.20.0 (https://github.com/lancedb/lance.git?tag=v0.20.0-beta.2#920b1918) note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation. Caused by: process didn't exit successfully: /Users/xwg/dev/rust/lancedb/target/debug/build/lance-encoding-b8d4df13f280b9ab/build-script-build (exit status: 1) --- stdout cargo:rerun-if-changed=protos --- stderr Error: Custom { kind: Other, error: "protoc failed: google/protobuf/empty.proto: File not found.\nencodings.proto:8:1: Import \"google/protobuf/empty.proto\" was not found or had errors.\nencodings.proto:303:5: \"google.protobuf.Empty\" is not defined.\n" }

loloxwg commented 2 days ago

@emilk How to temporarily alleviate this problem