Skip to content

ISSUE #331: Crashes on start - v2.1.3 - Ubuntu 24.04#343

Open
codrod wants to merge 2 commits intoactboy168:masterfrom
codrod:master
Open

ISSUE #331: Crashes on start - v2.1.3 - Ubuntu 24.04#343
codrod wants to merge 2 commits intoactboy168:masterfrom
codrod:master

Conversation

@codrod
Copy link
Contributor

@codrod codrod commented Feb 11, 2026

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.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Linux Linking Fixes: Implemented static linkage for libbfd and its transitive dependencies (libiberty, libsframe, libzstd, libz) to resolve startup crashes on Linux, ensuring correct symbol resolution.
  • Exception Handling: Added dynamic linkage for libgcc_s and libunwind to correctly handle C++ exceptions, particularly on systems where libunwind alone does not provide the necessary symbols.
  • Build Environment Update: Updated the build pipeline to require Ubuntu 24.04, as libsframe is a recent addition to libbfd, necessitating a newer binutils package for successful compilation.
Changelog
  • compile/common/bee.lua
    • Removed the exclusion of Linux crash-related sources from the build.
    • Modified Linux ldflags to include static libbfd, libiberty, libsframe, and dynamic libzstd, libz.
    • Added unwind and gcc_s to the Linux links configuration.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/build.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

1 participant