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

error: failed to run custom build command for substrait #4381

Closed
hadoop835 opened this issue Jul 17, 2024 · 3 comments
Closed

error: failed to run custom build command for substrait #4381

hadoop835 opened this issue Jul 17, 2024 · 3 comments
Labels
C-bug Category Bugs

Comments

@hadoop835
Copy link

hadoop835 commented Jul 17, 2024

What type of bug is this?

Crash

What subsystems are affected?

Standalone mode

Minimal reproduce step

error: failed to run custom build command for substrait v0.34.1

Caused by:
process didn't exit successfully: /usr/local/rustworkspace/greptimedb/target/debug/build/substrait-fe0c8ee7c510b450/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/algebra.proto
cargo:rerun-if-changed=substrait/proto/substrait/capabilities.proto
cargo:rerun-if-changed=substrait/proto/substrait/extended_expression.proto
cargo:rerun-if-changed=substrait/proto/substrait/extensions/extensions.proto
cargo:rerun-if-changed=substrait/proto/substrait/function.proto
cargo:rerun-if-changed=substrait/proto/substrait/parameterized_types.proto
cargo:rerun-if-changed=substrait/proto/substrait/plan.proto
cargo:rerun-if-changed=substrait/proto/substrait/type.proto
cargo:rerun-if-changed=substrait/proto/substrait/type_expressions.proto

--- stderr
Error: Custom { kind: Other, error: "protoc failed: google/protobuf/any.proto: File not found.\nsubstrait/extensions/extensions.proto:6:1: Import "google/protobuf/any.proto" was not found or had errors.\nsubstrait/extensions/extensions.proto:75:3: "google.protobuf.Any" is not defined.\nsubstrait/extensions/extensions.proto:78:3: "google.protobuf.Any" is not defined.\ngoogle/protobuf/empty.proto: File not found.\nsubstrait/type.proto:6:1: Import "google/protobuf/empty.proto" was not found or had errors.\nsubstrait/type.proto:210:7: "google.protobuf.Empty" is not defined.\nsubstrait/algebra.proto:6:1: Import "google/protobuf/any.proto" was not found or had errors.\nsubstrait/algebra.proto:7:1: Import "substrait/extensions/extensions.proto" was not found or had errors.\nsubstrait/algebra.proto:8:1: Import "substrait/type.proto" was not found or had errors.\nsubstrait/algebra.proto:46:7: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:52:7: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:40:5: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:25:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:78:5: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:89:5: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:140:9: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:95:5: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:60:3: "NamedStruct" is not defined.\nsubstrait/algebra.proto:64:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:152:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:178:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:187:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:199:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:217:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:256:5: "Type" is not defined.\nsubstrait/algebra.proto:244:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:275:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:283:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:293:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:310:3: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:316:3: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:323:3: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:377:7: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:342:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:459:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:465:3: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:476:3: "NamedStruct" is not defined.\nsubstrait/algebra.proto:527:3: "NamedStruct" is not defined.\nsubstrait/algebra.proto:654:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:700:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:726:3: "substrait.extensions.AdvancedExtension" is not defined.\nsubstrait/algebra.proto:733:5: "Type" is not defined.\nsubstrait/algebra.proto:893:16: "Type.Parameter" is not defined.\nsubstrait/algebra.proto:898:9: "google.protobuf.Any" is not defined.\nsubstrait/algebra.proto:822:7: "Type" is not defined.\nsubstrait/algebra.proto:824:7: "Type.List" is not defined.\nsubstrait/algebra.proto:825:7: "Type.Map" is not defined.\nsubstrait/algebra.proto:973:5: "Type" is not defined.\nsubstrait/algebra.proto:1012:5: "Type" is not defined.\nsubstrait/algebra.proto:1128:5: "Type" is not defined.\nsubstrait/algebra.proto:1166:5: "Type" is not defined.\nsubstrait/algebra.proto:1481:3: "Type" is not defined.\n" }
warning: build failed, waiting for other jobs to finish...

What did you expect to see?

ailed to run custom build command for substrait v0.34.1

What did you see instead?

ailed to run custom build command for substrait v0.34.1

What operating system did you use?

almalinux
image

What version of GreptimeDB did you use?

0.9

Relevant log output and stack trace

No response

@hadoop835 hadoop835 added the C-bug Category Bugs label Jul 17, 2024
@waynexia
Copy link
Member

Have you tried cargo clean and built it again from scratch?

@evenyag
Copy link
Contributor

evenyag commented Jul 18, 2024

https://github.com/substrait-io/substrait-rs/tree/v0.34.1
Maybe you can build the substrait project in your environment to see if the same error occurs.

@evenyag
Copy link
Contributor

evenyag commented Jan 23, 2025

@hadoop835 Hi, I recently solved a similar issue. I found the cause is that I didn't put the include directly to the $PATH and installed the protobuf correctly.

I downloaded the official protobuf build from the release page https://github.com/protocolbuffers/protobuf/releases

If you unzip the archive you can find

bin
include
readme.txt

Here is the readme file in the zip archive.

Protocol Buffers - Google's data interchange format
Copyright 2008 Google Inc.
https://developers.google.com/protocol-buffers/
This package contains a precompiled binary version of the protocol buffer
compiler (protoc). This binary is intended for users who want to use Protocol
Buffers in languages other than C++ but do not want to compile protoc
themselves. To install, simply place this binary somewhere in your PATH.
If you intend to use the included well known types then don't forget to
copy the contents of the 'include' directory somewhere as well, for example
into '/usr/local/include/'.
Please refer to our official github site for more installation instructions:
  https://github.com/protocolbuffers/protobuf

I put protoc in $HOME/bin and added it to $PATH.

PATH="$HOME/bin:$PATH"

Then I found the protoc couldn't find the include path even though I copied the include directory to /usr/local and /usr/.

After I copied the include directory to $HOME/bin, the protoc finally found it......

Some related issues

@evenyag evenyag changed the title cargo build error: failed to run custom build command for substrait Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs
Projects
None yet
Development

No branches or pull requests

4 participants