yourkrash@DESKTOP-CQBNM5G:~/ark/arkcompiler_runtim...
Created on: March 3, 2025
Created on: March 3, 2025
yourkrash@DESKTOP-CQBNM5G:~/ark/arkcompiler_runtime_core/static_core$ sudo repo sync -c -j8 ... A new version of repo (2.50) is available. ... You should upgrade soon: cp /home/yourkrash/ark/arkcompiler_runtime_core/static_core/.repo/repo/repo /usr/bin/repo Fetching: 100% (22/22), done in 5.858s error.GitError: Cannot checkout third_party_icu: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/icu/.git: unsupported checkout state error.GitError: Cannot checkout third_party_googletest: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/googletest/.git: unsupported checkout state error: Cannot checkout third_party_icu error: Cannot checkout third_party_googletest error.GitError: Cannot checkout third_party_openssl: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/openssl/.git: unsupported checkout state error: Cannot checkout third_party_openssl error.GitError: Cannot checkout third_party_zlib: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/zlib/.git: unsupported checkout state error: Cannot checkout third_party_zlib git-lfs filter-process --skip: 1: git-lfs: not found fatal: the remote end hung up unexpectedly error.GitError: Cannot checkout third_party_node: Cannot initialize work tree for third_party_node error: Cannot checkout third_party_node Checking out: 100% (22/22), done in 0.099s error: Unable to fully sync the tree error: Checking out local projects failed. Failing repos: third_party/icu third_party/googletest third_party/openssl third_party/zlib third_party/node Try re-running with "-j1 --fail-fast" to exit at the first error. ================================================================================ Repo command failed due to the following SyncError
errors: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/icu/.git: unsupported checkout state /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/googletest/.git: unsupported checkout state /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/openssl/.git: unsupported checkout state /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/zlib/.git: unsupported checkout state
From the errors you’re seeing—particularly the line git-lfs filter-process --skip: 1: git-lfs: not found
—the most likely cause is that some of these repositories require Git LFS (Large File Storage) but it isn’t installed on your system.
Here’s how you can fix it:
Install Git LFS
bashsudo apt-get update sudo apt-get install git-lfs
dnf install git-lfs
on Fedora).Initialize Git LFS
bashgit lfs install
This sets up Git LFS support globally on your system.
(Optional) Remove and Re-checkout the Problematic Modules
Sometimes, if a partial checkout has already happened without Git LFS, you might need to remove the directories that failed. For example:
bashrm -rf third_party/icu rm -rf third_party/googletest rm -rf third_party/openssl rm -rf third_party/zlib rm -rf third_party/node
Then rerun repo sync
. This ensures you start from a clean state.
Avoid Using sudo
with repo
Typically, repo
commands should be run as a normal user, not via sudo. Using sudo
can create permission and ownership issues within your local working directories.
Re-run the Repo Sync
bashrepo sync -c -j8
Or, if you want to see errors more easily:
bashrepo sync -c -j1 --fail-fast
With Git LFS installed and initialized, the checkouts that depend on LFS objects should now succeed.
After following these steps, the repositories that previously showed “unsupported checkout state” should now properly sync, since Git LFS will handle any large binary files they contain.
yourkrash@DESKTOP-CQBNM5G:~/ark/arkcompiler_runtime_core/static_core$ repo sync -c -j1 --fail-fast ... A new version of repo (2.50) is available. ... New version is available at: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/.repo/repo/repo ... The launcher is run from: /usr/bin/repo !!! The launcher is not writable. Please talk to your sysadmin or distro !!! to get an update installed. Fetching: 100% (22/22), done in 35.169s error.GitError: Cannot checkout third_party_googletest: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/googletest/.git: unsupported checkout state error: Cannot checkout third_party_googletest Checking out: 50% (11/22), done in 0.012s error: Unable to fully sync the tree error: Checking out local projects failed. Failing repos: third_party/googletest Try re-running with "-j1 --fail-fast" to exit at the first error. ================================================================================ Repo command failed due to the following SyncError
errors: /home/yourkrash/ark/arkcompiler_runtime_core/static_core/third_party/googletest/.git: unsupported checkout state
It looks like the third_party/googletest
repo still needs Git LFS or is otherwise stuck in a bad checkout state. Here are a few things to check and try:
Since your prompt shows DESKTOP-CQBNM5G:~/ark/...
, it looks like you’re on Windows Subsystem for Linux (WSL). Make sure that inside WSL you have Git LFS installed. Installing Git LFS on Windows (outside WSL) is not enough.
Check if Git LFS is available in WSL:
bashwhich git-lfs git-lfs --version
bashsudo apt-get update sudo apt-get install git-lfs
You only need to dobashgit lfs install
git lfs install
once per user account. It sets up Git’s config to use LFS filters.If you ran repo sync
before installing Git LFS, that directory may have ended up in a weird half-initialized state. Usually the quickest fix is to remove the affected folder so it can be re-checked out cleanly:
bashrm -rf third_party/googletest
Then run a single-project sync to focus on that one repo:
bashrepo sync -c -j1 --fail-fast third_party/googletest
If that completes successfully, you can then do:
bashrepo sync -c -j8
…to bring everything else up to date.
sudo repo sync
repo
shouldn’t generally be run via sudo
. Running as root can cause file-permission issues. Always run repo sync
as your normal (non-root) user—especially in WSL.
If other third-party directories fail with the same error, repeat the same process:
bashrm -rf third_party/<failing_repo> repo sync -c -j1 --fail-fast third_party/<failing_repo>
You can also confirm your global Git config references LFS properly:
bashgit config --list | grep filter.lfs
You should see something like:
textfilter.lfs.clean=git-lfs clean -- ... filter.lfs.smudge=git-lfs smudge -- ... filter.lfs.process=git-lfs filter-process filter.lfs.required=true
If nothing appears, run git lfs install
again (without sudo), then check again.
sudo apt-get install git-lfs && git lfs install
third_party/googletest
) to clear the partial checkout.repo sync
with sudo
.Once Git LFS is configured correctly, you should be able to sync all sub-repos (including googletest) without the “unsupported checkout state” errors.
yourkrash@DESKTOP-CQBNM5G:/ark/arkcompiler_runtime_core/static_core$ ./prebuilts_download.sh Defaulting to user installation because normal site-packages is not writeable Looking in indexes: http://repo.huaweicloud.com/repository/pypi/simple Requirement already satisfied: rich in /home/yourkrash/.local/lib/python3.12/site-packages (13.9.4) Requirement already satisfied: markdown-it-py>=2.2.0 in /home/yourkrash/.local/lib/python3.12/site-packages (from rich) (3.0.0) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /home/yourkrash/.local/lib/python3.12/site-packages (from rich) (2.18.0) Requirement already satisfied: mdurl=0.1 in /home/yourkrash/.local/lib/python3.12/site-packages (from markdown-it-py>=2.2.0->rich) (0.1.2) prebuilts_download start Traceback (most recent call last): File "/home/yourkrash/ark/arkcompiler_runtime_core/static_core/arkcompiler/toolchain/build/prebuilts_download/prebuilts_download.py", line 29, in <module> from rich.progress import ( ModuleNotFoundError: No module named 'rich'
You’re getting the error ModuleNotFoundError: No module named 'rich'
because the Python interpreter that’s actually running prebuilts_download.py
doesn’t have the rich
library installed, even though you installed it locally for another interpreter or Python version. Essentially, the script is using a different Python environment/path than the one you installed rich
into.
Below are a few ways to fix it:
Check which Python is running the script. In prebuilts_download.sh
, there may be a python
or python3
call. Or it might have a shebang (e.g., #!/usr/bin/env python3
).
Make sure you install rich
for that exact Python:
bashpython3 -m pip install --user --upgrade rich
or
bashpip3 install --user --upgrade rich
Confirm it’s installed correctly by running:
bashpython3 -c "import rich; print(rich.__version__)"
If that works without error, then re-run ./prebuilts_download.sh
. If the script still complains it can’t find rich
, it’s likely calling a different Python (for example, /usr/bin/python
vs. /usr/bin/python3
, or an older Python version).
If you open arkcompiler/toolchain/build/prebuilts_download/prebuilts_download.py
(or whichever script is failing) and see a shebang at the top, e.g.:
python#!/usr/bin/python
…and your installed rich
is only available in Python 3.12 (for example /usr/bin/python3.12
), then you need to either:
#!/usr/bin/env python3
/usr/bin/python
is actually Python 3 and has rich
installed.If you have permission (and want a quick system-wide fix), you can install rich
for the system Python:
bashsudo apt-get update sudo apt-get install python3-pip # if not installed sudo pip3 install --upgrade rich
Then all Python 3 interpreters at the system level can find rich
. (Still, if the script is calling Python 2 for any reason, that won’t help.)
If you’re on Windows Subsystem for Linux (WSL), note that installing rich
in Windows Python doesn’t install it in WSL’s Python. They’re completely separate environments. Make sure to do all installations within the WSL environment.
./prebuilts_download.sh
.rich
module into that interpreter’s environment.import rich
works in that same Python environment.Once the correct environment is aligned, prebuilts_download.sh
should work without the "No module named ‘rich’" error.
yourkrash@DESKTOP-CQBNM5G:~/ark/arkcompiler_runtime_core/static_core$ python3 -c "import rich; print(rich.version)" Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'rich' has no attribute 'version'
The error “AttributeError: module 'rich' has no attribute '__version__'
” indicates that Python did find a module named rich
, but it’s missing the expected __version__
symbol. Usually, the official Rich library does define __version__
. If you installed Rich from PyPI (for example pip3 install rich
), you should see __version__
in rich.__init__.py
.
This discrepancy often comes from:
rich.py
that shadows the real library.rich
in one environment, but are running a different Python that has some other “rich” module, or a partial/broken Rich install.Here’s how to pinpoint the cause:
rich
Python Is Actually ImportingRun:
bashpython3 -c "import rich; print(rich.__file__)"
/home/<user>/.local/lib/python3.12/site-packages/rich/__init__.py
, that’s usually the correct Rich library./home/<user>/ark/arkcompiler_runtime_core/static_core/rich.py
(or anywhere outside standard site-packages), you have a local file overshadowing the official library. In that case, rename or remove that local file so Python sees the real Rich library.pip3
Use pip3
(not just pip
) to ensure you’re installing for Python 3.x. Also check that you see the correct version:
bashpip3 show rich
You should see something like:
textName: rich Version: 13.9.4 Location: /home/<user>/.local/lib/python3.12/site-packages
If pip3 show rich
can’t find anything, then rich
was never installed in that environment. If you see a different path or a suspicious version, that may explain the missing __version__
.
importlib.metadata
Instead of rich.__version__
Even if rich.__version__
is missing for some reason, you can also do:
bashpython3 -c "import importlib.metadata as m; print(m.version('rich'))"
PackageNotFoundError
, it means your Python environment doesn’t see a PyPI-installed Rich.If you find a local file overshadowing the Rich library, rename or remove it.
For example:
bashmv rich.py rich_local.py
If you discover multiple Python versions and you only installed Rich in one of them, either:
bashpython3 -m pip install --user --upgrade rich
#!/usr/bin/env python
to #!/usr/bin/env python3
).Once Python is truly importing the correct Rich library, you can safely check that import rich
works without error, and any tool (such as prebuilts_download.sh
) that depends on Rich should run correctly.
rich
module Python is seeing (python3 -c "import rich; print(rich.__file__)"
).pip3 install --user rich
).rich.py
that might shadow the library.pip3 show rich
or importlib.metadata.version("rich")
.__version__
.