Skip to content

Conversation

@star-hengxing
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @star-hengxing, 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 build configuration issues for libcurl within the xmake build system. It specifically improves dependency handling for libssh2 by ensuring its required libraries are correctly linked, and enhances the discovery of non-system OpenSSL installations by explicitly setting the OPENSSL_ROOT_DIR for CMake. These changes aim to resolve potential linking errors and streamline the build process for libcurl with these common dependencies.

Highlights

  • libssh2 Dependency Fix: Ensured that libcurl correctly links against libssh2's transitive dependencies (ZLIB, OpenSSL, and Windows-specific libraries) by explicitly adding them to CURL_LIBS in the generated CMakeLists.txt.
  • OpenSSL Root Directory Configuration: Added logic to set OPENSSL_ROOT_DIR for CMake when libcurl depends on a non-system openssl or openssl3 package, facilitating correct discovery of custom OpenSSL installations.
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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @star-hengxing, 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 refines the dependency management within the libcurl package's xmake.lua configuration. The primary goal is to ensure robust linking for libcurl when libssh2 is enabled, by correctly propagating libssh2's own dependencies. Additionally, it enhances the build process's ability to locate and utilize non-system installations of OpenSSL, contributing to a more reliable and flexible build environment.

Highlights

  • libssh2 Dependency Resolution: Explicitly adds libssh2's transitive dependencies, including ZLIB, OpenSSL, and Windows-specific libraries (ws2_32, user32, crypt32, advapi32), to the CURL_LIBS list in the generated CMakeLists.txt when libcurl is built with libssh2 support.
  • OpenSSL Root Directory Configuration: Ensures that the OPENSSL_ROOT_DIR CMake variable is correctly set for non-system OpenSSL (versions 1 or 3) installations, improving the build system's ability to locate and link against these dependencies.
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
Contributor

@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 aims to fix the dependencies for libssh2 when used with libcurl. The change correctly adds a mechanism to pass OPENSSL_ROOT_DIR to CMake, which is a good improvement. However, it hardcodes OpenSSL as the crypto backend for libssh2, which will cause issues if libssh2 is configured with a different backend like mbedtls. I've provided a suggestion to dynamically handle the crypto backend dependencies.

Copy link
Contributor

@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 the libssh2 dependencies for the libcurl package. It ensures that the necessary dependencies (ZLIB, OpenSSL) are linked correctly when libssh2 is enabled, especially on Windows/MinGW platforms. Additionally, it adds a configuration option for specifying the OpenSSL root directory. The changes modify the xmake.lua file to handle these dependencies and configurations during the installation process.

@star-hengxing star-hengxing merged commit 5f73998 into dev Oct 23, 2025
61 checks passed
@star-hengxing star-hengxing deleted the star-hengxing-patch-2 branch October 23, 2025 08:41
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