thin-edge / meta-tedge-project

Create thin-edge.io images using kas and yocto
Apache License 2.0
0 stars 2 forks source link

"Commit failed" when building the image #21

Open zhong-ys opened 4 months ago

zhong-ys commented 4 months ago

Hi, I'm trying to build an image using yocto following this guide. Almost right after the build process started, I got the following error:

python3 -m kas build ./projects/tedge-rauc.yaml
2024-05-16 16:44:35 - INFO     - __main__.py 4.3.2 started
2024-05-16 16:44:35 - WARNING  - Falling back to file-relative addressing of local include "config/common.yaml"
2024-05-16 16:44:35 - WARNING  - Update your layer to repo-relative addressing to avoid this warning
2024-05-16 16:44:35 - WARNING  - Falling back to file-relative addressing of local include "config/raspberrypi.yaml"
2024-05-16 16:44:35 - WARNING  - Update your layer to repo-relative addressing to avoid this warning
2024-05-16 16:44:35 - WARNING  - Falling back to file-relative addressing of local include "config/rauc-raspberrypi.yaml"
2024-05-16 16:44:35 - WARNING  - Update your layer to repo-relative addressing to avoid this warning
2024-05-16 16:44:35 - WARNING  - Falling back to file-relative addressing of local include "config/package-management.yaml"
2024-05-16 16:44:35 - WARNING  - Update your layer to repo-relative addressing to avoid this warning
2024-05-16 16:44:35 - INFO     - Repository meta-rauc-community already contains c3f3ab4c587f51a74a76546ce2813c8be7c6d128 as commit
2024-05-16 16:44:35 - INFO     - Repository meta-rauc already contains 1ce846097f74acfdd15fef0d64a6fd3eeee3d6f5 as commit
2024-05-16 16:44:35 - INFO     - Repository meta-openembedded already contains 5a6f7925bd2b885955c942573f70a5594f231563 as commit
2024-05-16 16:44:35 - INFO     - Repository poky already contains 2b21c6009aa6b955e1a0e7312c3c0ad66557681b as commit
2024-05-16 16:44:35 - INFO     - Repository meta-raspberrypi already contains 9dc6673d41044f1174551120ce63501421dbcd85 as commit
2024-05-16 16:44:35 - INFO     - Repository meta-tedge already contains bb1afcd8cf0d13be08019691aefcca733117d0fd as commit
2024-05-16 16:44:35 - INFO     - Repository meta-rust already contains 9611b42d73c7546c3d845da380943a0a4f4205f0 as commit
2024-05-16 16:44:39 - ERROR    - Command "/Users/yiz/Projects/Aquafin/meta-tedge-project/poky$ git checkout -q 2b21c6009aa6b955e1a0e7312c3c0ad66557681b -B kirkstone" failed
--- Error summary ---
error: The following untracked working tree files would be overwritten by checkout:
    meta/lib/oeqa/selftest/cases/eSDK.py
    meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2022-33065.patch
Please move or remove them before you switch branches.
Aborting

2024-05-16 16:44:39 - ERROR    - Command "git checkout -q 2b21c6009aa6b955e1a0e7312c3c0ad66557681b -B kirkstone" failed with error 1
error: Recipe `build-project` failed on line 28 with exit code 2

I already tried just clean, but still got this error. How can I solve this error? Maybe could 'git clean' be helpful here?

PC: Macbook with M1 chip VM: Lima VM, Ubuntu 20.04

reubenmiller commented 4 months ago

You can't use your mac to build this...yocto will have a very difficult time with anything other than x86_64 machine....it is really not worth the effort.

So you need a x86_64 build the images successfully.

zhong-ys commented 4 months ago

Thanks Reuben, I will try with another PC.

reubenmiller commented 4 months ago

Though I still might keep this ticket open until we explicitly mention about the build host requirement as I couldn't find it anywhere in our docs...I just know from personal attempts that building on anything other x86_64 is just painful...

zhong-ys commented 4 months ago

I first tried on my Macbook because I saw some tips for building on MacOS Apple Silicon in the docs. So I thought it should also work. I'll move on to x86.

reubenmiller commented 4 months ago

I first tried on my Macbook because I saw some tips for building on MacOS Apple Silicon in the docs. So I thought it should also work. I'll move on to x86.

I think that section was added at the time where we were primarily using the pre-built tedge binaries, however the build no longer works when building thin-edge.io from source (which is the preferred approach in the Yocto world)...and building from source does not support building on host machines other than x86_64...so we definitely need to update the notes section in the docs.