Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gappa: add arm64 build #51098

Merged
merged 1 commit into from
Oct 2, 2024
Merged

gappa: add arm64 build #51098

merged 1 commit into from
Oct 2, 2024

Conversation

mencian
Copy link
Contributor

@mencian mencian commented Oct 2, 2024

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Summary by CodeRabbit

  • New Features
    • Updated package version to 0.8.5 with a new build number.
    • Added support for libgomp as a host requirement for Linux.
    • Introduced osx-arm64 as an additional platform.
    • Included a new DOI entry in the package identifiers.
  • Bug Fixes
    • Ensured the gappa binary has the correct executable permissions during installation.

Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

📝 Walkthrough

Walkthrough

The pull request introduces modifications to the build.sh script and the meta.yaml file for the gappa package. The build.sh script now includes a command to set executable permissions for the gappa binary. The meta.yaml file updates the package version and build number, alters host dependencies for Linux and macOS, adds a license family, introduces a new platform, and includes a new DOI identifier.

Changes

File Change Summary
recipes/gappa/build.sh Added chmod 0755 bin/gappa to set executable permissions for the gappa binary before installation.
recipes/gappa/meta.yaml Updated version from 0.8.5 to 0.8.5, incremented build number from 1 to 2, changed host dependency from llvm-openmp to libgomp for Linux, added libgomp for Linux in the run section, added license_family: GPL3, included osx-arm64 in additional platforms, and added DOI identifier.

Possibly related PRs

  • recipe for pgrc #50973: Changes in build.sh for the pgrc recipe involve setting up the build environment and copying the binary to $PREFIX/bin, similar to the permission changes made in the gappa binary in the main PR.
  • pgrc: add linux-aarch64 build #51009: The pgrc recipe updates include changes to the meta.yaml file that align with the updates made in the gappa recipe, particularly regarding the addition of libgomp for Linux, which is relevant to the changes in dependencies in the main PR.
  • bambamc: add aarch64/arm64 builds #51067: The bambamc recipe's build.sh modifications include enhancements for building on ARM architectures, which is relevant to the changes made in the gappa recipe regarding executable permissions and architecture support.

Suggested labels

aarch64, osx-arm64


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3c24058 and 46f84b7.

📒 Files selected for processing (2)
  • recipes/gappa/build.sh (1 hunks)
  • recipes/gappa/meta.yaml (4 hunks)
🔇 Additional comments (8)
recipes/gappa/build.sh (3)

Line range hint 1-13: Summary of review and next steps

The build script changes look good overall, with the addition of the chmod command improving permission consistency. However, there are two main points to address:

  1. Verify if the explicit chmod command aligns with Bioconda's best practices.
  2. Ensure proper support for ARM64 builds, as mentioned in the PR objectives.

Please run the provided verification scripts and make any necessary adjustments based on the results. If you need any assistance with implementing ARM64 support or have any questions about the Bioconda best practices, feel free to ask.


Line range hint 1-13: Verify ARM64 build support and cross-compilation configuration.

The current build script doesn't explicitly address the ARM64 build mentioned in the PR objectives. While the script may work for ARM64 if the underlying build system (make) supports it, it's important to ensure that cross-compilation is properly configured.

Consider the following points:

  1. Verify that the Makefile or underlying build system supports ARM64 targets.
  2. Ensure that any necessary ARM64-specific flags or configurations are set.
  3. If cross-compilation is required, make sure the appropriate toolchain is used.

To check for ARM64 support and cross-compilation configuration, please run the following script:

#!/bin/bash
# Description: Check for ARM64 support in the gappa package

# Check Makefile for ARM64 or aarch64 references
echo "Checking Makefile for ARM64 support:"
rg --type make 'arm64|aarch64' recipes/gappa/Makefile

# Check for cross-compilation tools or flags in the recipe
echo "Checking meta.yaml for cross-compilation configuration:"
rg --type yaml 'cross-compilation|arm64|aarch64' recipes/gappa/meta.yaml

# Check if there are any ARM64-specific patches
echo "Checking for ARM64-specific patches:"
ls recipes/gappa/*arm64*.patch recipes/gappa/*aarch64*.patch 2>/dev/null || echo "No ARM64-specific patches found"

This script will help identify any explicit ARM64 support or cross-compilation configuration in the package. If these are not present, you may need to add appropriate configurations to ensure proper ARM64 builds.


11-11: Approve the addition of chmod, but verify alignment with Bioconda practices.

The addition of chmod 0755 bin/gappa ensures that the binary has the correct permissions (owner can read/write/execute, others can read/execute) before installation. This is generally a good practice to ensure consistency across different systems.

However, it would be beneficial to verify if this explicit permission setting is necessary and aligns with Bioconda's best practices for package installation scripts.

To ensure this change aligns with Bioconda's practices, please run the following script:

This script will help us understand if setting explicit permissions is common in Bioconda recipes and if gappa had any permission-related issues in the past.

✅ Verification successful

Approve the addition of chmod 0755 to ensure the gappa binary has correct execution permissions.
No existing Bioconda recipes utilize chmod in their build scripts, and no prior permission-related issues were found for gappa. This addition enhances installation reliability and consistency across different systems.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if other Bioconda recipes use chmod in their build scripts

# Search for chmod usage in other build.sh files
echo "Checking for chmod usage in other Bioconda build scripts:"
rg --type sh 'chmod.*bin/' recipes/*/build.sh

# Check if gappa previously had any permission-related issues
echo "Checking for any previous permission-related issues with gappa:"
rg --type yaml 'gappa.*permission' .github/workflows/*.yaml .circleci/config.yml

Length of output: 656

recipes/gappa/meta.yaml (5)

6-6: LGTM: Build number increment is appropriate.

The build number has been correctly incremented from 1 to 2. This is the expected practice when making changes to a package configuration without changing its version.


24-24: LGTM: Consistent run requirements added for Linux.

The addition of 'libgomp' as a run requirement for Linux mirrors the changes made to the host requirements. This ensures consistency between build-time and runtime environments, which is a good practice.


34-34: LGTM: License family added for clarity.

The addition of 'license_family: GPL3' provides more specific information about the license type. This is consistent with the existing GPL-3.0-only license and helps clarify the licensing terms for users and package managers.


48-48: LGTM: ARM64 support added and new identifier included. Verify ARM64 build.

The addition of 'osx-arm64' to the list of additional platforms indicates support for ARM-based Mac systems. This is a positive enhancement that broadens the package's compatibility. The new DOI identifier adds valuable information about related research.

To ensure the ARM64 support is fully implemented:

  1. Verify that the package builds successfully on ARM64 Mac systems.
  2. Test the resulting binary on an ARM64 Mac to confirm functionality.

You can use the following script to check for any ARM64-specific build configurations:

#!/bin/bash
# Description: Check for ARM64-specific build configurations

# Search for ARM64-related flags or conditions in build files
echo "Searching for ARM64-related configurations in build files:"
rg -i 'arm64|aarch64' --type make --type cmake

Also applies to: 52-52


20-21: LGTM: Platform-specific OpenMP libraries added. Verify cross-platform compatibility.

The addition of 'libgomp' for Linux and retention of 'llvm-openmp' for macOS is a good practice for platform-specific optimization. This change likely addresses compiler differences between the two platforms.

To ensure this change doesn't introduce any cross-platform issues, please verify:

  1. The package builds successfully on both Linux and macOS platforms.
  2. The resulting binaries work as expected on their respective platforms.

You can use the following script to check for any OpenMP-related build flags or compiler options:

✅ Verification successful

LGTM: Platform-specific OpenMP libraries added without introducing cross-platform issues.

The addition of 'libgomp' for Linux and the retention of 'llvm-openmp' for macOS are consistent with the project's extensive use of OpenMP for parallel processing. This ensures that the package maintains optimal performance across both platforms without introducing compatibility issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for OpenMP-related build flags or compiler options

# Search for OpenMP-related flags in build files
echo "Searching for OpenMP-related flags in build files:"
rg -i 'openmp|gomp' --type make --type cmake

Length of output: 175


Script:

#!/bin/bash
# Description: Check for OpenMP-related build flags or compiler options

# Search for OpenMP-related flags in build files
echo "Searching for OpenMP-related flags in build files:"
rg -i 'openmp|gomp' --type make --type cmake

Length of output: 157


Script:

#!/bin/bash
# Description: Comprehensive check for OpenMP-related build flags or compiler options across various build files

# Search for OpenMP-related flags in common build configuration files
echo "Searching for OpenMP-related flags in make, cmake, Dockerfile, and setup.py files:"
rg -i 'openmp|gomp' --type make --type cmake --type Dockerfile --type py

Length of output: 284


Script:

#!/bin/bash
# Description: Comprehensive check for OpenMP-related build flags or compiler options across various build files

echo "Searching for OpenMP-related flags in build configuration files: Makefile, CMakeLists.txt, Dockerfile, setup.py"

# Find relevant build files and search for OpenMP-related flags
fd -e makefile -e Makefile -e CMakeLists.txt -e Dockerfile -e setup.py . | xargs rg -i 'openmp|gomp'

Length of output: 131308


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osx-arm64 Related to adding osx-arm64 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant