Enable Dynamic Library and Header Package Creation ( experimental PR - Do not Submit)#15
Closed
saksham-chawla wants to merge 1 commit intocodex/replay-pr-147-basefrom
Closed
Enable Dynamic Library and Header Package Creation ( experimental PR - Do not Submit)#15saksham-chawla wants to merge 1 commit intocodex/replay-pr-147-basefrom
saksham-chawla wants to merge 1 commit intocodex/replay-pr-147-basefrom
Conversation
Make communication shared library with all necessary deps and header package for SDK deployment use-cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating a Pull Request to demonstrate the Issues faced for creating a Dynamic Library.
This is temp Pull Request for Score team to review and comment. Provide suggestion on how to proceed.
Enable Dynamic Library and Header Package Creation
This experimental pull request addresses critical challenges in building dynamic libraries and packaging public headers using Bazel for the SCORE Communication middleware. It demonstrates that Bazel's
cc_shared_libraryrule does not automatically include symbols from transitive dependencies, leading to runtime undefined symbol errors. The solution involves explicitly listing all required dependencies in an aggregationcc_librarytarget and using custom Bazel rules to extract and filter public headers for deployment packages.The PR introduces a comprehensive Markdown document (
SYMBOL_INCLUSION_ANALYSIS.md) detailing the problem, comparing failing and working configurations, and outlining best practices for Bazel shared library builds and header management. It also includes new Starlark rules for header extraction and filtering, along with modifications to existingBUILDfiles to implement these solutions and broaden visibility for necessary components.Architecture Diagram:
flowchart TD subgraph Build_System_Rules A[/"'extract_headers.bzl (+79 lines)'"/] -->|defines rule| B[/"'copy_headers.bzl (+123 lines)'"/] C[/"'generate_version_script'"/] end subgraph Core_Build_Configuration D["score/mw/com/deploy/BUILD (+444 lines)"] E["score/mw/com/impl/BUILD (+6 lines)"] F["score/mw/com/impl/tracing/BUILD (+6 lines)"] G["score/mw/com/impl/bindings/lola/BUILD (+6 lines)"] H["score/mw/com/impl/plumbing/BUILD (+3 lines)"] end subgraph Library_Targets I["com_all_deps (cc_library)"] J["libscore_communication.so (cc_shared_library)"] K["libscore_com_import (cc_import)"] L["score_com_dynamic (cc_library)"] end subgraph Application_and_Documentation M["ipc_bridge_dynamic (cc_binary)"] N[/"'SYMBOL_INCLUSION_ANALYSIS.md (+1047 lines)'"/] end D -->|loads| A D -->|loads| B D -->|defines| C D -->|defines| I D -->|defines| J D -->|defines| K D -->|defines| L D -->|defines| M I -->|deps| E I -->|deps| F I -->|deps| G I -->|deps| H J -->|deps| I J -->|uses| C K -->|imports| J L -->|deps| K L -->|hdrs from| B B -->|uses| A M -->|deps| L N -->|explains| D N -->|explains| JThis summary was automatically generated by @propel-code-bot