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

Main branch. Error on first run. The compile works on second run. #4889

Closed
1 task done
schwar3kat opened this issue Mar 2, 2023 · 6 comments
Closed
1 task done
Assignees
Labels
Bugfix Pull request is fixing a bug Can be closed? Ping developers on stalled issues / PR

Comments

@schwar3kat
Copy link
Contributor

schwar3kat commented Mar 2, 2023

What happened?

On the first compile after cloning the main branch, the compile aborts with an error:

Getting ORAS manifest [ ORAS manifest from ghcr.io/armbian/cache-root/arm64-bullseye-cli:cli-5884118f37f9Bbfb90e ]
Downloading required [ ORAS tooling ]
parse error: Invalid numeric literal at line 1, column 11

The issue can be reproduced by deleting the whole cache and then compiling.
(just deleting cache/tools/oras, does not reproduce the issue).
EDIT: deleting cache/tools/oras. does reproduce the error. Not sure why I didn't get the same result earlier.

How to reproduce?

Running on Jammy without Docker.
$ git clone --depth 1 https://github.com/armbian/build
$ cd build
$ ./compile.sh BOARD=orangepi-r1plus-lts BRANCH=current RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no CREATE_PATCHES=no COMPRESS_OUTPUTIMAGE=img

Error:
[\U0001f331] Getting ORAS manifest [ ORAS manifest from ghcr.io/armbian/cache-uboot/uboot-orangepi-r1plus-lts-current:2022.07-Se092-Pbb0c-B680b ] [\U0001f331] Downloading required [ ORAS tooling ] parse error: Invalid numeric literal at line 1, column 11 [\U0001f4a5] Error 4 occurred in SUBSHELL [ SUBSHELL at /mnt/data/build-armbian/armbian-main/build/lib/functions/general/oci-oras.sh:141 ] [\U0001f4a5] Error 4 occurred in main shell [ at /mnt/data/build-armbian/armbian-main/build/lib/functions/general/oci-oras.sh:141 oras_get_artifact_manifest() --> lib/functions/general/oci-oras.sh:141 is_artifact_available_in_remote_cache() --> lib/functions/artifacts/artifacts-obtain.sh:279 artifact_uboot_is_available_in_remote_cache() --> lib/functions/artifacts/artifact-uboot.sh:107 artifact_is_available_in_remote_cache() --> lib/functions/artifacts/artifacts-obtain.sh:24 do_with_logging() --> lib/functions/logging/section-logging.sh:72 obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:169 build_artifact_for_image() --> lib/functions/artifacts/artifacts-obtain.sh:209 main_default_build_packages() --> lib/functions/main/build-packages.sh:49 full_build_packages_rootfs_and_image() --> lib/functions/main/default-build.sh:4 do_with_default_build() --> lib/functions/main/default-build.sh:17 cli_standard_build_run() --> lib/functions/cli/cli-build.sh:17 armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:126 cli_entrypoint() --> lib/functions/cli/entrypoint.sh:164 main() --> compile.sh:52 ] [\U0001f4a5] Cleaning up [ please wait for cleanups to finish ]

Branch

main (main development branch)

On which host OS are you observing this problem?

Jammy

Relevant log output

