Skip to content

Fix tsapi build with ENABLE_PROBES=ON - #13276

Merged
bneradt merged 1 commit into
apache:masterfrom
Clendenin:bugfix/tsapi-systemtap-link
Jun 16, 2026
Merged

Fix tsapi build with ENABLE_PROBES=ON#13276
bneradt merged 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]

@bneradt
bneradt merged commit 52a124b into apache:master Jun 16, 2026
15 checks passed
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
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 pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
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.

(cherry picked from commit 52a124b)
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Jul 29, 2026
@github-project-automation github-project-automation Bot moved this from Picked v10.2.0 to For v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen moved this to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
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

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

4 participants