Skip to content

Conversation

@TheSpecial2015
Copy link

@TheSpecial2015 TheSpecial2015 commented Dec 19, 2025

Rename add_custom_target (check ... to nghttp2_check as it conflicts with another variable with the same name.
This happens when building from source with -DFLB_AVRO_ENCODER=On

ERROR TEXT:

CMake Error at lib/nghttp2-1.65.0/CMakeLists.txt:191 (add_custom_target):
  add_custom_target cannot create target "check" because another target with
  the same name already exists. The existing target is a custom target
  created in source directory
  "/tmp/build/fluent-bit-4.2.1/lib/jansson-e23f558". See documentation for
  policy CMP0002 for more details.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Chores
    • Updated build system configuration for the nghttp2 library.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 19, 2025

Walkthrough

The pull request renames a CMake custom target from check to nghttp2_check in the nghttp2 build configuration, preserving the underlying ctest command invocation without altering any triggering conditions or build behavior.

Changes

Cohort / File(s) Summary
CMake build configuration
lib/nghttp2-1.65.0/CMakeLists.txt
Renamed custom test target from check to nghttp2_check while preserving ctest command; no behavioral changes

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single file modified with a straightforward target rename
  • No logic, functionality, or dependency changes
  • No exposed APIs or public declarations affected

Poem

A rabbit hops through the build so bright,
Renaming targets left and right,
From check to nghttp2_check it goes,
Simple and clean as the garden grows! 🐰✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and specifically describes the main change: renaming a CMake custom target from 'check' to 'nghttp2_check' to resolve a naming conflict.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9f26a9 and 2a41586.

📒 Files selected for processing (1)
  • lib/nghttp2-1.65.0/CMakeLists.txt (1 hunks)
🔇 Additional comments (1)
lib/nghttp2-1.65.0/CMakeLists.txt (1)

191-191: Correctly resolves CMake target naming conflict with jansson library.

The rename from check to nghttp2_check is necessary when building fluent-bit with -DFLB_AVRO_ENCODER=On. Since both jansson and nghttp2 define a custom check target via add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}), the namespace collision causes CMake to fail. Prefixing nghttp2's target avoids this without affecting functionality.


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 and usage tips.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant