Skip to content

fix(kafka_protocol_adaptor): correct RDKAFKA_INC for apt-installed librdkafka-dev - #4

Merged
nvankita merged 1 commit into
mainfrom
fix/kafka-rdkafka-inc-path
May 15, 2026
Merged

nvankita merged 1 commit into
mainfrom
fix/kafka-rdkafka-inc-path

Conversation

@nvankita

Copy link
Copy Markdown
Collaborator

Summary

sudo make inside src/utils/nvds_msgapi/kafka_protocol_adaptor/ failed with:

```
kafka_client.h:19:10: fatal error: rdkafka.h: No such file or directory
19 | #include "rdkafka.h"
```

The adaptor's Makefile hard-coded RDKAFKA_INC=/usr/local/include/librdkafka, but the adaptor's README directs users to apt install librdkafka-dev, which places the header at /usr/include/librdkafka/. Reverted RDKAFKA_INC to /usr/include/librdkafka — matches the public DS 9.0 release Makefile that this tree was originally derived from.

Root cause

The line was a divergence from the public DS 9.0 source that snuck in during initial mono-repo import; it travelled here when the mono-repo's src/ tree was migrated to this GitHub repo in PR #2. SQA flagged it while trying the manual sudo make flow documented in the adaptor README.

Validation

  • Same one-line change already validated on the internal mono-repo (GitLab MR !92, commit f4ad051): sudo make NVDS_VERSION=9.0 produces libnvds_kafka_proto.so cleanly with librdkafka-dev 2.3.0-1build2 + libjansson-dev 2.14-2build2 from Ubuntu noble.
  • Diff is byte-identical between the two repos (Makefiles match line-for-line apart from this), so no separate validation re-run on the GitHub clone is needed.

Follow-ups (not in this PR)

  • NVDS_VERSION has no default in the kafka Makefile, so direct sudo make (without NVDS_VERSION=9.0) expands the install path to /opt/nvidia/deepstream/deepstream-/lib/. Either default NVDS_VERSION ?= 9.0 in the Makefile or note it in the adaptor README.
  • build.sh msgapi loop silently ignores failures (make ... 2>/dev/null || true) — should be tightened so future adaptor regressions surface.

…brdkafka-dev

apt install librdkafka-dev (per the adaptor README) lands rdkafka.h at
/usr/include/librdkafka/, not /usr/local/include/librdkafka/. Revert
RDKAFKA_INC to /usr/include/librdkafka to match the public DS 9.0
Makefile and unbreak `sudo make` in the kafka adaptor directory.

Ported from internal GitLab mono-repo MR !92 (commit f4ad051), validated
on x86 with librdkafka-dev 2.3.0-1build2 from Ubuntu noble.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Committed-By: ankitat's Claude Agent
Codex Review: Approved:
@nvankita
nvankita merged commit 811d2f0 into main May 15, 2026
@nvankita
nvankita deleted the fix/kafka-rdkafka-inc-path branch May 15, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant