ISSUE #331: Crashes on start - v2.1.3 - Ubuntu 24.04#343
ISSUE #331: Crashes on start - v2.1.3 - Ubuntu 24.04#343codrod wants to merge 2 commits intoactboy168:masterfrom
Conversation
Summary of ChangesHello @codrod, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical startup crashes on Linux systems, specifically Ubuntu 24.04, by refining the linking process for core libraries. It ensures robust exception handling and updates the build environment to accommodate newer library dependencies, improving overall stability and compatibility across different Linux distributions. Highlights
Changelog
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a startup crash on Ubuntu 24.04 by adjusting the Linux build configuration. The changes involve enabling the Linux crash handler and modifying linker flags to statically link libbfd and its dependencies, which is a good approach for portability. I've suggested one improvement to further enhance this portability by statically linking all dependencies to avoid potential runtime issues on older systems.
After more testing on Fedora and Ubuntu I am now able to run the same binaries on both systems.
Only static linkage for libbfd was required but as part of that linkage we also have to handle libbfd's transitive dependencies which are libiberity, libsframe, libzstd, and libz. Note that libbfd.a must be linked before its dependencies otherwise the linker wont include the required symbols since it is a one-pass linker.
I also added dynamic linkage for libgcc_s because on Fedora (and other systems) libunwind does not include symbols for handling exceptions in the standard C++ runtime. Instead those symbols are included as part of libgcc_s so I linked against both.
Finally I updated the build pipeline. Note we now need Ubuntu 24.04 to build because libsframe is a fairly recent addition to libbfd (2023ish) so the binutils package on Ubuntu 22.04, and other distros from the same time period, do not include libsframe. This will probably cause issues if attempting to build the repository on older Linux versions but I did statically link libsframe so the binaries will run on older systems even if we can't build on them.