[Buildroot] [PATCH v4] package/criu: new package

Marcus Folkesson marcus.folkesson at gmail.com
Sat Oct 21 15:25:22 UTC 2023


Hi Julien,

Thank you for your solid review!

I will apply all changes you suggested.

On Sat, Oct 21, 2023 at 01:15:10PM +0200, Julien Olivain wrote:
> Hi Marcus,
> 
> Thanks for the updated patch!
> 

[...]
>            bootlin-x86-64-uclibc [26/45]: FAILED
> 
> Build fails with output:
> 
>     criu/fsnotify.c:18:10: fatal error: aio.h: No such file or directory
>        18 | #include <aio.h>
>           |          ^~~~~~~

Not sure that to do about this. It already depends on libaio.
> 
>            bootlin-xtensa-uclibc [27/45]: SKIPPED
>                     br-arm-basic [28/45]: SKIPPED
>             br-arm-full-nothread [29/45]: SKIPPED
>               br-arm-full-static [30/45]: SKIPPED
>            br-i386-pentium4-full [31/45]: FAILED
> 

[...]

> 
>               br-mips64-n64-full [33/45]: SKIPPED
>          br-mips64r6-el-hf-glibc [34/45]: SKIPPED
>        br-powerpc-603e-basic-cpp [35/45]: SKIPPED
>        br-powerpc64-power7-glibc [36/45]: FAILED
> 
> Build fails with output:
> 
>     In file included from compel/plugins/std/infect.c:14:
>     compel/include/uapi/compel/asm/sigframe.h:27:2: error: #error Only
> supporting ABIv2.
>        27 | #error Only supporting ABIv2.
>           |  ^~~~~

I will only support PPC64 with LE. The GCC says that:
`
-mabi=elfv1
Change the current ABI to use the ELFv1 ABI. This is the default ABI for big-endian PowerPC 64-bit Linux. Overriding the default ABI requires special system support and is likely to fail in spectacular ways.

-mabi=elfv2
Change the current ABI to use the ELFv2 ABI. This is the default ABI for little-endian PowerPC 64-bit Linux. Overriding the default ABI requires special system support and is likely to fail in spectacular ways.
`

[...]
>                    sourcery-mips [44/45]: FAILED
> 
> Fails with output:
> 
>     compel/arch/mips/plugins/std/memcpy.S: Assembler messages:
>     compel/arch/mips/plugins/std/memcpy.S:7: Error: opcode not supported on
> this processor: mips32r2 (mips32r2) 'dadd $2,$0,$4'
>     compel/arch/mips/plugins/std/memcpy.S:8: Error: opcode not supported on
> this processor: mips32r2 (mips32r2) 'daddiu $13,$0,0'
>     compel/arch/mips/plugins/std/memcpy.S:14: Error: opcode not supported on
> this processor: mips32r2 (mips32r2) 'daddiu $13,$13,1'
>     compel/arch/mips/plugins/std/memcpy.S:15: Error: opcode not supported on
> this processor: mips32r2 (mips32r2) 'daddiu $4,$4,1'
>     compel/arch/mips/plugins/std/memcpy.S:16: Error: opcode not supported on
> this processor: mips32r2 (mips32r2) 'daddiu $5,$5,1'
> 
> There is maybe few extra condtions missing in the _ARCH_SUPPORTS for mips.

Hrm, will have a look. Thanks.
> 
>                   sourcery-nios2 [45/45]: SKIPPED
> 45 builds, 29 skipped, 10 build failed, 0 legal-info failed, 0 show-info
> failed
> 
> To test thoroughly your package with a specific list of toolchains, you can
> use the
> following commands:
> 
>     cp support/config-fragments/autobuild/toolchain-configs.csv
> criu-toolchains.csv
>     # edit criu-toolchains.csv to keep your toolchains of interest.
>     utils/test-pkg -a -t criu-toolchains.csv -c criu.config -p criu
> 
> This will retest only the toolchains kept in the csv.

Thanks for the tip!

[...]
> > +
> > +menuconfig BR2_PACKAGE_CRIU
> > +	bool "criu"
> > +	depends on BR2_PACKAGE_CRIU_ARCH_SUPPORTS
> > +	depends on BR2_PACKAGE_HOST_PYTHON3 # host-python3-ssl
> > +	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
> > +	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
> > +	depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS
> > +	depends on BR2_INSTALL_LIBSTDCPP # protobuf
> > +	depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf, libnl
> 
> A dependency on kernel header >= 4.18 should be added:
> 
>     depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 # rseq.h


This makes the bootlin-x86-64-musl test to be skipped as it has
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 at highest.

The build used to succeed though :-/

[...]
> > +################################################################################
> > +#
> > +# CRIU
> > +#
> > +################################################################################
> > +
> > +CRIU_VERSION = 3.18
> > +CRIU_SITE = $(call github,checkpoint-restore,criu,v$(CRIU_VERSION))
> > +
> > +CRIU_LICENSE = GPL-2.0
> > +CRIU_LICENSE_FILES = COPYING
> > +CRIU_DEPENDENCIES =\
> > +	host-pkgconf \
> > +	host-protobuf-c \
> > +	host-python3 \
> > +	host-python-pip \
> > +	libaio \
> > +	libbsd \
> > +	libcap \
> > +	libnet \
> > +	libnl \
> > +	protobuf \
> > +	protobuf-c \
> > +	python3
> > +
> > +CRIU_MAKE_ENV =\
> > +	$(TARGET_MAKE_ENV) \
> > +	$(TARGET_CONFIGURE_OPTS) \
> > +	CROSS_COMPILE=$(TARGET_CROSS) \
> > +	WERROR=0
> > +
> > +#x86_64 is treated as x86 in criu
> > +#Also, powerpc64 is refered to as ppc64 in criu.
> 
> There is possibly some rework needed here to fix architecture
> related build failures described earlier.
> 

I will go for $(BR2_NORMALIZED_ARCH) instead of $(BR2_ARCH), it will
solve the most of these type of errors.

> 
> Best regards,
> 
> Julien.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20231021/b841513c/attachment-0001.asc>


More information about the buildroot mailing list