Skip to content

Fix boostcontext build fail when both asan and normal libboost_context coexists#234

Merged
githubzilla merged 14 commits intoeloqdata:eloq-10.6.10from
githubzilla:fix_boostcontext_build_fail
Feb 11, 2026
Merged

Fix boostcontext build fail when both asan and normal libboost_context coexists#234
githubzilla merged 14 commits intoeloqdata:eloq-10.6.10from
githubzilla:fix_boostcontext_build_fail

Conversation

@githubzilla
Copy link
Collaborator

@githubzilla githubzilla commented Feb 11, 2026

Fix libboost_context mismatch when both asan and normal libs coexists.
There is no such problem when eloqstore is enabled, but this bug raise when using other data store, since the coexists of the two libs has been well handled in the build_eloqstore.cmake file.

Summary by CodeRabbit

  • Chores
    • Improved build configuration handling to support different compilation environments.

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

Modified sql/CMakeLists.txt to conditionally locate either the ASAN-aware or standard Boost.Context library based on the WITH_ASAN flag, with fallback error handling and diagnostic messages for the located library paths.

Changes

Cohort / File(s) Summary
CMake Build Configuration
sql/CMakeLists.txt
Replaced unconditional Boost::context inclusion with ASAN-aware conditional logic that selects boost_context-asan library when ASAN is enabled, otherwise uses standard boost_context. Added error handling and diagnostic path output for both branches.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • #193: Complements this PR by adding SQL_USE_ASAN_UCONTEXT compile definition and enabling ASAN ucontext backend, working in tandem with the conditional Boost.Context library selection.

Suggested labels

trigger-ci

Poem

🐰 A tale of contexts, two paths so bright,
One for ASAN's sanitizing might,
One for the standard, clear and clean,
CMake knows which shall convene!
With diagnostics along the way,
The build hops forward, hip-hooray! 🐇

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main fix: handling the coexistence of ASAN and normal libboost_context libraries in the build process, which matches the core changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
sql/CMakeLists.txt (1)

294-294: Use message(STATUS ...) for diagnostic output.

message("...") without a mode prints to stderr without a prefix and is conventionally reserved for important/warning-level output. Diagnostic/informational messages should use STATUS to follow CMake conventions and keep the configure output tidy.

Proposed fix
-    message("Boost_CONTEXT_ASAN_LIBRARY: ${Boost_CONTEXT_ASAN_LIBRARY}")
+    message(STATUS "Boost_CONTEXT_ASAN_LIBRARY: ${Boost_CONTEXT_ASAN_LIBRARY}")
-    message("Boost_CONTEXT_LIBRARY: ${Boost_CONTEXT_LIBRARY}")
+    message(STATUS "Boost_CONTEXT_LIBRARY: ${Boost_CONTEXT_LIBRARY}")

Also applies to: 302-302


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.

@githubzilla githubzilla force-pushed the fix_boostcontext_build_fail branch from 95454d6 to f7058cb Compare February 11, 2026 04:39
@githubzilla githubzilla merged commit 5b0e29b into eloqdata:eloq-10.6.10 Feb 11, 2026
2 of 3 checks passed
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.

2 participants