Cross compilation of arm64 on x86_64 host

354 views
Skip to first unread message

Shantanu Shrivastava

unread,
Oct 10, 2023, 12:58:27 PM10/10/23
to sonicproject
Hello Team,

I am getting docker registry error when compiling arm64 on x86_64 host machine. Did anyone face this issue. Please help.

Error response from daemon: No such image: sonic-slave-bullseye-march-arm64:c6df6649fc6
[+] Building 0.7s (3/4)
 => [internal] load build definition from Dockerfile.cleanup                                                                                                                             0.0s
 => => transferring dockerfile: 360B                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                          0.0s
 => ERROR FROM docker.io/library/sonic-slave-bullseye-march-arm64:c6df6649fc6                                                                                                            0.5s
 => => resolve docker.io/library/sonic-slave-bullseye-march-arm64:c6df6649fc6                                                                                                            0.5s
------
 > FROM docker.io/library/sonic-slave-bullseye-march-arm64:c6df6649fc6:
------
failed to load cache key: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
[+] Building 0.5s (3/3) FINISHED
 => [internal] load build definition from Dockerfile.cleanup                                                                                                                             0.0s
 => => transferring dockerfile: 46B                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                          0.0s
 => ERROR [internal] load metadata for docker.io/library/sonic-slave-bullseye-march-arm64:c6df6649fc6                                                                                    0.4s
------
 > [internal] load metadata for docker.io/library/sonic-slave-bullseye-march-arm64:c6df6649fc6:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Error: No such image: tmp-sonic-slave-bullseye-march-arm64:c6df6649fc6
Error: No such container:path: sonic-slave-bullseye-march-arm64-c6df6649fc6:/usr/local/share/buildinfo/log
sync: error opening 'sonic-slave-bullseye/vcache/cache.base64': No such file or directory
Error: No such container: sonic-slave-bullseye-march-arm64-c6df6649fc6
Makefile.work:598: recipe for target 'configure' failed



Regards,
Shantanu

ALKAMA HASAN

unread,
Nov 27, 2023, 1:01:52 PM11/27/23
to sonicproject
Hi Shantanu,
did you successfully built the cross compilation of sonic-buildimage?

Keerthi kumar thovi

unread,
Nov 28, 2023, 11:33:45 PM11/28/23
to ALKAMA HASAN, sonicproject, soni...@lists.sonicfoundation.dev
Hi Hasan/Shantanu,
     We have tried cross-compiling ARM64 SONiC image from a X86 host PC. After taking multiple fix updates, we are able to generate SONiC binary successfully in our local build setup. Please refer to the following GITHub Issue and check if it helps, to resolve your errors.  


Also, I suppose the SONiC community active group id is soni...@lists.sonicfoundation.dev. Please check accordingly.

Thanks and Regards,
T. Keerthi Kumar
Capgemini Engineering

--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/f3f1eb60-8a57-415e-a0ee-007cb837e8b3n%40googlegroups.com.

Alkama Hasan

unread,
Nov 30, 2023, 5:31:46 AM11/30/23
to sonicproject
Hi keerthi,
I saw the github issue you shared,
i am also getting the same error as is in the issue
RROR [internal] load metadata for docker.io/library/sonic-slave-bullseye-march-arm64:0daccc30a5a                                                                                    Dockerfile.cleanup:9 
8 |     # Clean up the cache data
                                                                                                                                                                                              9 | >>> FROM sonic-slave-bullseye-march-arm64:0daccc30a5a as final
                                                   10 |     RUN rm /cache.tgz
                                                                               11 |
                                                                                        --------------------
                                                                                                            ERROR: failed to solve: sonic-slave-bullseye-march-arm64:0daccc30a5a: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
                                                                                                       Error response from daemon: No such image: tmp-sonic-slave-bullseye-march-arm64:0daccc30a5a
                                                                                                                                                                                                  Error response from daemon: No such container: sonic-slave-bullseye-march-arm64-0daccc30a5a

                                                                              sync: error opening 'sonic-slave-bullseye/vcache/cache.base64': No such file or directory
                                                                                                                                                                       Error response from daemon: No such container: sonic-slave-bullseye-march-arm64-0daccc30a5a
                                                   make[1]: *** [Makefile.work:618: configure] Error 1
                                                                                                      make[1]: Leaving directory '/home/alkama/sonic-vpp-arm/sonic-buildimage'
                                                                                                                                                                              make: *** [Makefile:109: configure] Error 2


at the end of the issue you mentioned 
"Please be informed that, above issue is resolved by migrating bullseye & buster docker/containerd versions to latest i.e. 24"
did you do any changes in the code?
or in setup?Can you specify please

Thanks,
Alkama

Keerthi kumar thovi

unread,
Dec 1, 2023, 9:21:07 AM12/1/23
to Alkama Hasan, sonicproject
Hi Alkama,
     I did changes in both host PC & in sonic-slave Docker files (i.e buster & bullseye). If you are using master branch code, then Docker files has this update, already.

Thanks & Regards,
T Keerthi Kumar
Capgemini Engineering 

Reply all
Reply to author
Forward
0 new messages