Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo build fails on distros that rely on protobuf-devel #37

Open
grenade opened this issue Nov 20, 2024 · 0 comments
Open

cargo build fails on distros that rely on protobuf-devel #37

grenade opened this issue Nov 20, 2024 · 0 comments

Comments

@grenade
Copy link

grenade commented Nov 20, 2024

on centos, fedora or any distro supported by rpm package managers, the well known google protobuf types duration.proto and timestamp.proto depended on by this library and imported by many modules contained here, are not made available to the protoc compile process because the directory containing them is not passed to protoc as an import inclusion (protoc --proto_path=/usr/include ...)

to reproduce the issue on an rpm based system:

  • install protobuf-devel:
    sudo dnf install protobuf-devel
  • verify the installation of the required protobuf types:
    rpm -ql protobuf-devel | grep duration.proto
    /usr/include/google/protobuf/duration.proto
    rpm -ql protobuf-devel | grep timestamp.proto
    /usr/include/google/protobuf/timestamp.proto
  • clone the influxdb3_core repo:
    git clone https://github.com/influxdata/influxdb3_core /tmp/influxdb3_core
  • build the influxdb3_core repo:
    cargo build --manifest-path /tmp/influxdb3_core/Cargo.toml
  • observe the build failures in the build log:
    error: failed to run custom build command for `grpc-binary-logger-proto v0.1.0 (/tmp/influxdb3_core/grpc-binary-logger-proto)`
    
    Caused by:
      process didn't exit successfully: `/tmp/influxdb3_core/target/debug/build/grpc-binary-logger-proto-0e95d54cc17c3e5f/build-script-build` (exit status: 1)
      --- stdout
      cargo:rerun-if-changed=proto/grpc/binlog/v1/binarylog.proto
      cargo:rerun-if-changed=proto/grpc/binlog/v1
    
      --- stderr
    Error: Custom { kind: Other, error: "protoc failed: google/protobuf/duration.proto: File not found.\ngoogle/protobuf/timestamp.proto: File not found.\nbinarylog.proto:23:1: Import \"google/protobuf/duration.proto\" was not found or had errors.\nbinarylog.proto:24:1: Import \"google/protobuf/timestamp.proto\" was not found or had errors.\nbinarylog.proto:73:3: \"google.protobuf.Timestamp\" is not defined.\nbinarylog.proto:129:3: \"google.protobuf.Duration\" is not defined.\n" }
    warning: build failed, waiting for other jobs to finish...
    error: failed to run custom build command for `generated_types v0.1.0 (/tmp/influxdb3_core/generated_types)`
    
    Caused by:
      process didn't exit successfully: `/tmp/influxdb3_core/target/debug/build/generated_types-749a2f76ab778766/build-script-build` (exit status: 1)
      --- stderr
    Error: Custom { kind: Other, error: "protoc failed: google/protobuf/timestamp.proto: File not found.\ninfluxdata/iox/authz/pusher/v1/pusher.proto:5:1: Import \"google/protobuf/timestamp.proto\" was not found or had errors.\ninfluxdata/iox/authz/pusher/v1/pusher.proto:10:12: \"google.protobuf.Timestamp\" is not defined.\n" }
    

a patch to resolve this has been provided at: #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant