package/criu: new package
PATCH 1/2 package/criu: new package
Checkpoint/Restore In Userspace (CRIU), is a software tool for the Linux operating system to make it possible to freeze a running application and checkpoint it to persistent storage as a collection of files.
--- package/Config.in | 1 + package/criu/Config.in | 28 ++++++++++++++++++++++++++++ package/criu/criu.hash | 3 +++ package/criu/criu.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 package/criu/Config.in create mode 100644 package/criu/criu.hash create mode 100644 package/criu/criu.mk
package/Config.in +1 -0
@@ -2665,6 +2665,7 @@ menu "System tools" source "package/coreutils/Config.in" source "package/cpulimit/Config.in" source "package/cpuload/Config.in" + source "package/criu/Config.in" source "package/crun/Config.in" source "package/daemon/Config.in" source "package/dc3dd/Config.in"
package/criu/Config.in new file +28 -0
@@ -0,0 +1,28 @@ +menuconfig BR2_PACKAGE_CRIU + bool "criu" + 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 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf + depends on !BR2_TOOLCHAIN_USES_MUSL + depends on !BR2_STATIC_LIBS # protobuf, libbsd + depends on BR2_USE_WCHAR #libbsd + depends on BR2_USE_MMU #libcap + select BR2_PACKAGE_HOST_PYTHON3_SSL + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_PROTOBUF_C + select BR2_PACKAGE_LIBAIO + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_LIBNET + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_PIP + help + Checkpoint/Restore In Userspace (CRIU), is a software tool for the Linux operating system to make it possible to freeze a running + application and checkpoint it to persistent storage as a collection of files. + +comment "criu needs a uClibc or glibc toolchain w/ threads, dynamic library, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_USE_WCHAR || BR2_TOOLCHAIN_USES_MUSL
package/criu/criu.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 6a9997981c9fe4730c848ce59346b3a22fad69b803607cb67a3f6ec0557fa474 criu-3.18.tar.gz +sha256 568a1fa9d90e18a1a1a61ea58ec2eece16b56a5042cc72c1b4f8d4455ae6fcb7 COPYING
package/criu/criu.mk new file +42 -0
42 lines not on this page · raw message
Signature · 6 lines
2.41.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 DEVELOPERS: add Marcus Folkesson for package/criu
--- DEVELOPERS | 1 + 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
@@ -2050,6 +2050,7 @@ F: support/testing/tests/package/test_python_pytest.py F: support/testing/tests/package/test_python_pytest_asyncio.py N: Marcus Folkesson <[email protected]> +F: package/criu/ F: package/libcamera/ F: package/libcamera-apps/ F: package/libostree/
Signature · 6 lines
2.41.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] DEVELOPERS: add Marcus Folkesson for package/criu
Hello Marcus,
Quoted 1 line · On Fri, 8 Sep 2023 10:27:41 +0200 Marcus Folkesson…
Signed-off-by Marcus Folkesson <[email protected]>
This should be within the patch adding the package itself.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Marcus,
Thanks for your contribution! See some suggestions below.
Quoted 2 lines · On Fri, 8 Sep 2023 10:27:40 +0200 Marcus Folkesson…
Checkpoint/Restore In Userspace (CRIU), is a software tool for the Linux operating system to make it possible to freeze a running application and checkpoint it to persistent storage as a collection of files.
Commit log should be wrapped to ~80 columns.
Quoted 8 lines
Signed-off-by Marcus Folkesson <[email protected]>--- package/Config.in | 1 + package/criu/Config.in | 28 ++++++++++++++++++++++++++++ package/criu/criu.hash | 3 +++ package/criu/criu.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+)
An entry in the DEVELOPERS file should be added in this commit (not as a separate patch).
Quoted 6 lines
package/criu/Config.in new file +0
-0
package/criu/Config.in line 8
Quoted 8 lines
package/criu/Config.in new file +8
-0@@ -0,0 +1,28 @@ +menuconfig BR2_PACKAGE_CRIU + bool "criu" + 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 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf + depends on !BR2_TOOLCHAIN_USES_MUSL
Where does this dependency come from?
package/criu/Config.in line 11
Quoted 3 lines
package/criu/Config.in new file +3
-0+ depends on !BR2_STATIC_LIBS # protobuf, libbsd + depends on BR2_USE_WCHAR #libbsd + depends on BR2_USE_MMU #libcap
Spaces after # sign.
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
is missing.
package/criu/Config.in line 21
Quoted 10 lines
package/criu/Config.in new file +10
-0+ select BR2_PACKAGE_HOST_PYTHON3_SSL + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_PROTOBUF_C + select BR2_PACKAGE_LIBAIO + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_LIBNET + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_PIP
It needs pip on the target? Seems odd.
package/criu/Config.in line 24
Quoted 3 lines
package/criu/Config.in new file +3
-0+ help + Checkpoint/Restore In Userspace (CRIU), is a software tool for the Linux operating system to make it possible to freeze a running + application and checkpoint it to persistent storage as a collection of files.
This needs to be wrapped to the proper length. Run "make check-package" to get the details.
Also we need the help text to end with a blank line, followed by the URL of the upstream project.
Quoted 9 lines
package/criu/criu.mk new file +3
-0@@ -0,0 +1,42 @@ +################################################################################ +# +# CRIU
package/criu/criu.mk line 13
Quoted 10 lines
package/criu/criu.mk new file +10
-0+# +################################################################################ + +CRIU_VERSION = 3.18 +CRIU_SOURCE = criu-$(CRIU_VERSION).tar.gz +CRIU_SITE = https://github.com/checkpoint-restore/criu/archive/refs/tags/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
You can split this long line:
CRIU_DEPENDENCIES = \ foo \ bar \ baz
package/criu/criu.mk line 16
Quoted 3 lines
package/criu/criu.mk new file +3
-0+ +CRIU_CFLAGS = $(TARGET_CFLAGS) +CRIU_CFLAGS += -D__WORDSIZE -D__USE_GNU -D_GNU_SOURCE
Can be:
CRIU_CFLAGS = \ $(TARGET_CFLAGS) \ -D__WORDSIZE \ -D...
However, this is odd. Why aren't those flags set by the package Makefile?
package/criu/criu.mk line 19
Quoted 3 lines
package/criu/criu.mk new file +3
-0+ +CRIU_MAKE_ENV = $(TARGET_MAKE_ENV) +CRIU_MAKE_ENV += WERROR=0
CRIU_MAKE_ENV = \ $(TARGET_MAKE_ENV) \ WERROR=0
package/criu/criu.mk line 23
Quoted 4 lines
package/criu/criu.mk new file +4
-0+ +#Needed as it adds strange paths to the tool otherwise. E.g. $CROSS_COMPILE/usr/bin/gcc +CRIU_MAKE_ENV += HOSTLD=ld +CRIU_MAKE_ENV += HOSTCC=gcc
Meh. Not sure to understand here. Maybe you want to pass $(TARGET_CONFIGURE_OPTS), which does include HOSTCC, HOSTLD, and more.
package/criu/criu.mk line 27
Quoted 4 lines
package/criu/criu.mk new file +4
-0+ +#x86_64 is treated as x86 in criu +ifeq ($(BR2_ARCH),x86_64) + CRIU_MAKE_ENV += ARCH=x86
Don't indent this line.
package/criu/criu.mk line 29
Quoted 2 lines
package/criu/criu.mk new file +2
-0+else + CRIU_MAKE_ENV += ARCH=$(BR2_ARCH)
Ditto.
In the Makefile:
ifneq ($(filter-out x86 arm aarch64 ppc64 s390 mips loongarch64,$(ARCH)),)
$(error "The architecture $(ARCH) isn't supported")
endif
So you need a BR2_PACKAGE_CRIU_ARCH_SUPPORTS option that lists those architectures only.
package/criu/criu.mk line 34
Quoted 5 lines
package/criu/criu.mk new file +5
-0+endif + +define CRIU_BUILD_CMDS + rm -rf $(@D)/images/google/protobuf/descriptor.proto + ln -s $(STAGING_DIR)/usr/include/google/protobuf/descriptor.proto $(@D)/images/google/protobuf/descriptor.proto
Please indent those lines with one tab.
package/criu/criu.mk line 35
Quoted 1 line
package/criu/criu.mk new file +1
-0+ $(CRIU_MAKE_ENV) $(MAKE) USERCFLAGS="$(CRIU_CFLAGS)" -C $(@D)
I don't understand how this can know which cross-compiler to use, you are not passing it anywhere as far as I can see.
Could you have a look at addressing those comments and sending an updated version?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Thank you for your solid review.
Apparently I haven't done my homework very well. Sorry for that.
Quoted 7 lines · Thomas Petazzoni
Hello Marcus,
Thanks for your contribution! See some suggestions below.
On Fri, 8 Sep 2023 10:27:40 +0200
Marcus Folkesson <[email protected]> wrote:
[...]
Quoted 9 lines
package/criu/Config.in line 8
Quoted 7 lines
package/criu/Config.in new file +7
-0+ bool "criu" + 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 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf + depends on !BR2_TOOLCHAIN_USES_MUSLWhere does this dependency come from?
I'm pretty sure that I read that CRIU does not compile with musl somewhere, but it seems like it does when I had a closer look. I will remove it.
[...]
Quoted 13 lines
package/criu/Config.in line 21
Quoted 11 lines
package/criu/Config.in new file +10
-0+ select BR2_PACKAGE_HOST_PYTHON3_SSL + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_PROTOBUF_C + select BR2_PACKAGE_LIBAIO + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_LIBNET + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_PIPIt needs pip on the target? Seems odd.
What I actually need is host-python-pip as it is used during the installation step. Is there a way to only select the host-part from the PYTHON_PIP package?
Quoted 7 lines
package/criu/Config.in line 24
Quoted 4 lines
package/criu/Config.in new file +3
-0+ help + Checkpoint/Restore In Userspace (CRIU), is a software tool for the Linux operating system to make it possible to freeze a running + application and checkpoint it to persistent storage as a collection of files.This needs to be wrapped to the proper length. Run "make check-package" to get the details.
Thank you.
[...]
Quoted 6 lines
package/criu/criu.mk line 16
Quoted 3 lines
package/criu/criu.mk new file +3
-0+ +CRIU_CFLAGS = $(TARGET_CFLAGS) +CRIU_CFLAGS += -D__WORDSIZE -D__USE_GNU -D_GNU_SOURCECan be:
Quoted 7 lines
CRIU_CFLAGS = \ $(TARGET_CFLAGS) \ -D__WORDSIZE \ -D...However, this is odd. Why aren't those flags set by the package
Makefile?
I actually took those flags from the yocto recipe [1], but at least _GNU_SOURCE seems to be in the package Makefile anyway.
I will remove __USE_GNU and _GNU-SOURCE.
Do not know about __WORDSIZE though.
[...]
Quoted 7 lines
package/criu/criu.mk line 23
Quoted 4 lines
package/criu/criu.mk new file +4
-0+ +#Needed as it adds strange paths to the tool otherwise. E.g. $CROSS_COMPILE/usr/bin/gcc +CRIU_MAKE_ENV += HOSTLD=ld +CRIU_MAKE_ENV += HOSTCC=gccMeh. Not sure to understand here. Maybe you want to pass $(TARGET_CONFIGURE_OPTS), which does include HOSTCC, HOSTLD, and more.
Sounds better.
[...]
Quoted 11 lines
Ditto.
In the
Makefile:ifneq ($(filter-out x86 arm aarch64 ppc64 s390 mips loongarch64,$(ARCH)),)
$(error "The architecture $(ARCH) isn't supported")endif
So you need a
BR2_PACKAGE_CRIU_ARCH_SUPPORTSoption that lists those architectures only.
Will do.
[...]
Quoted 9 lines
package/criu/criu.mk line 34
Quoted 6 lines
package/criu/criu.mk new file +5
-0+endif + +define CRIU_BUILD_CMDS + rm -rf $(@D)/images/google/protobuf/descriptor.proto + ln -s $(STAGING_DIR)/usr/include/google/protobuf/descriptor.proto $(@D)/images/google/protobuf/descriptor.protoPlease indent those lines with one tab.
Quoted 4 lines
package/criu/criu.mk line 35
Quoted 1 line
package/criu/criu.mk new file +1
-0+ $(CRIU_MAKE_ENV) $(MAKE) USERCFLAGS="$(CRIU_CFLAGS)" -C $(@D)I don't understand how this can know which cross-compiler to use, you are not passing it anywhere as far as I can see.
Hrm, I had CROSS_COMPILE=$(TARGET_CROSS) at first, then I though I saw that $(TARGET_MAKE_ENV) had it set.
Unfortunately, my last test was was on x86_64, so I did not notice it was wrong.
I will put it back.
Quoted 11 lines
Could you have a look at addressing those comments and sending an updated version?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com
[1] https://git.yoctoproject.org/meta-virtualization/tree/recipes-containers/criu/criu_git.bb
Thanks,
Marcus
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
Apparently I haven't done my homework very well. Sorry for that.
Ah, ah, no worries!
Quoted 5 lines
Quoted 1 line
Where does this dependency come from?
I'm pretty sure that I read that CRIU does not compile with musl somewhere, but it seems like it does when I had a closer look. I will remove it.
Good.
Quoted 7 lines
Quoted 3 lines
package/criu/Config.in line 21
Quoted 1 line
package/criu/Config.in new file +1
-0+ select BR2_PACKAGE_PYTHON_PIPIt needs pip on the target? Seems odd.
What I actually need is host-python-pip as it is used during the installation step. Is there a way to only select the host-part from the
PYTHON_PIPpackage?
For most packages, selecting them is useless, and actually most host packages don't even have a Config.in.host option to select in the first place. So having host-python-pip in your CRIU_DEPENDENCIES variable is enough.
However, a package that needs pip during its build process kind of raises a red flag. Is that package using pip to download/install additional Python packages during its build procedure? If it's the case, that's not good, as this downloading of extra stuff by the package would work around the download logic and legal-info logic of Buildroot.
Quoted 5 lines
Quoted 5 lines
CRIU_CFLAGS = \ $(TARGET_CFLAGS) \ -D__WORDSIZE \ -D...
Quoted 8 lines
Quoted 2 lines
However, this is odd. Why aren't those flags set by the package
Makefile?I actually took those flags from the yocto recipe [1], but at least
_GNU_SOURCEseems to be in the packageMakefileanyway.I will remove
__USE_GNUand _GNU-SOURCE.
Do not know about__WORDSIZEthough.
But what do you have it here, then?
Quoted 7 lines
Quoted 4 lines
package/criu/criu.mk line 35
Quoted 1 line
package/criu/criu.mk new file +1
-0+ $(CRIU_MAKE_ENV) $(MAKE) USERCFLAGS="$(CRIU_CFLAGS)" -C $(@D)I don't understand how this can know which cross-compiler to use, you are not passing it anywhere as far as I can see.
Hrm, I had CROSS_COMPILE=$(TARGET_CROSS) at first, then I though I saw that $(TARGET_MAKE_ENV) had it set.
TARGET_MAKE_ENV does not contain CROSS_COMPILE. TARGET_CONFIGURE_OPTS does, however.
Quoted 4 lines
Unfortunately, my last test was was on
x86_64, so I did not notice it was wrong.I will put it back.
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.
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas, Marcus,
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
[...]
Quoted 3 lines
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.
I should be able to easily write a runtime test once the package will be merged. I happen to be a criu user. I will probably do a test inspired from: https://criu.org/Simple_loop#Simplest_case
While looking at it, I was not able to build criu for arm or aarch64, on branch master at commit 177170f. As Marcus said, it was apparently tested only on x8_64.
It seems there issues with CFLAGS and libraries. Possibly mixups with host files. It's probably linked with the TARGET_MAKE_ENV and TARGET_CONFIGURE_OPTS mixups.
I got error messages like:
soccr/soccr.c:2:10: fatal error: libnet.h: No such file or directory
2 | #include <libnet.h>
| ^~~~~~~~~~
...
compel/arch/aarch64/plugins/std/parasite-head.S: Assembler messages:
compel/arch/aarch64/plugins/std/parasite-head.S:4: Error: unrecognized symbol type ""
compel/arch/aarch64/plugins/std/parasite-head.S:5: Error: no such
instruction: `bl parasite_service'
compel/arch/aarch64/plugins/std/parasite-head.S:6: Error: no such
instruction: `brk '
...
In file included from /usr/include/signal.h:301,
fromcompel/include/uapi/compel/plugins/std/syscall-types.h:12,
fromcompel/include/uapi/compel/plugins/std/syscall.h:4,
from compel/include/uapi/compel/plugins/std.h:5, from compel/plugins/std/infect.c:1:
/usr/include/bits/sigcontext.h:31:8: note: originally defined here
31 | struct _fpx_sw_bytes
| ^~~~~~~~~~~~~
...
In file included from images/creds.pb-c.c:9:
images/creds.pb-c.h:7:10: fatal error: protobuf-c/protobuf-c.h: No
such file or directory
7 | #include <protobuf-c/protobuf-c.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Marcus, you should be able to reproduce that with the command:
utils/test-pkg -p criu
Ideally, the package should have no failure (i.e. only OK or SKIPPED) when testing all toolchains, with:
utils/test-pkg -a -p criu
Then, you should be able to see the end of build logs with:
tail ~/br-test-pkg/*/logfile
For the details, see:
https://nightly.buildroot.org/manual.html#testing-package
Best regards,
Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Julien,
Quoted 10 lines · Julien Olivain
Hi Thomas, Marcus,
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
[...]
Quoted 8 lines
Quoted 3 lines
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?
Quoted 8 lines
Ideally, the package should have no failure (i.e. only OK or SKIPPED) when testing all toolchains, with:
utils/test-pkg -a -p criu
Then, you should be able to see the end of build logs with:
Quoted 8 lines
tail ~/br-test-pkg/*/logfile
For the details, see:
https://nightly.buildroot.org/manual.html#testing-packageBest regards,
Julien.
Best regards
Marcus Folkesson
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Marcus,
Quoted 20 lines · Marcus Folkesson
Hi Julien,
Quoted 17 lines · Julien Olivain
Hi Thomas, Marcus,
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
[...]
Quoted 3 lines
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:
Quoted 7 lines
Quoted 1 line
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.
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 ;)
Quoted 4 lines
Quoted 4 lines
Ideally, the package should have no failure (i.e. only OK or SKIPPED) when testing all toolchains, with:
utils/test-pkg -a -p criu
Then, once the test-pkg (without "-a") will have no failure, it will be a good test to retry it _with_ the "-a" option:
utils/test-pkg -c criu.config -p criu
Quoted 2 lines
Quoted 2 lines
For the details, see:
https://nightly.buildroot.org/manual.html#testing-package
Thanks again!
Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Julien,
Quoted 57 lines · Julien Olivain
Hi Marcus,
Quoted 20 lines · Marcus Folkesson
Hi Julien,
Quoted 17 lines · Julien Olivain
Hi Thomas, Marcus,
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
[...]
Quoted 3 lines
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:
Quoted 7 lines
Quoted 1 line
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
EOFThen, 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
Quoted 4 lines
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
Quoted 3 lines
With this v2, I am now able to build criu on some
x86_64and Aarch64 configurations, so I can start writing a runtime test ;)
Yeay!
Quoted 3 lines
Thanks again!
Julien.
/Marcus
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines · On Tue, 12 Sep 2023 14:53:37 +0200 Marcus Folkesson…
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
This seems pretty broken as none of these files are installed by host-libzlib...
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Marcus,
Quoted 74 lines · Marcus Folkesson
Hi Julien,
Quoted 57 lines · Julien Olivain
Hi Marcus,
Quoted 20 lines · Marcus Folkesson
Hi Julien,
Quoted 17 lines · Julien Olivain
Hi Thomas, Marcus,
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
[...]
Quoted 3 lines
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:
Quoted 7 lines
Quoted 1 line
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
EOFThen, 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, 0Quoted 5 lines
show-info
failedI 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:
Quoted 7 lines
*** /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/opensslmake: *** [
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_SETFPREGSToolchain 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.
Quoted 4 lines
Quoted 2 lines
With this v2, I am now able to build criu on some
x86_64and 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.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Julien,
Quoted 90 lines · Julien Olivain
Hi Marcus,
Quoted 75 lines · Marcus Folkesson
Hi Julien,
Quoted 57 lines · Julien Olivain
Hi Marcus,
Quoted 20 lines · Marcus Folkesson
Hi Julien,
Quoted 17 lines · Julien Olivain
Hi Thomas, Marcus,
Quoted 4 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 9 Sep 2023 15:03:13 +0200 Marcus Folkesson…
Thank you for your solid review.
[...]
Quoted 3 lines
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:
Quoted 7 lines
Quoted 1 line
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
EOFThen, 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, 0Quoted 5 lines
show-info
failedI 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:Quoted 8 lines
*** /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/opensslmake: *** [
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 1For information, on my side, I see the criu package build failing for various reasons.
Quoted 8 lines
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
I've replaced
config BR2_PACKAGE_CRIU_ARCH_SUPPORTS
bool default y if BR2_arm ...
With:
config BR2_PACKAGE_CRIU_ARCH_SUPPORTS
bool
default y if BR2_ARM_CPU_ARMV6
default y if BR2_ARM_CPU_ARMV7A
default y if BR2_ARM_CPU_ARMV7M
default y if BR2_ARM_CPU_ARMV8A
default y if BR2_ARM_CPU_ARMV8M
Due to this comment from the yocto recipe:
#
# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
# if the ARCH is ARMv7 or ARMv6. #
So the toolchain bootlin-armv5-uclibc will be skipped.
Quoted 19 lines
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.
Quoted 3 lines
Quoted 2 lines
With this v2, I am now able to build criu on some
x86_64and Aarch64 configurations, so I can start writing a runtime test ;)
Quoted 8 lines
Quoted 1 line
Yeay!
I have now a fully working test on Aarch64. I'll send it when criu will be merged.
Best regards,
Julien.
/Marcus
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot