From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Romain Naour <romain.naour@gmail.com>,
Herve Codina <herve.codina@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/pkg-utils.mk: fix per-package build with ncurses
Date: Sun, 29 Aug 2021 21:37:48 +0200 [thread overview]
Message-ID: <20210829193748.GD1053080@scaer> (raw)
In-Reply-To: <20210829183932.1737738-1-fontaine.fabrice@gmail.com>
Fabrice, All,
+Hervé, +Thomas, +Arnout, +Romain
Thanks for this patch, that is a very good example of a very tricky
problem we've been stumbling upon since we started doing top-level
parallel builds...
On 2021-08-29 20:39 +0200, Fabrice Fontaine spake thusly:
> Fix per-package build with ncurses and toolchains providing ncurses.h by
> adding --update parameter to rsync call. Indeed, without this parameter,
> the curses.h file installed by ncurses (with wchar support) could be
> overriden by a curses.h file provided by the toolchain (without wchar
> support) resulting in the following build failure on bmon or rtorrent:
>
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/host-pkgconf/host/ /tmp/instance-0/output-1/per-package/host-pkgconf/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/host-skeleton/host/ /tmp/instance-0/output-1/per-package/host-skeleton/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/libcurl/host/ /tmp/instance-0/output-1/per-package/libcurl/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/libtorrent/host/ /tmp/instance-0/output-1/per-package/libtorrent/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/ncurses/host/ /tmp/instance-0/output-1/per-package/ncurses/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/skeleton/host/ /tmp/instance-0/output-1/per-package/skeleton/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
> rsync -a --link-dest=/tmp/instance-0/output-1/per-package/toolchain/host/ /tmp/instance-0/output-1/per-package/toolchain/host/ /tmp/instance-0/output-1/per-package/rtorrent/host
So, if we had had file overwrite detection in place (which I have been
reviewing and testing this WE), the build would have failed earlier, at
the end of the install step of ncurses, with:
/home/ymorin/dev/buildroot/O/per-package/ncurses/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/ncurses.pc: FAILED
/home/ymorin/dev/buildroot/O/per-package/ncurses/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/menu.pc: FAILED
/home/ymorin/dev/buildroot/O/per-package/ncurses/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/form.pc: FAILED
/home/ymorin/dev/buildroot/O/per-package/ncurses/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/panel.pc: FAILED
/home/ymorin/dev/buildroot/O/per-package/ncurses/host/riscv64-buildroot-linux-gnu/sysroot/usr/include/curses.h: FAILED
/home/ymorin/dev/buildroot/O/per-package/ncurses/host/riscv64-buildroot-linux-gnu/sysroot/usr/include/term.h: FAILED
md5sum: WARNING: 6 computed checksums did NOT match
ERROR: package ncurses has overwritten files installed by a previous package, aborting.
make[1]: *** [package/pkg-generic.mk:467: /home/ymorin/dev/buildroot/O/build/ncurses-6.1/.stamp_installed] Error 1
make: *** [Makefile:23: _all] Error 2
> [...]
>
> checking for NcursesW wide-character library... yes
> checking for working ncursesw/curses.h... no
> checking for working ncursesw.h... no
> checking for working ncurses.h... no
> configure: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h
>
> Fixes:
> - http://autobuild.buildroot.org/results/8c0d13e3cc3ddd2a21f99477cad4e39522e9deec
> - http://autobuild.buildroot.org/results/d2f18ccad6a0330d78e97d70c810ac89b84d2261
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/pkg-utils.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index ae3c7f9da9..5af34d4ee0 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -184,7 +184,7 @@ ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> define per-package-rsync
> mkdir -p $(3)
> $(foreach pkg,$(1),\
> - rsync -a --link-dest=$(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \
> + rsync -au --link-dest=$(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \
Sorry, this is not the correct solution. Indeed, we can not accept that
a package overwrites a file provided by another package. See the
explanations Thomas and I discussed earlier today:
https://lore.kernel.org/buildroot/20210829133955.74d921e9@windsurf/
https://lore.kernel.org/buildroot/20210829164031.GB1053080@scaer/
This case is however very special, and I have no idea (yet) on what the
best solution is. I guess the curses headers in the toolchain are due to
the presence of gdb with TUI support...
I would be tempted to say "this toolchain is not pure, we can't use it",
and defer to the Bootlin toolchain builder project to fix their
toolchains, but this is probably a bit of shuffling the dust under the
rag...
So, any input and insight would be appreciated...
Regards,
Yann E. MORIN.
> $(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \
> $(3)$(sep))
> endef
> --
> 2.32.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-08-29 19:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-29 18:39 [Buildroot] [PATCH 1/1] package/pkg-utils.mk: fix per-package build with ncurses Fabrice Fontaine
2021-08-29 19:37 ` Yann E. MORIN [this message]
2021-08-30 9:20 ` Arnout Vandecappelle
2021-08-30 21:51 ` Thomas Petazzoni
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=20210829193748.GD1053080@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=herve.codina@bootlin.com \
--cc=romain.naour@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.