[PATCH v5 0/3] Yocto Gitlab CI

Bertrand Marquis posted 3 patches 1 year, 4 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
automation/build/Makefile                  |  24 +-
automation/build/yocto/build-yocto.sh      | 351 +++++++++++++++++++++
automation/build/yocto/yocto.dockerfile.in | 114 +++++++
automation/build/yocto/yocto.inc           |  42 +++
automation/gitlab-ci/test.yaml             |  43 +++
5 files changed, 572 insertions(+), 2 deletions(-)
create mode 100755 automation/build/yocto/build-yocto.sh
create mode 100644 automation/build/yocto/yocto.dockerfile.in
create mode 100644 automation/build/yocto/yocto.inc
[PATCH v5 0/3] Yocto Gitlab CI
Posted by Bertrand Marquis 1 year, 4 months ago
This patch series is a first attempt to check if we could use Yocto in
gitlab ci to build and run xen on qemu for arm, arm64 and x86.

The first patch is introducing a container template from which container
files can be generated for all combinations we want to support (qemu
arm, arm64 and x86 targets and hosts x86_64 and arm64).
It is also introducing a generic build script (build-yocto.sh) that is
used to create, build and run a Yocto project.

The second patch is adding a way to easily clean locally created
containers.

The third patch is introducing some gitlab CI templates and jobs so that
we can test a Xen source tree in gitlab-CI using Yocto.

This has been tested on a x86 host machine and on an arm host machine
(with mk_dsdt.c fix).

Changes in v5:
- automatic cleanup of generated docker files using INTERMEDIATE
- typo fixes
- rebase on Stefano's next branch
- remove clean rule cleaning all containers

Changes in v4:
- rework the container generation to support multiple hosts
- rework the container generation to use a single template for all
  docker files (make process is generating the docker files).

Changes in v3:
- limit number of jobs in yocto
- do not copy build script inside container
- add patch from Michal to create gitlab jobs

Changes in v2:
- remove gitignore patch which was merged
- add a --dump-log support in build-yocto.sh script and use it during
  container creation to see the error logs.


Bertrand Marquis (2):
  automation: Create Yocto docker images
  automation: Add a clean rule for containers

Michal Orzel (1):
  automation: Add CI test jobs for Yocto

 automation/build/Makefile                  |  24 +-
 automation/build/yocto/build-yocto.sh      | 351 +++++++++++++++++++++
 automation/build/yocto/yocto.dockerfile.in | 114 +++++++
 automation/build/yocto/yocto.inc           |  42 +++
 automation/gitlab-ci/test.yaml             |  43 +++
 5 files changed, 572 insertions(+), 2 deletions(-)
 create mode 100755 automation/build/yocto/build-yocto.sh
 create mode 100644 automation/build/yocto/yocto.dockerfile.in
 create mode 100644 automation/build/yocto/yocto.inc

-- 
2.25.1
Re: [PATCH v5 0/3] Yocto Gitlab CI
Posted by Stefano Stabellini 1 year, 4 months ago
The build of the qemux86-64 container still fails, logs attached.
I tested the full gitlab-ci pipeline for qemuarm and qemuarm64 and they
both succeeded.

On Wed, 30 Nov 2022, Bertrand Marquis wrote:
> This patch series is a first attempt to check if we could use Yocto in
> gitlab ci to build and run xen on qemu for arm, arm64 and x86.
> 
> The first patch is introducing a container template from which container
> files can be generated for all combinations we want to support (qemu
> arm, arm64 and x86 targets and hosts x86_64 and arm64).
> It is also introducing a generic build script (build-yocto.sh) that is
> used to create, build and run a Yocto project.
> 
> The second patch is adding a way to easily clean locally created
> containers.
> 
> The third patch is introducing some gitlab CI templates and jobs so that
> we can test a Xen source tree in gitlab-CI using Yocto.
> 
> This has been tested on a x86 host machine and on an arm host machine
> (with mk_dsdt.c fix).
> 
> Changes in v5:
> - automatic cleanup of generated docker files using INTERMEDIATE
> - typo fixes
> - rebase on Stefano's next branch
> - remove clean rule cleaning all containers
> 
> Changes in v4:
> - rework the container generation to support multiple hosts
> - rework the container generation to use a single template for all
>   docker files (make process is generating the docker files).
> 
> Changes in v3:
> - limit number of jobs in yocto
> - do not copy build script inside container
> - add patch from Michal to create gitlab jobs
> 
> Changes in v2:
> - remove gitignore patch which was merged
> - add a --dump-log support in build-yocto.sh script and use it during
>   container creation to see the error logs.
> 
> 
> Bertrand Marquis (2):
>   automation: Create Yocto docker images
>   automation: Add a clean rule for containers
> 
> Michal Orzel (1):
>   automation: Add CI test jobs for Yocto
> 
>  automation/build/Makefile                  |  24 +-
>  automation/build/yocto/build-yocto.sh      | 351 +++++++++++++++++++++
>  automation/build/yocto/yocto.dockerfile.in | 114 +++++++
>  automation/build/yocto/yocto.inc           |  42 +++
>  automation/gitlab-ci/test.yaml             |  43 +++
>  5 files changed, 572 insertions(+), 2 deletions(-)
>  create mode 100755 automation/build/yocto/build-yocto.sh
>  create mode 100644 automation/build/yocto/yocto.dockerfile.in
>  create mode 100644 automation/build/yocto/yocto.inc
> 
> -- 
> 2.25.1
> | Parsing libxl_types.idl
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:34: error: "___DEFINE_XEN_GUEST_HANDLE" redefined [-Werror]
|    34 | #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:176: note: this is the location of the previous definition
|   176 | #define ___DEFINE_XEN_GUEST_HANDLE(name, type)                  \
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:53: error: "__XEN_GUEST_HANDLE" redefined [-Werror]
|    53 | #define __XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:193: note: this is the location of the previous definition
|   193 | #define __XEN_GUEST_HANDLE(name)        __guest_handle_64_ ## name
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:55: error: "XEN_GUEST_HANDLE_PARAM" redefined [-Werror]
|    55 | #define XEN_GUEST_HANDLE_PARAM(name)    XEN_GUEST_HANDLE(name)
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:195: note: this is the location of the previous definition
|   195 | #define XEN_GUEST_HANDLE_PARAM(name)    __guest_handle_ ## name
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:56: error: "set_xen_guest_handle_raw" redefined [-Werror]
|    56 | #define set_xen_guest_handle_raw(hnd, val)  do { (hnd).p = val; } while (0)
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:196: note: this is the location of the previous definition
|   196 | #define set_xen_guest_handle_raw(hnd, val)                  \
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:77: error: "PRI_xen_pfn" redefined [-Werror]
|    77 | #define PRI_xen_pfn "lx"
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:205: note: this is the location of the previous definition
|   205 | #define PRI_xen_pfn PRIx64
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:78: error: "PRIu_xen_pfn" redefined [-Werror]
|    78 | #define PRIu_xen_pfn "lu"
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:206: note: this is the location of the previous definition
|   206 | #define PRIu_xen_pfn PRIu64
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:117: error: "XEN_LEGACY_MAX_VCPUS" redefined [-Werror]
|   117 | #define XEN_LEGACY_MAX_VCPUS 32
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:212: note: this is the location of the previous definition
|   212 | #define XEN_LEGACY_MAX_VCPUS 1
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:122: error: "PRI_xen_ulong" redefined [-Werror]
|   122 | #define PRI_xen_ulong "lx"
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:215: note: this is the location of the previous definition
|   215 | #define PRI_xen_ulong PRIx64
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:179:8: error: redefinition of ‘struct vcpu_guest_context’
|   179 | struct vcpu_guest_context {
|       |        ^~~~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:293:8: note: originally defined here
|   293 | struct vcpu_guest_context {
|       |        ^~~~~~~~~~~~~~~~~~
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:192: error: "_VGCF_online" redefined [-Werror]
|   192 | #define _VGCF_online                   5
|       |
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:294: note: this is the location of the previous definition
|   294 | #define _VGCF_online                   0
|       |
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:195:26: error: field ‘user_regs’ has incomplete type
|   195 |     struct cpu_user_regs user_regs;         /* User-level CPU registers     */
|       |                          ^~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:231:35: error: conflicting types for ‘vcpu_guest_context_t’; have ‘struct vcpu_guest_context’
|   231 | typedef struct vcpu_guest_context vcpu_guest_context_t;
|       |                                   ^~~~~~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:303:35: note: previous declaration of ‘vcpu_guest_context_t’ with type ‘vcpu_guest_context_t’ {aka ‘struct vcpu_guest_context’}
|   303 | typedef struct vcpu_guest_context vcpu_guest_context_t;
|       |                                   ^~~~~~~~~~~~~~~~~~~~
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:35:33: error: conflicting types for ‘__guest_handle_vcpu_guest_context_t’; have ‘struct <anonymous>’
|    35 |     typedef struct { type *p; } __guest_handle_ ## name
|       |                                 ^~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:50:5: note: in expansion of macro ‘___DEFINE_XEN_GUEST_HANDLE’
|    50 |     ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
|       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:52:41: note: in expansion of macro ‘__DEFINE_XEN_GUEST_HANDLE’
|    52 | #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
|       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:232:1: note: in expansion of macro ‘DEFINE_XEN_GUEST_HANDLE’
|   232 | DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
|       | ^~~~~~~~~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:178:9: note: previous declaration of ‘__guest_handle_vcpu_guest_context_t’ with type ‘__guest_handle_vcpu_guest_context_t’
|   178 |         __guest_handle_ ## name;                                \
|       |         ^~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:190:5: note: in expansion of macro ‘___DEFINE_XEN_GUEST_HANDLE’
|   190 |     ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
|       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:192:41: note: in expansion of macro ‘__DEFINE_XEN_GUEST_HANDLE’
|   192 | #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
|       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:304:1: note: in expansion of macro ‘DEFINE_XEN_GUEST_HANDLE’
|   304 | DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
|       | ^~~~~~~~~~~~~~~~~~~~~~~
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:35:33: error: conflicting types for ‘__guest_handle_const_vcpu_guest_context_t’; have ‘struct <anonymous>’
|    35 |     typedef struct { type *p; } __guest_handle_ ## name
|       |                                 ^~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:51:5: note: in expansion of macro ‘___DEFINE_XEN_GUEST_HANDLE’
|    51 |     ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
|       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:52:41: note: in expansion of macro ‘__DEFINE_XEN_GUEST_HANDLE’
|    52 | #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
|       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:232:1: note: in expansion of macro ‘DEFINE_XEN_GUEST_HANDLE’
|   232 | DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
|       | ^~~~~~~~~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:178:9: note: previous declaration of ‘__guest_handle_const_vcpu_guest_context_t’ with type ‘__guest_handle_const_vcpu_guest_context_t’
|   178 |         __guest_handle_ ## name;                                \
|       |         ^~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:191:5: note: in expansion of macro ‘___DEFINE_XEN_GUEST_HANDLE’
|   191 |     ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
|       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:192:41: note: in expansion of macro ‘__DEFINE_XEN_GUEST_HANDLE’
|   192 | #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
|       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:304:1: note: in expansion of macro ‘DEFINE_XEN_GUEST_HANDLE’
|   304 | DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
|       | ^~~~~~~~~~~~~~~~~~~~~~~
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:234:8: error: redefinition of ‘struct arch_shared_info’
|   234 | struct arch_shared_info {
|       |        ^~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:345:8: note: originally defined here
|   345 | struct arch_shared_info {
|       |        ^~~~~~~~~~~~~~~~
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:275:33: error: conflicting types for ‘arch_shared_info_t’; have ‘struct arch_shared_info’
|   275 | typedef struct arch_shared_info arch_shared_info_t;
|       |                                 ^~~~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:347:33: note: previous declaration of ‘arch_shared_info_t’ with type ‘arch_shared_info_t’ {aka ‘struct arch_shared_info’}
|   347 | typedef struct arch_shared_info arch_shared_info_t;
|       |                                 ^~~~~~~~~~~~~~~~~~
| In file included from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:282:8: error: redefinition of ‘struct xen_arch_domainconfig’
|   282 | struct xen_arch_domainconfig {
|       |        ^~~~~~~~~~~~~~~~~~~~~
| In file included from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../xen.h:35,
|                  from /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/xen.h:27,
|                  from mk_dsdt.c:21:
| /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi/../../tools/include/xen/arch-x86/../arch-arm.h:317:8: note: originally defined here
|   317 | struct xen_arch_domainconfig {
|       |        ^~~~~~~~~~~~~~~~~~~~~
| cc1: all warnings being treated as errors
| make[7]: *** [Makefile:50: /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libs/light/mk_dsdt] Error 1
| make[7]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libacpi'
| make[6]: *** [Makefile:41: acpi] Error 2
| make[6]: *** Waiting for unfinished jobs....
| mv -f _libxl.api-for-check.new _libxl.api-for-check
| mv testidl.c.new testidl.c
| make[6]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libs/light'
| make[5]: *** [/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libs/../../tools/Rules.mk:166: subdir-install-light] Error 2
| make[5]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libs'
| make[4]: *** [/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libs/../../tools/Rules.mk:161: subdirs-install] Error 2
| make[4]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/libs'
| make[3]: *** [/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/../tools/Rules.mk:166: subdir-install-libs] Error 2
| make[3]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools'
| make[2]: *** [/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools/../tools/Rules.mk:161: subdirs-install] Error 2
| make[2]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools'
| make[1]: *** [Makefile:66: install] Error 2
| make[1]: Leaving directory '/home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/git/tools'
| make: *** [Makefile:140: install-tools] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/temp/run.do_compile.2461011:201 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|       #1: bbfatal_log, /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/temp/run.do_compile.2461011, line 201
|       #2: die, /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/temp/run.do_compile.2461011, line 185
|       #3: oe_runmake, /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/temp/run.do_compile.2461011, line 180
|       #4: do_compile, /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/temp/run.do_compile.2461011, line 174
|       #5: main, /home/docker-build/build/qemux86-64/tmp/work/core2-64-poky-linux/xen-tools/4.16+stableAUTOINC+f265444922-r0/temp/run.do_compile.2461011, line 214
NOTE: recipe xen-tools-4.16+stableAUTOINC+f265444922-r0: task do_compile: Failed
Re: [PATCH v5 0/3] Yocto Gitlab CI
Posted by Bertrand Marquis 1 year, 4 months ago
Hi Stefano,

> On 1 Dec 2022, at 04:00, Stefano Stabellini <sstabellini@kernel.org> wrote:
> 
> The build of the qemux86-64 container still fails, logs attached.
> I tested the full gitlab-ci pipeline for qemuarm and qemuarm64 and they
> both succeeded.

This is actually because we build 4.16, this was fixed on master.
I will enforce to use the latest version of Xen available.
I will modify and test that today.

Cheers
Bertrand

> 
> On Wed, 30 Nov 2022, Bertrand Marquis wrote:
>> This patch series is a first attempt to check if we could use Yocto in
>> gitlab ci to build and run xen on qemu for arm, arm64 and x86.
>> 
>> The first patch is introducing a container template from which container
>> files can be generated for all combinations we want to support (qemu
>> arm, arm64 and x86 targets and hosts x86_64 and arm64).
>> It is also introducing a generic build script (build-yocto.sh) that is
>> used to create, build and run a Yocto project.
>> 
>> The second patch is adding a way to easily clean locally created
>> containers.
>> 
>> The third patch is introducing some gitlab CI templates and jobs so that
>> we can test a Xen source tree in gitlab-CI using Yocto.
>> 
>> This has been tested on a x86 host machine and on an arm host machine
>> (with mk_dsdt.c fix).
>> 
>> Changes in v5:
>> - automatic cleanup of generated docker files using INTERMEDIATE
>> - typo fixes
>> - rebase on Stefano's next branch
>> - remove clean rule cleaning all containers
>> 
>> Changes in v4:
>> - rework the container generation to support multiple hosts
>> - rework the container generation to use a single template for all
>>  docker files (make process is generating the docker files).
>> 
>> Changes in v3:
>> - limit number of jobs in yocto
>> - do not copy build script inside container
>> - add patch from Michal to create gitlab jobs
>> 
>> Changes in v2:
>> - remove gitignore patch which was merged
>> - add a --dump-log support in build-yocto.sh script and use it during
>>  container creation to see the error logs.
>> 
>> 
>> Bertrand Marquis (2):
>>  automation: Create Yocto docker images
>>  automation: Add a clean rule for containers
>> 
>> Michal Orzel (1):
>>  automation: Add CI test jobs for Yocto
>> 
>> automation/build/Makefile                  |  24 +-
>> automation/build/yocto/build-yocto.sh      | 351 +++++++++++++++++++++
>> automation/build/yocto/yocto.dockerfile.in | 114 +++++++
>> automation/build/yocto/yocto.inc           |  42 +++
>> automation/gitlab-ci/test.yaml             |  43 +++
>> 5 files changed, 572 insertions(+), 2 deletions(-)
>> create mode 100755 automation/build/yocto/build-yocto.sh
>> create mode 100644 automation/build/yocto/yocto.dockerfile.in
>> create mode 100644 automation/build/yocto/yocto.inc
>> 
>> -- 
>> 2.25.1
> <log.txt>