Skip to content

[Refactor:Plagiarism] Link Boost statically#99

Open
williamjallen wants to merge 4 commits intomainfrom
boost-static
Open

[Refactor:Plagiarism] Link Boost statically#99
williamjallen wants to merge 4 commits intomainfrom
boost-static

Conversation

@williamjallen
Copy link
Copy Markdown
Member

@williamjallen williamjallen commented May 7, 2023

What is the current behavior?

Boost is currently linked dynamically, which causes Lichen to be fragile when changes are made to the underlying operating system.

What is the new behavior?

Links Boost statically, using CMake instead of a manual compilation line. This change significantly reduced the size of the Lichen Docker image, at the expense of a much larger executable.

Image size:

Initial: 2.1 GB
Final: 1.5 GB

Executable size:

Initial: 3.4 MB
Final: 7.2 MB

@williamjallen williamjallen requested a review from cjreed121 May 7, 2023 21:25
@cjreed121
Copy link
Copy Markdown
Member

Could you add stats of how much the docker image size changed and how the the executable size changed?

@williamjallen williamjallen changed the title Link Boost statically [Refactor:Plagiarism] Link Boost statically May 7, 2023
@williamjallen
Copy link
Copy Markdown
Member Author

Closing this in favor of compiling all C++ code in the container, and then squashing intermediate layers to keep the container size small. A PR with those changes will be forthcoming.

@williamjallen
Copy link
Copy Markdown
Member Author

Opening this back up for review since it doesn't harm anything and adds a basic CMake config. I plan to build on this in a future PR.

@williamjallen williamjallen requested a review from bmcutler March 30, 2026 01:34
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.

3 participants