From ProventusNova DeveloperWiki
(Created page with "== ⚠️ Fixing Yocto Fetch Error: arm-compute-library 24.02 (Wrong Git Branch) == This page documents a specific fetch error encountered during a Yocto build when retrieving the source code for the '''ARM Compute Library''' recipe version 24.02, and provides the fix using a '''.bbappend''' file. === The Error Message === The Yocto build fails during the '''do_fetch''' task for the ''arm-compute-library-24.02'' recipe, indicating that the required commit cannot be foun...")
 
(No difference)

Latest revision as of 01:32, 15 November 2025

⚠️ Fixing Yocto Fetch Error: arm-compute-library 24.02 (Wrong Git Branch)

This page documents a specific fetch error encountered during a Yocto build when retrieving the source code for the ARM Compute Library recipe version 24.02, and provides the fix using a .bbappend file.

The Error Message

The Yocto build fails during the do_fetch task for the arm-compute-library-24.02 recipe, indicating that the required commit cannot be found in the default branch:

WARNING: arm-compute-library-24.02-r0 do_fetch: Failed to fetch URL git://github.com/ARM-software/ComputeLibrary.git;protocol=https;branch=main;name=arm-compute-library, attempting MIRRORS if available
ERROR: arm-compute-library-24.02-r0 do_fetch: Fetcher failure: Unable to find revision bc89a0b690200750040770bda0981f4a37b389c4 in branch main even from upstream
ERROR: arm-compute-library-24.02-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/ARM-software/ComputeLibrary.git;protocol=https;branch=main;name=arm-compute-library')

Root Cause Analysis

The specific Git commit hash (`bc89a0b690200750040770bda0981f4a37b389c4`) required by the recipe has been moved on the upstream repository. It no longer resides in the expected main branch, but has been relocated to the archived-releases branch. Consequently, the BitBake fetcher, looking only in main, fails to locate the source code.

💡 The Solution: Overriding the Branch with a `.bbappend`

The issue is resolved by creating an arm-compute-library_24.02.bbappend file in your custom meta-layer to explicitly override the default source Uniform Resource Identifier (URI) and point it to the correct Git branch.

Step 1: Create the `.bbappend` File

Place the override file within the following path structure in your custom meta-layer (e.g., in a directory named `meta-pn-mtk`):

<YOUR_CUSTOM_META_LAYER>/recipes-armnn/arm-compute-library/arm-compute-library_24.02.bbappend

Step 2: Add the Override Content

Populate the arm-compute-library_24.02.bbappend file with the following content. This configuration changes the source branch to archived-releases while ensuring the correct SRCREV (commit hash) is used.

SRC_URI = "git://github.com/ARM-software/ComputeLibrary.git;protocol=https;branch=archived-releases;name=arm-compute-library \
           file://0001-enable-yocto-build.patch \
           file://0001-Remove-unknown-variables-treated-as-error.patch \
           file://0001-Prefer-to-use-libmali-as-the-provider-of-OpenCL.patch \
           file://0001-remove-clUpdateMutableCommandsKHR-reference.patch \
           "

SRCREV = "bc89a0b690200750040770bda0981f4a37b389c4"
  • SRC_URI: The URL parameter is modified to specify branch=archived-releases.
  • SRCREV: The exact commit hash is retained to fetch the desired version of the library.

After adding this file, BitBake will use the new branch setting, allowing the source code fetch to succeed on the next build attempt.