deepflow
deepflow copied to clipboard
[BUG] ubuntu 编译报错问题
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
DeepFlow Component
Agent
What you expected to happen
编译环境
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
cargo version
cargo 1.81.0 (2dbb1af80 2024-08-20)
编译代码
v6.6.4
编译组件
agent
编译方式
docker run --privileged --rm -it -v $(pwd):/deepflow -v ~/.cargo:/usr/local/cargo hub.deepflow.yunshan.net/public/rust-build bash -c "cd /deepflow/agent && cargo build"
编译报错
docker run --privileged --rm -it -v $(pwd):/deepflow -v ~/.cargo:/usr/local/cargo hub.deepflow.yunshan.net/public/rust-build bash -c "cd /deepflow/agent && cargo build"
Downloaded time-core v0.1.1
Downloaded time-macros v0.2.9
Downloaded time v0.1.45
Downloaded chrono v0.4.26
Downloaded time v0.3.21
Downloaded zstd-sys v2.0.8+zstd.1.5.5
Downloaded 6 crates (1.1 MB) in 2.15s
Compiling time v0.1.45
Compiling zstd-sys v2.0.8+zstd.1.5.5
Compiling chrono v0.4.26
Compiling k8s-openapi v0.15.0
Compiling public v0.1.0 (/deepflow/agent/crates/public)
error: failed to run custom build command for `public v0.1.0 (/deepflow/agent/crates/public)`
Caused by:
process didn't exit successfully: `/deepflow/agent/target/debug/build/public-1ece5d554420c41b/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=../../../message/agent.proto
cargo:rerun-if-changed=../../../message/common.proto
cargo:rerun-if-changed=../../../message/trident.proto
cargo:rerun-if-changed=../../../message/metric.proto
cargo:rerun-if-changed=../../../message/flow_log.proto
cargo:rerun-if-changed=../../../message/stats.proto
cargo:rerun-if-changed=../../../message/k8s_event.proto
cargo:rerun-if-changed=../../../message
cargo:rerun-if-changed=../../../message/opentelemetry/opentelemetry/proto/trace/v1/trace.proto
cargo:rerun-if-changed=../../../message/opentelemetry
--- stderr
Error: Custom { kind: Other, error: "protoc failed: ../../../message/opentelemetry/opentelemetry/proto/trace/v1/trace.proto: No such file or directory\n" }
warning: build failed, waiting for other jobs to finish...
How to reproduce
docker run --privileged --rm -it -v $(pwd):/deepflow -v ~/.cargo:/usr/local/cargo hub.deepflow.yunshan.net/public/rust-build bash -c "cd /deepflow/agent && cargo build"
Downloaded time-core v0.1.1
Downloaded time-macros v0.2.9
Downloaded time v0.1.45
Downloaded chrono v0.4.26
Downloaded time v0.3.21
Downloaded zstd-sys v2.0.8+zstd.1.5.5
Downloaded 6 crates (1.1 MB) in 2.15s
Compiling time v0.1.45
Compiling zstd-sys v2.0.8+zstd.1.5.5
Compiling chrono v0.4.26
Compiling k8s-openapi v0.15.0
Compiling public v0.1.0 (/deepflow/agent/crates/public)
error: failed to run custom build command for `public v0.1.0 (/deepflow/agent/crates/public)`
Caused by:
process didn't exit successfully: `/deepflow/agent/target/debug/build/public-1ece5d554420c41b/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=../../../message/agent.proto
cargo:rerun-if-changed=../../../message/common.proto
cargo:rerun-if-changed=../../../message/trident.proto
cargo:rerun-if-changed=../../../message/metric.proto
cargo:rerun-if-changed=../../../message/flow_log.proto
cargo:rerun-if-changed=../../../message/stats.proto
cargo:rerun-if-changed=../../../message/k8s_event.proto
cargo:rerun-if-changed=../../../message
cargo:rerun-if-changed=../../../message/opentelemetry/opentelemetry/proto/trace/v1/trace.proto
cargo:rerun-if-changed=../../../message/opentelemetry
--- stderr
Error: Custom { kind: Other, error: "protoc failed: ../../../message/opentelemetry/opentelemetry/proto/trace/v1/trace.proto: No such file or directory\n" }
warning: build failed, waiting for other jobs to finish...
DeepFlow version
v6.6.4
DeepFlow agent list
暂无
Kubernetes CNI
暂无
Operation-System/Kernel version
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal
Anything else
编译报错
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
看起来像是没有clone子模块,可以使用
git clone --recursive https://github.com/deepflowio/deepflow.git