From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/criu: new package
Date: Sat, 9 Sep 2023 15:03:13 +0200 [thread overview]
Message-ID: <ZPxtEfe6FVIucVWS@gmail.com> (raw)
In-Reply-To: <20230908225704.0aafa7eb@windsurf>
[-- Attachment #1.1: Type: text/plain, Size: 4097 bytes --]
Hi Thomas,
Thank you for your solid review.
Apparently I haven't done my homework very well. Sorry for that.
On Fri, Sep 08, 2023 at 10:57:04PM +0200, Thomas Petazzoni wrote:
> Hello Marcus,
>
> Thanks for your contribution! See some suggestions below.
>
> On Fri, 8 Sep 2023 10:27:40 +0200
> Marcus Folkesson <marcus.folkesson@gmail.com> wrote:
>
[...]
> > + 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?
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.
[...]
>
> > + 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.
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?
>
> > + 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.
[...]
> > +
> > +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?
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.
[...]
> > +
> > +#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.
Sounds better.
[...]
>
> 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.
Will do.
[...]
>
> > +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.
>
> > + $(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.
>
> Could you have a look at addressing those comments and sending an
> updated version?
>
> Thanks a lot!
>
> Thomas
> --
> 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
[-- 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
next prev parent reply other threads:[~2023-09-09 13:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 8:27 [Buildroot] [PATCH 1/2] package/criu: new package Marcus Folkesson
2023-09-08 8:27 ` [Buildroot] [PATCH 2/2] DEVELOPERS: add Marcus Folkesson for package/criu Marcus Folkesson
2023-09-08 20:46 ` Thomas Petazzoni via buildroot
2023-09-08 20:57 ` [Buildroot] [PATCH 1/2] package/criu: new package Thomas Petazzoni via buildroot
2023-09-09 13:03 ` Marcus Folkesson [this message]
2023-09-09 13:55 ` Thomas Petazzoni via buildroot
2023-09-09 21:16 ` Julien Olivain
2023-09-10 19:41 ` Marcus Folkesson
2023-09-10 21:05 ` Julien Olivain
2023-09-12 12:53 ` Marcus Folkesson
2023-09-12 13:17 ` Thomas Petazzoni via buildroot
2023-09-12 21:53 ` Julien Olivain
2023-09-13 5:56 ` Marcus Folkesson
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=ZPxtEfe6FVIucVWS@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=buildroot@buildroot.org \
--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