Skip to content

Conversation

@zi0r
Copy link
Contributor

@zi0r zi0r commented Nov 10, 2025

Resolve build failures under FreeBSD:

  • Base_Thread.cpp:46:79 requires copy_cmd_matcher in PgSQL_Thread class, but copy_cmd_matcher is in the ifdef block for IDLE_THREADS: Move this out of the IDLE_THREADS ifdef
  • There is no ULONG_LONG_MAX in FreeBSD, include sys/limits.h and use ULLONG_MAX in PgSQL_Monitor.cpp:1782
  • Add missing include for AF_INET* under FreeBSD for proxy_protocol_info.cpp:79
  • PostgreSQL patch fails to apply due to whitespace changes between patch/source: add -l to patch args for get_result_from_pgconn.patch
  • Explicitly disable ICU support to fix libpq build
  • Do not assume any OS but Darwin has EPOLL support in lib/Makefile
  • Remove newly added reliance on gnu grep in common_mk/*

@gemini-code-assist
Copy link

Summary of Changes

Hello @zi0r, 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 resolves a series of build failures encountered when compiling the project on FreeBSD. The changes encompass adjustments to header inclusions, macro definitions, build script commands, and configuration flags to ensure compatibility with the FreeBSD operating system. The primary goal is to enable a smooth and successful build process for the 3.0.x release on FreeBSD.

Highlights

  • FreeBSD Build Fixes: Addressed several issues preventing successful compilation on FreeBSD, including missing headers, undefined macros, and patch command failures due to whitespace.
  • Cross-Platform Compatibility: Ensured copy_cmd_matcher is available regardless of IDLE_THREADS definition and disabled EPOLL for FreeBSD, aligning with Darwin's configuration for event notification.
  • Build System Robustness: Updated Makefile scripts to use more portable commands (sed, awk instead of grep -oP) to avoid GNU grep dependency and explicitly disabled ICU support for libpq to prevent build failures.
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 introduces several fixes to enable building on FreeBSD. The changes are generally good and improve portability by removing dependencies on GNU-specific tool features. However, I've identified a few issues:

  • In common_mk/openssl_flags.mk, the sed command to extract the OpenSSL include path is not robust and could fail if pkg-config output format varies.
  • In common_mk/openssl_version_check.mk, the awk command to parse the OpenSSL version is too simplistic and may fail on different opensslv.h formats.
  • Most critically, in lib/Makefile, the logic to disable EPOLL on FreeBSD is incorrect. It uses an undefined variable OS and has inverted logic, which will likely break builds on Linux and other platforms.

I've provided suggestions to fix these issues.

@renecannao
Copy link
Contributor

Can one of the admins verify this patch?

zi0r added 5 commits November 10, 2025 11:56
Signed-off-by: Ryan Steinmetz <[email protected]>
Signed-off-by: Ryan Steinmetz <[email protected]>
@sonarqubecloud
Copy link

@zi0r
Copy link
Contributor Author

zi0r commented Nov 10, 2025

Not sure if there's a way to have gemini (or something else) complain if someone tries to commit another grep -P command somewhere, but this was something that I had already fixed in a previous PR (#4488).

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.

2 participants