rust-client: Build with qdrant-client fails

How to reproduce

  • Create a new Rust application: cargo new test-qdrant-client
  • Add qdrant-client as specified in docs: cargo add qdrant-client
  • Build app: cargo build

Expected result

App builds successfully, prints Hello World

Actual result

Build fails with message Error: Custom { kind: Other, error: "protoc failed: collections.proto:73:12: Explicit ‘optional’ labels are disallowed in the Proto3 syntax. To define ‘optional’ fields in Proto3, simply remove the ‘optional’ label, as fields are ‘optional’ by default.\n…

Environment

Identical behavior with rust stable (rustc 1.67.1) and rust nightly (rustc 1.69.0-nightly).

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (9 by maintainers)

Most upvoted comments

Just adding this in case anyone else is having problems. I had the same problem as above that it would not build on WSL2 for Windows.

Steps I took where:

  1. Install the latest binary manually, the default install gave an old version.
  2. Change PROTOC and PROTOC_INCLUDE env variables to point to the bin and the /include folder.

For people having similar problems: For me, setting PROTOC_INCLUDE to /usr/include helped.

@rstropek alright, good luck with the investigation 👍

@MrBeeMovie do you have a similar setup?

I am on Windows. I was able to fix by setting path for PROTOC env variable.

@agourlay I have meetings all through the day today. Let’s discuss a time for the debugging session when we meet today in the evening.