Skip to content

[linux][apps][arm64] Add arm64 linux with vcpkg#6431

Merged
AenBleidd merged 1 commit intoBOINC:masterfrom
talregev:TalR/bugfix/arm64_linux
Jul 14, 2025
Merged

[linux][apps][arm64] Add arm64 linux with vcpkg#6431
AenBleidd merged 1 commit intoBOINC:masterfrom
talregev:TalR/bugfix/arm64_linux

Conversation

@talregev
Copy link
Copy Markdown
Contributor

@talregev talregev commented Jul 13, 2025

Add arm64 linux with vcpkg

Fix #4782

This comment was marked as outdated.

@AenBleidd AenBleidd marked this pull request as draft July 13, 2025 23:22
@AenBleidd
Copy link
Copy Markdown
Member

No, you are wrong, and you can check the artifacts, they are actually for the ARM64:
image

@talregev
Copy link
Copy Markdown
Contributor Author

talregev commented Jul 14, 2025

I verify the headers of the files from artifacts. I also got the Machine aarch64.
But there is a still mismatch: it choose g++ instead of aarch64-linux-gnu-g++
https://github.com/BOINC/boinc/actions/runs/16253724876/job/45886907346#step:28:3445

Also when I try long time ago to combine the libs from vcpkg to build with the script, I found they don't compatible.

But let's assume these files compile in aarch64 correctly, this PR compile more apps in aarch64, improving the current scripts.

strategy:
matrix:
type: [libs, client, apps, manager, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, libs-arm64, apps-arm64, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test]
type: [libs, client, apps, manager, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, libs-vcpkg-arm64, apps-vcpkg-arm64, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is ok to add libs-vcpkg-arm64 and apps-vcpkg-arm64 but these must not replace existing libs-arm64 and apps-arm64

@github-project-automation github-project-automation bot moved this from In progress to Review in progress in Client/Manager Jul 14, 2025
@talregev talregev force-pushed the TalR/bugfix/arm64_linux branch from 43d289b to 2c32e02 Compare July 14, 2025 01:06
@talregev talregev changed the title [linux][apps][arm64] Bugfix arm64 linux [linux][apps][arm64] Add arm64 linux with vcpkg Jul 14, 2025
@talregev talregev requested a review from AenBleidd July 14, 2025 01:06
@AenBleidd AenBleidd requested a review from Copilot July 14, 2025 01:07
@talregev talregev marked this pull request as ready for review July 14, 2025 01:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for building and packaging Linux ARM64 targets using vcpkg. Key changes include:

  • Refactoring sample Makefiles to use $(CXX) for locating libstdc++.a
  • Introducing ARM64-specific vcpkg scripts and CI configuration under linux/arm64/
  • Extending deployment and GitHub Actions workflows to include libs-vcpkg-arm64 and apps-vcpkg-arm64 matrix entries

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
samples/openclapp/Makefile* Switched to $(CXX) -print-file-name for cross-compilation
linux/arm64/update_vcpkg_*.sh Added scripts to clone, bootstrap, and install vcpkg libs/apps for arm64
linux/arm64/ci_configure_*.sh Added CI configure scripts for libs/apps on ARM64
deploy/prepare_deployment.py Added prepare_linux_apps_vcpkg_arm64 function to include ARM64 apps-vcpkg archive
.github/workflows/linux.yml Expanded matrix types and added ARM64 vcpkg install/build steps
Comments suppressed due to low confidence (3)

.github/workflows/linux.yml:73

  • [nitpick] The here-document is indented, which will introduce leading spaces in the generated sources list file. Consider using an unindented EOF or <<-EOT to trim indentation for cleaner formatting.
          cat <<EOT >> arm-cross-compile-sources.list

linux/arm64/update_vcpkg_libs.sh:5

  • [nitpick] The error message could be more helpful by including the script name, e.g., echo "[update_vcpkg_libs.sh] Please run this from the project root".
    echo "start this script in the source root directory"

deploy/prepare_deployment.py:326

  • The new prepare_linux_apps_vcpkg_arm64 function isn't covered by existing tests. Consider adding a unit test to verify it produces the expected 7z archive entry.
def prepare_linux_apps_vcpkg_arm64(target_directory):

Comment on lines +14 to +21
if [ ! -d $VCPKG_ROOT ]; then
mkdir -p $BUILD_DIR
git -C $BUILD_DIR clone $VCPKG_LINK
fi

git -C $VCPKG_ROOT pull
$VCPKG_ROOT/bootstrap-vcpkg.sh
$VCPKG_ROOT/vcpkg install --x-manifest-root=3rdParty/vcpkg_ports/configs/libs/ --x-install-root=$VCPKG_ROOT/installed/ --overlay-ports=$VCPKG_PORTS/ports --overlay-triplets=$VCPKG_PORTS/triplets/ci --triplet=arm64-linux-release --clean-after-build
Copy link

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

Wrap the variable in quotes to prevent word splitting or globbing if the path contains spaces: if [ ! -d "$VCPKG_ROOT" ]; then.

Suggested change
if [ ! -d $VCPKG_ROOT ]; then
mkdir -p $BUILD_DIR
git -C $BUILD_DIR clone $VCPKG_LINK
fi
git -C $VCPKG_ROOT pull
$VCPKG_ROOT/bootstrap-vcpkg.sh
$VCPKG_ROOT/vcpkg install --x-manifest-root=3rdParty/vcpkg_ports/configs/libs/ --x-install-root=$VCPKG_ROOT/installed/ --overlay-ports=$VCPKG_PORTS/ports --overlay-triplets=$VCPKG_PORTS/triplets/ci --triplet=arm64-linux-release --clean-after-build
if [ ! -d "$VCPKG_ROOT" ]; then
mkdir -p "$BUILD_DIR"
git -C "$BUILD_DIR" clone "$VCPKG_LINK"
fi
git -C "$VCPKG_ROOT" pull
"$VCPKG_ROOT/bootstrap-vcpkg.sh"
"$VCPKG_ROOT/vcpkg" install --x-manifest-root=3rdParty/vcpkg_ports/configs/libs/ --x-install-root="$VCPKG_ROOT/installed/" --overlay-ports="$VCPKG_PORTS/ports" --overlay-triplets="$VCPKG_PORTS/triplets/ci" --triplet=arm64-linux-release --clean-after-build

Copilot uses AI. Check for mistakes.
VCPKG_PORTS="$PWD/3rdParty/vcpkg_ports"
VCPKG_ROOT="$BUILD_DIR/vcpkg"

if [ ! -d $VCPKG_ROOT ]; then
Copy link

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

Similarly, quote the path variable here to handle spaces safely: if [ ! -d "$VCPKG_ROOT" ]; then.

Suggested change
if [ ! -d $VCPKG_ROOT ]; then
if [ ! -d "$VCPKG_ROOT" ]; then

Copilot uses AI. Check for mistakes.
@AenBleidd
Copy link
Copy Markdown
Member

Thank you for the PR.

@AenBleidd AenBleidd merged commit 6f261b3 into BOINC:master Jul 14, 2025
177 checks passed
@github-project-automation github-project-automation bot moved this from Review in progress to Merged in Client/Manager Jul 14, 2025
@talregev talregev deleted the TalR/bugfix/arm64_linux branch July 14, 2025 06:04
AenBleidd added a commit that referenced this pull request Jul 15, 2025
[linux][apps][arm64] Add arm64 linux with vcpkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

ARM64 Linux Support for Wrapper App

3 participants