# Armbian ANSI build logs for fad6555a-d76c-4966-b374-91b1812b012a - use "less -SR" to view
# Armbian build at Sun Feb 26 14:50:47 NZDT 2023 on armbiant
------------------------------------------------------------------------------------------------------------
# ARGs: 'PREFER_DOCKER=no' 'BUILD_MINIMAL=no' 'COMPRESS_OUTPUTIMAGE=img' 'BUILD_DESKTOP=no' 'CREATE_PATCHES=no' 'ARMBIAN_RELAUNCHED=yes' 'BRANCH=current' 'BOARD=orangepi-r1plus-lts' 'SET_OWNER_TO_UID=1000' 'KERNEL_ONLY=no' 'RELEASE=bullseye' 'KERNEL_CONFIGURE=no' 'build'
------------------------------------------------------------------------------------------------------------
# GIT revision
   commit b7921eb53e803213e48b3c06707eef53496b65e2 (grafted, HEAD -> main, origin/main, origin/HEAD)
   Author: Igor Pečovnik <igor@armbian.com>
   
       Rename config file "only_for" into "architecture" (#4861)
------------------------------------------------------------------------------------------------------------
# GIT status
   On branch main
   Your branch is up to date with 'origin/main'.
   
   nothing to commit, working tree clean
------------------------------------------------------------------------------------------------------------
### config_early_init.log 
--> (0) INFO: Starting single build process [ orangepi-r1plus-lts ]
--> (0) INFO: Checking [ basic host setup ]
--> (0) INFO: Build host OS release [ vera ]
--> (0) INFO: Build host architecture [ amd64 ]
------------------------------------------------------------------------------------------------------------
### config_source_board_file.log 
--> (1) INFO: Sourcing board configuration [ /mnt/data/build-armbian/armbian-main/build/config/boards/orangepi-r1plus-lts.conf ]
------------------------------------------------------------------------------------------------------------
### do_main_configuration.log 
--> (1) INFO: Starting main configuration
--> (1) INFO: Sourcing family configuration [ /mnt/data/build-armbian/armbian-main/build/config/sources/families/rockchip64.conf ]
--> (1) INFO: Enabling extension [ rkbin-tools ]
--> (1) INFO: Determined BOOT_SOC from BOOTCONFIG [ BOOT_SOC: 'rk3328'; BOOTCONFIG: 'orangepi_r1_plus_lts_rk3328_defconfig' ]
--> (1) INFO: Sourcing arch configuration [ arm64.conf ]
--> (1) INFO: Extension manager [ processed 5 Extension Methods calls and 5 Extension Method implementations ]
------------------------------------------------------------------------------------------------------------
### config_post_main.log 
--> (1) INFO: Configuration prepared for BOARD build [ orangepi-r1plus-lts.conf ]
--> (1) EXT: Repeat Build Options (early) [ ./compile.sh BOARD=orangepi-r1plus-lts BRANCH=current RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=img ]
------------------------------------------------------------------------------------------------------------
### check_dir_for_mount_options.log 
--> (2) INFO: Checked directory OK for mount options [ /mnt/data/build-armbian/armbian-main/build/.tmp ('main temporary dir') ]
------------------------------------------------------------------------------------------------------------
### prepare_host_noninteractive.log 
--> (2) INFO: Preparing [ host ]
--> (3) COMMAND: update-ccache-symlinks
--> (4) INFO: Ignoring toolchains [ SKIP_EXTERNAL_TOOLCHAINS: yes ]
--> (4) COMMAND: cp -pv /mnt/data/build-armbian/armbian-main/build/config/templates/customize-image.sh.template /mnt/data/build-armbian/armbian-main/build/userpatches/customize-image.sh
   '/mnt/data/build-armbian/armbian-main/build/config/templates/customize-image.sh.template' -> '/mnt/data/build-armbian/armbian-main/build/userpatches/customize-image.sh'
------------------------------------------------------------------------------------------------------------
### aggregate_packages.log 
--> (4) INFO: Aggregating packages [ rootfs ]
--> (4) INFO: Python3 version [ 3.10.6 - 'Python 3.10.6' ]
--> (6) INFO: pip3 version [ 22.0.2: 'pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)' ]
--> (6) INFO: Installing pip packages for Python tools [ 33edee626f ]
--> (6) COMMAND: rm -fv /mnt/data/build-armbian/armbian-main/build/cache/pip/pip_pkg_hash*
--> (6) COMMAND: env -i 'PYTHONUSERBASE=/mnt/data/build-armbian/armbian-main/build/cache/pip/base' 'PYTHONUNBUFFERED=yes' 'PYTHONPYCACHEPREFIX=/mnt/data/build-armbian/armbian-main/build/cache/pip/pycache' /usr/bin/python3 -m pip install --no-warn-script-location --user unidiff==0.7.4 GitPython==3.1.30 unidecode==1.3.6 coloredlogs==15.0.1
   Collecting unidiff==0.7.4
     Using cached unidiff-0.7.4-py2.py3-none-any.whl (14 kB)
   Collecting GitPython==3.1.30
     Using cached GitPython-3.1.30-py3-none-any.whl (184 kB)
   Collecting unidecode==1.3.6
     Using cached Unidecode-1.3.6-py3-none-any.whl (235 kB)
   Collecting coloredlogs==15.0.1
     Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
   Collecting gitdb<5,>=4.0.1
     Using cached gitdb-4.0.10-py3-none-any.whl (62 kB)
   Collecting humanfriendly>=9.1
     Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
   Collecting smmap<6,>=3.0.1
     Using cached smmap-5.0.0-py3-none-any.whl (24 kB)
   Installing collected packages: unidiff, unidecode, smmap, humanfriendly, gitdb, coloredlogs, GitPython
   Successfully installed GitPython-3.1.30 coloredlogs-15.0.1 gitdb-4.0.10 humanfriendly-10.0 smmap-5.0.0 unidecode-1.3.6 unidiff-0.7.4
   WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
--> (16) COMMAND: touch /mnt/data/build-armbian/armbian-main/build/cache/pip/pip_pkg_hash_33edee626f3e275f5a6891a9b9bb146c0386ffd9f4790ea984571b7a96b9aa2d
--> (16) COMMAND: [...shortened...] /usr/bin/python3 /mnt/data/build-armbian/armbian-main/build/lib/tools/aggregation.py
   Summary: Aggregation: debootstrap: 37; rootfs: 112; image: 1; desktop: 0; apt-sources: 0; hash: 5884118f37f93bfa
--> (16) COMMAND: rm -f /mnt/data/build-armbian/armbian-main/build/.tmp/work-fad6555a-d76c-4966-b374-91b1812b012a/tmp.ahhDUwAJwK
------------------------------------------------------------------------------------------------------------
### clean_deprecated_mountpoints.log 
--> (16) INFO: artifact [ uboot :: uboot() ]
------------------------------------------------------------------------------------------------------------
### artifact_prepare_version.log 
--> (16) INFO: Producing new & caching [ GIT_INFO_UBOOT ]
--> (16) INFO: Fetching SHA1 of tag v2022.07^{} [ https://github.com/u-boot/u-boot ]
--> (17) INFO: SHA1 of tag v2022.07^{} [ 'e092e3250270a1016c877da7bdd9384f14b1321e' ]
------------------------------------------------------------------------------------------------------------
### artifact_is_available_in_remote_cache.log 
--> (18) INFO: Getting ORAS manifest [ ORAS manifest from ghcr.io/armbian/cache-uboot/uboot-orangepi-r1plus-lts-current:2022.07-Se092-Pbb0c-B680b ]
--> (18) INFO: Downloading required [ ORAS tooling ]
--> (18) COMMAND: wget --no-verbose --progress=dot:giga -O /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64.tar.gz.tmp https://github.com/oras-project/oras/releases/download/v0.16.0/oras_0.16.0_linux_amd64.tar.gz
--> (21) COMMAND: mv /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64.tar.gz.tmp /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64.tar.gz
--> (21) COMMAND: tar -xf /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64.tar.gz -C /mnt/data/build-armbian/armbian-main/build/cache/tools/oras oras
--> (21) COMMAND: rm -rf /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64.tar.gz
--> (21) COMMAND: mv /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64
--> (21) COMMAND: chmod +x /mnt/data/build-armbian/armbian-main/build/cache/tools/oras/oras_0.16.0_linux_amd64
--> (22) ERROR: Error  4 occurred in SUBSHELL [ SUBSHELL at /mnt/data/build-armbian/armbian-main/build/lib/functions/general/oci-oras.sh:141 ]
--> (22) ERROR: Error 4 occurred in main shell [ at /mnt/data/build-armbian/armbian-main/build/lib/functions/general/oci-oras.sh:141
        oras_get_artifact_manifest() --> lib/functions/general/oci-oras.sh:141
      is_artifact_available_in_remote_cache() --> lib/functions/artifacts/artifacts-obtain.sh:279
      artifact_uboot_is_available_in_remote_cache() --> lib/functions/artifacts/artifact-uboot.sh:107
      artifact_is_available_in_remote_cache() --> lib/functions/artifacts/artifacts-obtain.sh:24
                   do_with_logging() --> lib/functions/logging/section-logging.sh:72
          obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:169
          build_artifact_for_image() --> lib/functions/artifacts/artifacts-obtain.sh:209
       main_default_build_packages() --> lib/functions/main/build-packages.sh:49
      full_build_packages_rootfs_and_image() --> lib/functions/main/default-build.sh:4
             do_with_default_build() --> lib/functions/main/default-build.sh:17
            cli_standard_build_run() --> lib/functions/cli/cli-build.sh:17
           armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:126
                    cli_entrypoint() --> lib/functions/cli/entrypoint.sh:164
                              main() --> compile.sh:52
    ]
--> (22) ERROR: Cleaning up [ please wait for cleanups to finish ]
------------------------------------------------------------------------------------------------------------

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rpardini rpardini added the Bugfix Pull request is fixing a bug label Mar 2, 2023
@schwar3kat
Copy link
Contributor Author

EDIT: deleting cache/tools/oras. does reproduce the error. Not sure why I didn't get the same result earlier.

@rpardini
Copy link
Member

Hopefully addressed with #4955 - where I simply prepare the tooling early, and outside of a capture, so things should work the same both on 1st and further runs. Could you confirm @schwar3kat ?

@rpardini rpardini added the Can be closed? Ping developers on stalled issues / PR label Mar 17, 2023
@SteeManMI
Copy link
Contributor

I am no longer seeing this error after pulling a fresh build environment (and I was seeing it previously on the first run after a fresh pull)

@rpardini
Copy link
Member

I am no longer seeing this error after pulling a fresh build environment (and I was seeing it previously on the first run after a fresh pull)

Thanks!


Igor reported a failure I can't reproduce, anyone get this somehow? (only using Docker, I think).
https://paste.armbian.com/uqalutikar

@schwar3kat
Copy link
Contributor Author

Could you confirm @schwar3kat ?

Another change meant that I could not use the exact compile string, but I could not reproduce the error.
I think that this is fixed and can be closed.

@rpardini
Copy link
Member

Thanks, lets close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Pull request is fixing a bug Can be closed? Ping developers on stalled issues / PR
Development

No branches or pull requests

3 participants