Dynamically links libstd++ and libgcc #5373
Open
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.
High Level Overview of Change
Dynamically links libstd++ and libgcc to reduce binary bloat and enhance compatibility with dependencies.
Context of Change
Currently libstd++ and libgcc are statically linked into the Linux rippled binary. This is helpful in situations where the binary is run on systems that have different versions of these libraries. However, statically linking also has downsides, such as bloating the binary and an inability to use certain other dependencies that use dlsym.
By dynamically linking these libraries we keep the binary lean, and since rippled is not typically run on minimal distros that don't have them already installed, but instead on standard systems that will have them, the binary will generally run as expected. If not, these standard libraries can be easily installed.
See also #5372
Type of Change
For Linux developers, nothing will change as the build tools already include libstd++ and libgcc. For those running from a package, their Linux machines will need to manually install libstd++ and libgcc to run a precompiled binary until the packages have been updated to install these build tools automatically.
Future Tasks
Update the rippled packages to install libstd++ and libgcc if not yet present.