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

deepflow-agent compile failed: ND_UINT8、ND_SIZET undefined #6352

Closed
2 of 3 tasks
qiaozeguang opened this issue May 9, 2024 · 2 comments
Closed
2 of 3 tasks

deepflow-agent compile failed: ND_UINT8、ND_SIZET undefined #6352

qiaozeguang opened this issue May 9, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@qiaozeguang
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

DeepFlow Component

Agent

What you expected to happen

内核版本为6.3.9,centos版本为7.9的虚拟机中,在deepflow tag v6.4.9上进行手动编译,出现如下error

--- stderr
user/symbol.c: In function ‘resolve_func_ret_addr’:
user/symbol.c:213:43: error: ‘ND_UINT8’ undeclared (first use in this function)
213 | status = NdDecodeEx(&ix, (ND_UINT8 *) (buffer + offset), remian,
| ^~~~~~~~
user/symbol.c:213:43: note: each undeclared identifier is reported only once for each function it appears in
user/symbol.c:213:53: error: expected expression before ‘)’ token
213 | status = NdDecodeEx(&ix, (ND_UINT8 *) (buffer + offset), remian,
| ^
user/symbol.c: At top level:
user/symbol.c:459:33: error: unknown type name ‘ND_SIZET’; did you mean ‘ND_SIB’?
459 | void *nd_memset(void *s, int c, ND_SIZET n)
| ^~~~~~~~
| ND_SIB
make: *** [Makefile:158:staticobjs/user/symbol.o] 错误 1

thread 'main' panicked at build.rs:94:9:
compile libtrace.a error!
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

image


在项目中全局搜索ND_UINT8和ND_SIZET,除agent/src/ebpf/user/symbol.c本身在使用外,均查询不到定义的地方
image

image

How to reproduce

cargo build

DeepFlow version

No response

DeepFlow agent list

No response

Kubernetes CNI

No response

Operation-System/Kernel version

centos版本为7.9
内核版本为6.3.9

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@qiaozeguang qiaozeguang added the bug Something isn't working label May 9, 2024
@sharang
Copy link
Member

sharang commented May 14, 2024

https://mp.weixin.qq.com/s/-jWYq2rTRaTueuN0sAb3lA 这个文章是否有帮助?

@sharang sharang changed the title deepflow agent 手动编译失败,提示ND_UINT8、ND_SIZET未定义 deepflow-agent compile failed: ND_UINT8、ND_SIZET undefined May 14, 2024
@sharang sharang added help wanted Extra attention is needed and removed bug Something isn't working labels May 14, 2024
@1473371932
Copy link
Contributor

手动编译坑比较多,很多情况下即使按照文档来也不一定成功。所以我们更建议使用上一条回复的链接中我们构建好的镜像来编译。
如果情况特殊,不得不手动编译,可以参考我们的构建的环境的 Dockerfile,可以参考这个去装一下依赖:
https://github.com/deepflowio/deepflow/blob/package-rust-env/agent/docker/DockerfileToFix.build

@sharang sharang closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants