Make libbacktrace an optional dependency #434
Merged
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.
libbacktrace is not available in some distributions where Extension Manager is available as a native package, e.g. Gentoo, Debian. Yet the backtraces that libbacktrace helps to collect are vital information for a crash report.
To help both these distributions continue shipping Extension Manager as a native package and users who install this app via Flathub report crashes with backtraces, I have created this patch to make libbacktrace an optional dependency. It introduces a new
backtrace
Meson boolean option, which controls whether Extension Manager is to be built with libbacktrace. It is set totrue
by default, so existing build pipelines, e.g. this repo's GitHub Action workflow, behave the same as before. Folks who wish to build Extension Manager without libbacktrace can do it by setting-Dbacktrace=false
in Meson command-line options.I have tested this patch through the Gentoo GURU package for Extension Manager, which I maintain, for about a month now without any observation of issues.
If better names and string descriptions should be used for the Meson option (
backtrace
), the preprocessor macro (WITH_BACKTRACE
), or the log messages, please feel free to suggest, and I am willing to update this patch using them.