vtss / meta-vtss-switch

(DEPRECATED) Yocto switch application layer for MIPS-based switch products
3 stars 2 forks source link

`bitbake linux-yocto` fails with ERROR "Unable to find revision b04a6112a8001462b0af176f7dc8c934aa77ba2c in branch vtss_3.14 even from upstream" #1

Open TafThorne opened 8 years ago

TafThorne commented 8 years ago

Once you have setup a yocto dizzy (1.7) work area as per the instructions in this repository or in the Microsemi application note ENT-AN1125 "Microsemi Linux BSP Yocto" an attempt to call bitbake linux-yocto or bitbake core-image-minimal or bitbake vtss-image-minimal fails with an error such as this:

$ bitbake linux-yocto
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
WARNING: Unable to get checksum for vtss-api SRC_URI entry API_4_64k.tar.gz: file could not be found:--
Parsing recipes: 100% |################################################################| Time: 00:00:24
Parsing of 895 .bb files complete (0 cached, 895 parsed). 1292 targets, 71 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.24.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-16.04"
TARGET_SYS        = "mipsel-poky-linux"
MACHINE           = "serval1"
DISTRO            = "poky"
DISTRO_VERSION    = "1.7.3"
TUNE_FEATURES     = "o32 mips32"
TARGET_FPU        = "soft"
meta              
meta-yocto        
meta-yocto-bsp    = "dizzy:fb8bf6a75e9ac04d5c6213d3e2f097302f83405f"
meta-vtss-switch  = "master:1e4e259f78a4165388de1e575b856b6958f0dca1"
meta-vtss-vcoreiii = "master:ee0d4fc5537a55bfc20627860220b2c1248b1dd1"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL http://gnome-build-stage-1.googlecode.com/files/uuid-1.6.2.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL git://github.com/vtss/linux-stable.git;protocol=git;bareclone=1;branch=vtss_3.14, attempting MIRRORS if available
ERROR: Fetcher failure: Unable to find revision b04a6112a8001462b0af176f7dc8c934aa77ba2c in branch vtss_3.14 even from upstream
ERROR: Function failed: Fetcher failure for URL: 'git://github.com/vtss/linux-stable.git;protocol=git;bareclone=1;branch=vtss_3.14'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: .../build-serval1/tmp/work/serval1-poky-linux/linux-yocto/3.14+gitAUTOINC+b04a6112a8-r1/temp/log.do_fetch.12050
ERROR: Task 6 (.../meta-vtss-vcoreiii/recipes-kernel/linux/linux-yocto_3.14.bb, do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 326 tasks of which 0 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  .../meta-vtss-vcoreiii/recipes-kernel/linux/linux-yocto_3.14.bb, do_fetch
Summary: There were 5 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

It seems that this relates to the SRCREV and SRCREV_machine setting inside the linux-yocto_3.14.bb resipy. That seems to be looking for a changeset with the id b04a6112a8001462b0af176f7dc8c934aa77ba2c in https://github.com/vtss/linux-stable but no such version seems to exist.

TafThorne commented 8 years ago

After some experimentation I found a work around to the problem. If I set the changeset to AUTOREV rather than b04a6112 the bitbake process seems to complete without an error.

I did try setting the value to the latest version currently in the target repository fcd1c9cbe39d88ef007832d3898b70295ebd1ab but that caused a different error. It seems that the script which reads the recipe expects an annotated tag (or a changeset ID which relates to one). When I used fcd1c9cb I got the following error instead:

$ bitbake linux-yocto 
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##################################################################| ETA:  00:00:00
Loaded 1293 entries from dependency cache.
NOTE: Error during finalise of ...s/meta-vtss-vcoreiii/recipes-kernel/linux/linux-yocto_3.14.bb
ERROR: ExpansionError during parsing .../meta-vtss-vcoreiii/recipes-kernel/linux/linux-yocto_3.14.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://github.com/vtss/linux-stable.git;protocol=git;bareclone=1;branch=vtss_3.14'. The command git -c core.fsyncobjectfiles=0 ls-remote git://github.com/vtss/linux-stable.git refs/heads/fcd1c9cbe39d88ef007832d3898b70295ebd1ab refs/tags/fcd1c9cbe39d88ef007832d3898b70295ebd1ab^{} gave empty output unexpectedly

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Some Googling about was what led to the suggestion that a missing annotated tag was the problem with using fcd1c9cb. The two options were:

It seems that ${AUTOREV} would be mostly used in development to target the latest things on a branch whereas a specific tag would be used when dealing with a more formal release. As I have no control over the vtss release cycle, I will provide a pull request that switches to using AUTOREV.

jan-hudec commented 5 years ago

I have the same problem (using 2.3; the board vendor does not support newer version). It has nothing to do with AUTOREV.

It is caused by the check described in 24.5.3.1. Matching Branch Requirement for Git Fetching.

From Git's point of view, any release branch is superfluous once the release is tagged and done, so it is completely valid for no such branch to exist and the check is bogus. Anyway, the way to disable it is setting ;nobranch=1 rather than any ;branch=.