From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Vincent Fazio <vfazio@xes-inc.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null
Date: Wed, 2 Nov 2022 22:53:55 +0100 [thread overview]
Message-ID: <20221102215355.GB3918838@scaer> (raw)
In-Reply-To: <20221101234138.66423cf3@windsurf>
Thomas, Vincent, All,
On 2022-11-01 23:41 +0100, Thomas Petazzoni via buildroot spake thusly:
> Hello Vincent,
>
> On Fri, 7 Oct 2022 18:50:02 -0500
> Vincent Fazio <vfazio@xes-inc.com> wrote:
>
> > When busybox.mk gets read, pkg-conf gets executed to determine the
> > location of relevant libraries.
> >
> > When Busybox is built with per-package directories enabled, a number of
> > errors related to executing pkg-conf occur because directories have not
> > been synced to provide pkg-confg at the point when it executes.
>
> I don't get this. If pkg-config is executed before the per-package
> directories are created... then how can pkg-config find libtirpc?
We did look at this together with Vincent back then.
The issue is that pkg-config is called as part of BUSYBOX_CFLAGS and
BUSYBOX_CFLAGS_busybox, which are part of BUSYBOX_MAKE_ENV, which will
eventually be part of the environment when calling one of the kconfig
frontends, like 'config' (when applying the configuration), or
menuconfig et al.
At that time, only parts of the PPD have been gathered, and not the
parts needed to configure and build, so host-pkgconf is not rsynced to
the busybox PPD.
Then later on, when we do build, host-pkgconf is rsynced, so we do get
the libtirpc CFLAGs and LDFLAGS, and the build does succeed.
It is quite difficult to follow all the trails. Idealy, we'd want to
provide a proper rsynced PPD for configurators, maybe, but in this case,
it is superfluous, and finding the right spot was... not trivial.
So, with Vincent, we concluded that:
- the error messages are benign
- but hey are confusing
- the simplest solution to get rid of them is to silence the call to
pkg-config
[--SNIP--]
> and I couldn't see the errors (but perhaps I missed them). Could you
> provide an example configuration, the details of the error, and a
> rationale as to why not finding libtirpc is not a problem when we in
> fact expect to find it?
BR2_x86_i686=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_UCLIBC_BLEEDING_EDGE=y
BR2_PACKAGE_LIBTIRPC=y
$ make clean
$ make busybox-menuconfig
>>> busybox 1.35.0 Patching
[...]
Applying 0005-nslookup-sanitize-all-printed-strings-with-printable.patch using patch:
patching file networking/nslookup.c
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
Using /home/ymorin/dev/buildroot/O/master/build/busybox-1.35.0/.config as base
#
# merged configuration written to
# /home/ymorin/dev/buildroot/O/master/build/busybox-1.35.0/.config
# (needs make)
#
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
[...]
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 "`/home/ymorin/dev/buildroot/O/master/host/bin/pkg-config --cflags libtirpc`""
CFLAGS_busybox=""`/home/ymorin/dev/buildroot/O/master/host/bin/pkg-config --libs libtirpc`""
PKG_CONFIG_PATH="" /usr/bin/make
-j9 -C /home/ymorin/dev/buildroot/O/master/build/busybox-1.35.0
HOSTCC="/usr/bin/gcc"
AR="/home/ymorin/dev/buildroot/O/master/host/bin/i686-linux-gcc-ar"
NM="/home/ymorin/dev/buildroot/O/master/host/bin/i686-linux-gcc-nm"
RANLIB="/home/ymorin/dev/buildroot/O/master/host/bin/i686-linux-gcc-ranlib"
CC="/home/ymorin/dev/buildroot/O/master/host/bin/i686-linux-gcc"
ARCH=i386
PREFIX="/home/ymorin/dev/buildroot/O/master/target"
EXTRA_LDFLAGS=""
CROSS_COMPILE="/home/ymorin/dev/buildroot/O/master/host/bin/i686-linux-"
CONFIG_PREFIX="/home/ymorin/dev/buildroot/O/master/target"
SKIP_STRIP=y
menuconfig
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
/bin/sh: /home/ymorin/dev/buildroot/O/master/host/bin/pkg-config: No such file or directory
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/lxdialog.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/msgbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTLD scripts/kconfig/lxdialog/lxdialog
scripts/kconfig/mconf Config.in
And then again further one...
BTW, notice how CFLAGS are incorrectly quoted:
CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 "`/home/ymorin/dev/buildroot/O/master/host/bin/pkg-config --cflags libtirpc`""
^---------------------------------------------------------------------------^
That's because of:
20: BUSYBOX_CFLAGS = $(TARGET_CFLAGS)
82: BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
which are then passed as:
91: CFLAGS="$(BUSYBOX_CFLAGS)"
Vincent, could you come to fix that? ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-11-02 21:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 23:50 [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Vincent Fazio
2022-10-07 23:50 ` [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null Vincent Fazio
2022-11-01 22:41 ` Thomas Petazzoni via buildroot
2022-11-02 12:43 ` [Buildroot] [External] - " Vincent Fazio
2022-11-02 21:53 ` Yann E. MORIN [this message]
2022-11-02 22:11 ` [Buildroot] " Thomas Petazzoni via buildroot
2022-11-01 22:40 ` [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Thomas Petazzoni via buildroot
2022-11-02 22:00 ` Yann E. MORIN
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=20221102215355.GB3918838@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vfazio@xes-inc.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