Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Julien Olivain <ju.o@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4] package/criu: new package
Date: Sat, 21 Oct 2023 18:27:00 +0200	[thread overview]
Message-ID: <ZTP71KY22hz0U3fT@gmail.com> (raw)
In-Reply-To: <7a3a5533d8fc664535be030d5d1242f1@free.fr>


[-- Attachment #1.1: Type: text/plain, Size: 3373 bytes --]

Hi again,

On Sat, Oct 21, 2023 at 01:15:10PM +0200, Julien Olivain wrote:
> Hi Marcus,
> 
> Thanks for the updated patch!
> 
> I confirm the normal test-pkg is passing. Then, I ran a "test-pkg -a"
> (which test more toolchains/arches) and observed few new minor
> failures. I'll comment a bit each failures and provide hints for
> improvements, when possible.
> 
>     cat >criu.config <<EOF
>     BR2_PACKAGE_HOST_PYTHON3=y
>     BR2_PACKAGE_CRIU=y
>     EOF
>     utils/test-pkg -a -c criu.config -p criu
>                      arm-aarch64 [ 1/45]: OK
>            bootlin-aarch64-glibc [ 2/45]: FAILED
> 
> criu uses restartable sequences, see:
> https://github.com/checkpoint-restore/criu/blob/v3.18/criu/include/linux/rseq.h#L7
> 
> Criu seems to have a header detection on "sys/rseq.h" (i.e. on the
> libc side). But the sys/rseq.h then includes linux/rseq.h (i.e. on the
> kernel side), which is not checked. Some configurations like
> bootlin-aarch64-glibc includes the glibc header, but also have older
> kernel. Restartable sequences were introduced in kernel >= 4.18. So
> this can be handled by adding a dependency on kernel.
> 
>        bootlin-arcle-hs38-uclibc [ 3/45]: SKIPPED
>             bootlin-armv5-uclibc [ 4/45]: SKIPPED
>              bootlin-armv7-glibc [ 5/45]: OK
>            bootlin-armv7m-uclibc [ 6/45]: SKIPPED
>               bootlin-armv7-musl [ 7/45]: OK
>         bootlin-m68k-5208-uclibc [ 8/45]: SKIPPED
>        bootlin-m68k-68040-uclibc [ 9/45]: SKIPPED
>      bootlin-microblazeel-uclibc [10/45]: SKIPPED
>         bootlin-mipsel32r6-glibc [11/45]: SKIPPED
>            bootlin-mipsel-uclibc [12/45]: SKIPPED
>              bootlin-nios2-glibc [13/45]: SKIPPED
>          bootlin-openrisc-uclibc [14/45]: SKIPPED
> bootlin-powerpc64le-power8-glibc [15/45]: SKIPPED
>    bootlin-powerpc-e500mc-uclibc [16/45]: SKIPPED
>            bootlin-riscv32-glibc [17/45]: SKIPPED
>            bootlin-riscv64-glibc [18/45]: SKIPPED
>             bootlin-riscv64-musl [19/45]: SKIPPED
>          bootlin-s390x-z13-glibc [20/45]: FAILED
> 
> Build fails with output:
> 
>     Makefile:23: *** "The architecture s390x isn't supported".  Stop.

Another problem that occured...
After I use $(BR2_NORMALIZED_ARCH) instead of $(BR2_ARCH), the arch
is at least supported. But it fails with

Error (compel/src/lib/handle-elf-host.c:161): Unsupported header detected
make[3]: *** [criu/pie/Makefile:58: criu/pie/parasite-blob.h] Error 255

After some more investigation, it ended up here:

static bool is_header_supported(Elf_Ehdr *hdr)
{
	if (!arch_is_machine_supported(hdr->e_machine))
		return false;
	if ((hdr->e_type != ET_REL
#ifdef NO_RELOCS
	     && hdr->e_type != ET_EXEC
#endif
	     ) ||
	    hdr->e_version != EV_CURRENT)
		return false;
	return true;
}

I've added debug trace to see why it fails and got this:
Error (compel/src/lib/handle-elf-host.c:155): 	type 0x100 machine 0x1600 version 0x1000000
Error (compel/src/lib/handle-elf-host.c:158): 	ET_REL 0x1 EM_s390 0x16, EV_CURRENT 0x1

It is a tool that runs on host (little endian), but read data of an elf
compiled for s390 (big endian), so bytes is read swapped.

Right now I thinking of not list s390 as a compatible architecture for
this package.

Do you think it is reasonable?


/Marcus

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-10-21 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20  6:02 [Buildroot] [PATCH v4] package/criu: new package Marcus Folkesson
2023-10-21 11:15 ` Julien Olivain
2023-10-21 15:25   ` Marcus Folkesson
2023-10-22 11:30     ` Julien Olivain
2023-10-22 11:37     ` Julien Olivain
2023-10-21 16:27   ` Marcus Folkesson [this message]
2023-10-22 11:46     ` Julien Olivain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTP71KY22hz0U3fT@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox