Skip to content

Fix tsapi build with ENABLE_PROBES=ON#13276

Open
Clendenin wants to merge 1 commit into
apache:masterfrom
Clendenin:bugfix/tsapi-systemtap-link
Open

Fix tsapi build with ENABLE_PROBES=ON#13276
Clendenin wants to merge 1 commit into
apache:masterfrom
Clendenin:bugfix/tsapi-systemtap-link

Conversation

@Clendenin

Copy link
Copy Markdown
Contributor

Cache headers transitively pull in <ts/ats_probe.h> via P_CacheDir.h. When ENABLE_PROBES=ON, ENABLE_SYSTEMTAP_PROBES is defined and ats_probe.h #include <sys/sdt.h>. tsapi's include path didn't have lib/systemtap.

Cache headers transitively pull in <ts/ats_probe.h> via P_CacheDir.h.
When ENABLE_PROBES=ON, ENABLE_SYSTEMTAP_PROBES is defined and
ats_probe.h `#include <sys/sdt.h>`. tsapi's include path didn't have
lib/systemtap, so the build failed.

Mirror what tscore already does (src/tscore/CMakeLists.txt:110), gated
on ENABLE_PROBES so the dependency only attaches when probes are
actually enabled.
@cmcfarlen cmcfarlen added the Build work related to build configuration or environment label Jun 15, 2026
@cmcfarlen cmcfarlen added this to the 11.0.0 milestone Jun 15, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

This was introduced in #13245, but the root issue is including a private header file from a public one and exposing impl details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes building the tsapi shared library when -DENABLE_PROBES=ON by ensuring tsapi gets the in-tree SystemTap SDT header include path (lib/systemtap) via the existing systemtap::systemtap interface target.

Changes:

  • Conditionally link tsapi against systemtap::systemtap when ENABLE_PROBES is enabled so <sys/sdt.h> can be found during compilation.

@cmcfarlen

Copy link
Copy Markdown
Contributor

[approve ci autest 3]

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

Labels

Build work related to build configuration or environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants