-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
add aarch64 control-freec (debugging) #52018
Conversation
…f_debug Debugging the build error
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces modifications to the In the Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (4)recipes/control-freec/meta.yaml (4)
The build number increment is justified as we're making changes to the package build process for ARM support.
The Also applies to: 40-41
The update to use SPDX identifier "GPL-2.0-or-later" and addition of license family improves compliance and clarity.
The addition of aarch64 platform support is aligned with the PR objective. However, we should verify that all dependencies support this architecture. 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
recipes/control-freec/build.sh (2)
15-17
: Improve debug output organization.The debug output commands should be:
- Conditionally executed only during ARM builds
- More focused on relevant information
-ls -l $PREFIX/bin -echo get_fasta_lengths.pl is... -cat $PREFIX/bin/get_fasta_lengths.pl +# Debug output for cross-compilation +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + echo "=== Verifying installation ===" + if [[ ! -x "$PREFIX/bin/get_fasta_lengths.pl" ]]; then + echo "ERROR: get_fasta_lengths.pl not found or not executable" + ls -l "$PREFIX/bin" + exit 1 + fi + echo "=== Installation verified ===" +fi
Line range hint
1-21
: Enhance build script robustness and safety.The build script needs improvements in error handling and variable safety:
- Add error checking for critical operations
- Quote variables to handle paths with spaces
- Validate required environment variables
#!/bin/bash -set -x +set -euo pipefail + +# Validate required environment variables +: "${PREFIX:?PREFIX must be set}" +: "${CXX:?CXX must be set}" +: "${CXXFLAGS:?CXXFLAGS must be set}" +: "${LDFLAGS:?LDFLAGS must be set}" -mkdir -p $PREFIX/bin +mkdir -p "$PREFIX/bin" -for f in scripts/* +for f in scripts/*; do + if [[ ! -f "$f" ]]; then + echo "ERROR: Script file not found: $f" + exit 1 + fi + chmod +x "$f" + pattern="s|/usr/bin/perl|${PREFIX}/bin/perl|g" + sed -i -e "$pattern" "$f" + cp "$f" "$PREFIX/bin/" +done -cd src -$CXX -o $PREFIX/bin/freec $CXXFLAGS $LDFLAGS *.cpp -lpthread +if [[ ! -d "src" ]]; then + echo "ERROR: src directory not found" + exit 1 +fi +cd src || exit 1 +$CXX -o "$PREFIX/bin/freec" $CXXFLAGS $LDFLAGS ./*.cpp -lpthread🧰 Tools
🪛 Shellcheck
[warning] 19-19: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
recipes/control-freec/build.sh
(2 hunks)recipes/control-freec/meta.yaml
(4 hunks)
🔇 Additional comments (3)
recipes/control-freec/meta.yaml (3)
17-19
: LGTM: Build configuration is correct
The build number increment and run_exports configuration are appropriate for adding new platform support while maintaining ABI compatibility.
47-48
: LGTM: Improved license specification
The update to use SPDX identifier "GPL-2.0-or-later" and addition of license_family improves metadata clarity and follows best practices.
61-62
: Verify dependency compatibility with aarch64
The addition of aarch64 support is correctly specified. However, we should verify that all dependencies (especially the compiled ones like samtools and R packages) are available for the ARM architecture.
✅ Verification successful
Let me try a different approach to verify the dependencies by checking the meta.yaml file directly and then searching for these packages in the bioconda repository.
Let me check the specific aarch64 related content in the found recipes to verify the support.
ARM64 support is properly aligned with dependencies
The key dependencies samtools and bioconductor-rtracklayer already have aarch64 support explicitly declared in their recipes. Both packages list linux-aarch64
in their additional-platforms
section, indicating they are built and tested for ARM architecture. Samtools even has additional osx-arm64
support. The other dependencies (perl, r-base) are core packages available across architectures through conda-forge.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if all dependencies are available for aarch64
echo "Checking dependency availability for aarch64..."
DEPS=("perl" "r-base" "bioconductor-rtracklayer" "samtools")
for dep in "${DEPS[@]}"; do
echo "Checking $dep..."
# Search for the package in conda-forge and bioconda
conda search --json -c conda-forge -c bioconda "$dep" | jq -r '.[] | select(.platform == "linux-aarch64") | .version' || echo "No aarch64 build found for $dep"
done
Length of output: 1289
Script:
#!/bin/bash
# First, let's check all dependencies in the meta.yaml
echo "Dependencies from meta.yaml:"
cat recipes/control-freec/meta.yaml | grep -A20 "requirements:"
# Now let's check if these packages exist in bioconda-recipes for aarch64
echo -e "\nChecking bioconda-recipes for aarch64 support:"
# Using rg to search for aarch64 in the package recipes
for pkg in "perl" "r-base" "bioconductor-rtracklayer" "samtools"; do
echo -e "\nChecking $pkg:"
if [ -d "recipes/$pkg" ]; then
rg "aarch64|arm64" "recipes/$pkg" -l
fi
done
Length of output: 1405
Script:
#!/bin/bash
# Check the content of found recipes for aarch64 support details
echo "Checking bioconductor-rtracklayer aarch64 support:"
rg "aarch64|arm64" recipes/bioconductor-rtracklayer/meta.yaml -A 2 -B 2
echo -e "\nChecking samtools aarch64 support:"
rg "aarch64|arm64" recipes/samtools/meta.yaml -A 2 -B 2
# Let's also check if there are any skip directives or constraints
echo -e "\nChecking for architecture constraints:"
for file in recipes/bioconductor-rtracklayer/meta.yaml recipes/samtools/meta.yaml; do
echo -e "\nChecking $file for skip directives:"
rg "skip|platform" "$file" -A 2 -B 2
done
Length of output: 1367
# Debug for ARM build, can remove later | ||
set -x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add shell safety flags and plan debug mode cleanup.
While set -x
is helpful for debugging ARM builds, consider:
- Adding recommended shell safety flags
- Removing debug mode once ARM issues are resolved
#!/bin/bash
-# Debug for ARM build, can remove later
-set -x
+set -euo pipefail
+
+# TODO: Remove after ARM debugging is complete
+if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then
+ set -x
+fi
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
# Debug for ARM build, can remove later | |
set -x | |
#!/bin/bash | |
set -euo pipefail | |
# TODO: Remove after ARM debugging is complete | |
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then | |
set -x | |
fi |
recipes/control-freec/meta.yaml
Outdated
- ls -l | ||
- ls -l bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove debugging directory listing commands
The ls
commands appear to be debugging artifacts and don't contribute to package validation. The existing test commands already properly verify the installation of all components.
test:
commands:
- - ls -l
- - ls -l bin
- freec
- freec2bed.pl
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- ls -l | |
- ls -l bin | |
- freec | |
- freec2bed.pl |
This is an attempt to understand why a build failure is happening in prior pull request for adding linux-aarch64 support for control-freec