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

Add option to build on non-glibc env #32943

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

at-wat
Copy link
Contributor

@at-wat at-wat commented Jan 14, 2025

What does this PR do?

Add an build option (--non-glibc --no-glibc) to build the agent on non-glibc environment like musl libc.
The option disables system-probe gpu module and corechecks gpu collector using github.com/NVIDIA/go-nvml which depends on a glibc-extended definition.

Motivation

(reported at #32942)
Recently added system-probe gpu module and corechecks gpu collector use github.com/NVIDIA/go-nvml which requires glibc.
So, agent can't be built for non-glibc environments like Alpine Linux and Arch Linux which use musl libc.

Describe how you validated your changes

I applied this change as a patch to seqsense/datadog-agent-alpine#134 and confirmed that the build is fixed by setting the option --non-glibc --no-glibc.

Possible Drawbacks / Trade-offs

The doesn't take effect unless setting the option.

Additional Notes

Add an build option (`--non-glibc`) to build the agent on
non-glibc environment like musl libc.
The option disables system-probe gpu module and
corechecks gpu collector using `github.com/NVIDIA/go-nvml`
which depends on a glibc-extended definition.
Copy link
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small edits, but approving to not block.

---
enhancements:
- |
Add an build option (`--non-glibc`) to build the agent on non-glibc environment like musl libc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Add an build option (`--non-glibc`) to build the agent on non-glibc environment like musl libc.
Add an build option (`--non-glibc`) to build the Agent on `non-glibc` environment like musl libc.

Copy link
Member

@brycekahle brycekahle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments

tasks/agent.py Outdated Show resolved Hide resolved
tasks/system_probe.py Outdated Show resolved Hide resolved
cmd/system-probe/modules/all_linux.go Show resolved Hide resolved
@at-wat at-wat requested review from a team as code owners January 15, 2025 06:50
@KSerrania KSerrania requested a review from a team January 15, 2025 08:35
@at-wat at-wat requested a review from brycekahle January 17, 2025 05:07
cmd/system-probe/modules/gpu.go Outdated Show resolved Hide resolved
tasks/agent.py Outdated Show resolved Hide resolved
tasks/agent.py Outdated Show resolved Hide resolved
tasks/agent.py Outdated Show resolved Hide resolved
tasks/system_probe.py Outdated Show resolved Hide resolved
tasks/system_probe.py Outdated Show resolved Hide resolved
tasks/system_probe.py Outdated Show resolved Hide resolved
tasks/system_probe.py Outdated Show resolved Hide resolved
cmd/system-probe/modules/all_linux_arm64.go Outdated Show resolved Hide resolved
cmd/system-probe/modules/all_glibc_linux_arm64.go Outdated Show resolved Hide resolved
@at-wat at-wat requested a review from brycekahle January 20, 2025 05:22
@brycekahle brycekahle added this to the 7.63.0 milestone Jan 21, 2025
@brycekahle brycekahle added the qa/done QA done before merge and regressions are covered by tests label Jan 21, 2025
tasks/build_tags.py Outdated Show resolved Hide resolved
tasks/build_tags.py Outdated Show resolved Hide resolved
@brycekahle
Copy link
Member

Waiting for results of internal CI pipeline. I'll report back once it is complete.

Co-authored-by: Bryce Kahle <[email protected]>
@brycekahle brycekahle modified the milestones: 7.63.0, 7.64.0 Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community component/system-probe qa/done QA done before merge and regressions are covered by tests team/ebpf-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants