[Buildroot] [PATCH 1/2] package/criu: new package

Julien Olivain ju.o at free.fr
Tue Sep 12 21:53:32 UTC 2023


Hi Marcus,

On 12/09/2023 14:53, Marcus Folkesson wrote:
> Hi Julien,
> 
> 
> On Sun, Sep 10, 2023 at 11:05:19PM +0200, Julien Olivain wrote:
>> Hi Marcus,
>> 
>> On 10/09/2023 21:41, Marcus Folkesson wrote:
>> > Hi Julien,
>> >
>> > On Sat, Sep 09, 2023 at 11:16:27PM +0200, Julien Olivain wrote:
>> > > Hi Thomas, Marcus,
>> > >
>> > > On 09/09/2023 15:55, Thomas Petazzoni wrote:
>> > > > On Sat, 9 Sep 2023 15:03:13 +0200
>> > > > Marcus Folkesson <marcus.folkesson at gmail.com> wrote:
>> > > >
>> > > > > Thank you for your solid review.
>> > >
>> > > [...]
>> > >
>> > > > One good thing would be to have a runtime test for criu, in
>> > > > support/testing. Julien Olivain (in Cc) can probably provide some
>> > > > guidance here.
>> > >
>> > >
>> > > Marcus, you should be able to reproduce that with the command:
>> > >
>> > >     utils/test-pkg -p criu
>> >
>> > I've sent out a v2 where the comments from Thomas is addressed. But I am
>> > not able to reproduce the errors you got with test-pkg.
>> >
>> > I'm not sure why it skips my tests. Could you please provide some
>> > guidance?
>> 
>> All test are skipped because of the "depends on
>> BR2_PACKAGE_HOST_PYTHON3" not being set by default.
>> 
>> I'm not sure is this "depends on" is really needed, as I expect it
>> to be a build dependency. If it's the case, the dependency is only
>> needed in the .mk file. I let the reviewers comment the v2 patch
>> on that topic...
>> 
>> Anyways, for the moment, this can be managed by manually creating a
>> config setting this for test-pkg. For example:
>> 
>>     cat > criu.config <<EOF
>>     BR2_PACKAGE_HOST_PYTHON3=y
>>     BR2_PACKAGE_CRIU=y
>>     EOF
>> 
>> Then, test-pkg will no longer skip the tests. On my side, I now see:
>> 
>>     utils/test-pkg -c criu.config -p criu
>>                     bootlin-armv5-uclibc [1/6]: FAILED
>>                      bootlin-armv7-glibc [2/6]: FAILED
>>                    bootlin-armv7m-uclibc [3/6]: SKIPPED
>>                      bootlin-x86-64-musl [4/6]: OK
>>                       br-arm-full-static [5/6]: SKIPPED
>>                             sourcery-arm [6/6]: FAILED
>>     6 builds, 2 skipped, 3 build failed, 0 legal-info failed, 0 
>> show-info
>> failed
>> 
>> I let you inspect the build log files ~/br-test-pkg/*/logfile for
>> the details.
> 
> 
> The error seems to be related to host-libzlib rather than criu :-/
> 
> 
> make[1]: Leaving directory 
> '/home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/build/host-libzlib-1.3'
> ***
> *** ERROR: package host-libzlib installs executables without proper 
> RPATH:
> ***   
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/host/bin/xmlwf
> ***   
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/host/bin/pkgconf
> ***   
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/host/bin/protoc
> ***   
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/host/bin/protoc-gen-c
> ***   
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/host/bin/python3.11
> ***   
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/host/bin/openssl
> make: *** [package/pkg-generic.mk:305: 
> /home/marcus/mnt/encwork/git/br-test-pkg/bootlin-armv5-uclibc/build/host-libzlib-1.3/.stamp_host_installed] 
> Error 1

For information, on my side, I see the criu package build failing
for various reasons.

For example, toolchain bootlin-armv5-uclibc is failing with:

compel/arch/arm/src/lib/infect.c: In function 
‘compel_set_task_ext_regs’:
compel/arch/arm/src/lib/infect.c:107:20: error: ‘PTRACE_SETVFPREGS’ 
undeclared (first use in this function); did you mean 
‘PTRACE_SETFPREGS’?
   107 |         if (ptrace(PTRACE_SETVFPREGS, pid, NULL, ext_regs)) {
       |                    ^~~~~~~~~~~~~~~~~
       |                    PTRACE_SETFPREGS

Toolchain bootlin-armv7-glibc failing with:

/br-test-pkg/bootlin-armv7-glibc/host/bin/arm-linux-ld: 
./compel/plugins/std.lib.a(log.o): in function `std_vprint_num':
log.c:(.text+0x2c0): undefined reference to `__aeabi_idivmod'
/br-test-pkg/bootlin-armv7-glibc/host/bin/arm-linux-ld: 
./compel/plugins/std.lib.a(log.o): in function `sbuf_printf':
log.c:(.text+0x41c): undefined reference to `__aeabi_idivmod'
/br-test-pkg/bootlin-armv7-glibc/host/bin/arm-linux-ld: 
./compel/plugins/std.lib.a(string.o): in function `std_vdprintf':
string.c:(.text+0x114): undefined reference to `__aeabi_idivmod'

There is possibly others.  I'll try to investigate how to resolve those 
issues.

>> With this v2, I am now able to build criu on some x86_64 and Aarch64
>> configurations, so I can start writing a runtime test ;)
> 
> Yeay!

I have now a fully working test on Aarch64. I'll send it when criu
will be merged.

Best regards,

Julien.



More information about the buildroot mailing list