Skip to content

Adjust eBPF in static buidling - #23612

Draft
thiagoftsm wants to merge 1 commit into
netdata:masterfrom
thiagoftsm:adjust_core
Draft

Adjust eBPF in static buidling#23612
thiagoftsm wants to merge 1 commit into
netdata:masterfrom
thiagoftsm:adjust_core

Conversation

@thiagoftsm

@thiagoftsm thiagoftsm commented Aug 23, 2026

Copy link
Copy Markdown
Contributor
Summary

Fix #23604

Test Plan
  1. Check CI
Additional Information
For users: How does this change affect me?

Summary by cubic

Make bundled libraries always build as static and use STATIC_BUILD to control whether Netdata links statically, fixing static eBPF/protobuf selection. Previously BUILD_SHARED_LIBS mirrored STATIC_BUILD; now BUILD_SHARED_LIBS is forced OFF and only bundled deps are affected, while STATIC_BUILD governs final linking.

  • CMakeLists.txt: unconditionally sets BUILD_SHARED_LIBS=OFF; intent remains in STATIC_BUILD.
  • NetdataEBPFLegacy.cmake and NetdataProtobuf.cmake: switch checks from BUILD_SHARED_LIBS to STATIC_BUILD to choose static artifacts, resolving incorrect behavior in static builds (issue ebpf-code-legacy packages fetch the kernel-collector flavor selected by an inverted condition #23604).
  • netdata-installer.sh: removes -DBUILD_SHARED_LIBS=Off since CMake enforces it.
  • Migration: use -DSTATIC_BUILD=On to request fully static binaries; stop setting -DBUILD_SHARED_LIBS. Dynamic builds continue to link against system libs; bundled deps are static-only.

Written for commit 823e819. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added area/packaging Packaging and operating systems support area/build Build system (autotools and cmake). labels Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build system (autotools and cmake). area/packaging Packaging and operating systems support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ebpf-code-legacy packages fetch the kernel-collector flavor selected by an inverted condition

1 participant