buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors
@ 2022-10-07 23:50 Vincent Fazio
  2022-10-07 23:50 ` [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null Vincent Fazio
  2022-11-01 22:40 ` [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 8+ messages in thread
From: Vincent Fazio @ 2022-10-07 23:50 UTC (permalink / raw)
  To: buildroot; +Cc: Vincent Fazio

As part of pkg-kconfig, the .config file gets regenerated after fixups.

When Busybox is built with per-package directories enabled, the
toolchain is not available for Busybox's makefile to determine compiler
capabilities so certain calls will fail and emit errors.

For now, assume the following are true:

Buildroot will not use GCC < 4
  Skip a call to cc-ifversion to avoid the following error

  /buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory

Target system is linux
  Skip a call to -dumpmachine to avoid the following error

  make[2]: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
 ...ags-assume-GCC-4-and-target-is-linux.patch | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch

diff --git a/package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch b/package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch
new file mode 100644
index 0000000000..567d46704f
--- /dev/null
+++ b/package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch
@@ -0,0 +1,50 @@
+From d384e999e1dff473f2bf084c6a9b9730ad39b878 Mon Sep 17 00:00:00 2001
+From: Vincent Fazio <vfazio@xes-inc.com>
+Date: Thu, 6 Oct 2022 13:16:34 -0500
+Subject: [PATCH] Makefile.flags: assume GCC >= 4 and target is linux
+
+As part of pkg-kconfig, the .config file gets regenerated after fixups.
+
+When Busybox is built with per-package directories enabled, the
+toolchain is not available for Busybox's makefile to determine compiler
+capabilities so certain calls will fail and emit errors.
+
+For now, assume the following are true:
+
+Buildroot will not use GCC < 4
+  Skip a call to cc-ifversion to avoid the following error
+
+  /buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory
+
+Target system is linux
+  Skip a call to -dumpmachine to avoid the following error
+
+  make[2]: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found
+
+Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
+
+diff --git a/Makefile.flags b/Makefile.flags
+index c34356230..274527954 100644
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -45,7 +45,7 @@ CFLAGS += $(call cc-option,-Werror,)
+ #CFLAGS += $(call cc-ifversion, -eq, 0404, -fno-strict-aliasing)
+ endif
+ # gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
+-CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
++CFLAGS += -Wold-style-definition
+ 
+ ifneq ($(CC),clang)
+ # "clang-9: warning: optimization flag '-finline-limit=0' is not supported
+@@ -184,7 +184,7 @@ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%
+ endif
+ 
+ ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
+-ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine)))
++ifneq (,$(findstring linux,linux))
+ LDLIBS += resolv
+ endif
+ endif
+-- 
+2.25.1
+
-- 
2.25.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null
  2022-10-07 23:50 [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Vincent Fazio
@ 2022-10-07 23:50 ` Vincent Fazio
  2022-11-01 22:41   ` 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
  1 sibling, 1 reply; 8+ messages in thread
From: Vincent Fazio @ 2022-10-07 23:50 UTC (permalink / raw)
  To: buildroot; +Cc: Vincent Fazio

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.

These errors occur in stages prior configuring the package and are of
little consequence so redirect the errors to /dev/null.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
 package/busybox/busybox.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index ef628e90e9..0dec8d6d60 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -79,10 +79,10 @@ BUSYBOX_DEPENDENCIES = \
 # support for NFS mounting with BusyBox
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
 BUSYBOX_DEPENDENCIES += libtirpc host-pkgconf
-BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
+BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc 2>/dev/null`"
 # Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for
 # the non-final link of modules as well.
-BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
+BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc 2>/dev/null`"
 endif
 
 # Allows the build system to tweak CFLAGS
-- 
2.25.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors
  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:40 ` Thomas Petazzoni via buildroot
  2022-11-02 22:00   ` Yann E. MORIN
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-01 22:40 UTC (permalink / raw)
  To: Vincent Fazio; +Cc: Yann E. MORIN, buildroot

On Fri,  7 Oct 2022 18:50:01 -0500
Vincent Fazio <vfazio@xes-inc.com> wrote:

> As part of pkg-kconfig, the .config file gets regenerated after fixups.
> 
> When Busybox is built with per-package directories enabled, the
> toolchain is not available for Busybox's makefile to determine compiler
> capabilities so certain calls will fail and emit errors.
> 
> For now, assume the following are true:
> 
> Buildroot will not use GCC < 4
>   Skip a call to cc-ifversion to avoid the following error
> 
>   /buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory
> 
> Target system is linux
>   Skip a call to -dumpmachine to avoid the following error
> 
>   make[2]: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found
> 
> Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>

Hm, it's a bit annoying to patch Busybox for this, especially with a
patch that most likely cannot be accepted upstream because it's really
related to Buildroot details.

Do we have a better solution?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null
  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     ` [Buildroot] " Yann E. MORIN
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-01 22:41 UTC (permalink / raw)
  To: Vincent Fazio; +Cc: buildroot

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?

I just did a build of the following configuration:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LIBTIRPC=y
# BR2_TARGET_ROOTFS_TAR is not set

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?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [External] - Re: [PATCH 2/2] package/busybox: redirect errors to /dev/null
  2022-11-01 22:41   ` Thomas Petazzoni via buildroot
@ 2022-11-02 12:43     ` Vincent Fazio
  2022-11-02 21:53     ` [Buildroot] " Yann E. MORIN
  1 sibling, 0 replies; 8+ messages in thread
From: Vincent Fazio @ 2022-11-02 12:43 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Yann E . MORIN, buildroot

Hey Tom,


> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 1, 2022 5:42 PM
> To: Vincent Fazio <vfazio@xes-inc.com>
> Cc: buildroot@buildroot.org
> Subject: [External] - Re: [Buildroot] [PATCH 2/2] package/busybox: redirect
> errors to /dev/null
> 
> 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?
> 

pkg-config gets executed multiple times because the commands that get built up to generate the config file looks like so:

(yes "" | PATH="/mnt/development/buildroot/output/per-package/busybox/host/bin:/mnt/development/buildroot/output/per-package/busybox/host/sbin:/home/vfazio/.pyenv/plugins/pyenv-virtualenv/shims:/home/vfazio/.pyenv/shims:/home/vfazio/.pyenv/bin:/home/vfazio/.local/bin:/home/vfazio/.asdf/shims:/home/vfazio/.asdf/bin:/home/vfazio/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/vfazio/.xes-python-apps/bin" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1 "`/mnt/development/buildroot/output/per-package/busybox/host/bin/pkg-config --cflags libtirpc`"" CFLAGS_busybox="`/mnt/development/buildroot/output/per-package/busybox/host/bin/pkg-config --libs libtirpc`"" /usr/bin/remake -j7 -C /mnt/development/buildroot/output/build/busybox-1.35.0 HOSTCC="/usr/bin/gcc" AR="/mnt/development/buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc-ar" NM="/mnt/development/buildr
 oot/output/per-package/busybox/host/bin/x86_64-linux-gcc-nm" RANLIB="/mnt/development/buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc-ranlib" CC="/mnt/development/buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc" ARCH=x86_64 PREFIX="/mnt/development/buildroot/output/per-package/busybox/target" EXTRA_LDFLAGS="" CROSS_COMPILE="/mnt/development/buildroot/output/per-package/busybox/host/bin/x86_64-linux-" CONFIG_PREFIX="/mnt/development/buildroot/output/per-package/busybox/target" SKIP_STRIP=y oldconfig)

so they get executed prior to the directories being synced.

It works subsequently after sync because those paths are always reevaluated at runtime.

> I just did a build of the following configuration:
> 
> BR2_arm=y
> BR2_cortex_a9=y
> BR2_ARM_ENABLE_VFP=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_PER_PACKAGE_DIRECTORIES=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
> BR2_PACKAGE_LIBTIRPC=y
> # BR2_TARGET_ROOTFS_TAR is not set
> 
> 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?

My configure and build log:

https://pastebin.com/w8WAGE53

for the pkg-config issues you should see:

/bin/bash: /mnt/development/buildroot/output/per-package/busybox/host/bin/pkg-config: No such file or directory
/bin/bash: /mnt/development/buildroot/output/per-package/busybox/host/bin/pkg-config: No such file or directory
/bin/bash: /mnt/development/buildroot/output/per-package/busybox/host/bin/pkg-config: No such file or directory
/bin/bash: /mnt/development/buildroot/output/per-package/busybox/host/bin/pkg-config: No such file or directory

You'll also see other errors such as:

/mnt/development/buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /mnt/development/buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory
make[2]: /mnt/development/buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found

but those are covered by the previous patch

> 
> Thanks!
> 
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you recognize the sender and know the
> content is safe.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null
  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
  2022-11-02 22:11       ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2022-11-02 21:53 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Vincent Fazio, buildroot

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors
  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
  0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2022-11-02 22:00 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Vincent Fazio, buildroot

Thomas, All,

On 2022-11-01 23:40 +0100, Thomas Petazzoni via buildroot spake thusly:
> On Fri,  7 Oct 2022 18:50:01 -0500
> Vincent Fazio <vfazio@xes-inc.com> wrote:
> 
> > As part of pkg-kconfig, the .config file gets regenerated after fixups.
> > 
> > When Busybox is built with per-package directories enabled, the
> > toolchain is not available for Busybox's makefile to determine compiler
> > capabilities so certain calls will fail and emit errors.
> > 
> > For now, assume the following are true:
> > 
> > Buildroot will not use GCC < 4
> >   Skip a call to cc-ifversion to avoid the following error
> > 
> >   /buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory
> > 
> > Target system is linux
> >   Skip a call to -dumpmachine to avoid the following error
> > 
> >   make[2]: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found
> > 
> > Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
> 
> Hm, it's a bit annoying to patch Busybox for this, especially with a
> patch that most likely cannot be accepted upstream because it's really
> related to Buildroot details.
> 
> Do we have a better solution?

Yes: we should be relatively confident that we can convince busybox that
they wil never be built against a gcc < 4 nowadays, no?

scripts/gcc-version.sh is used to get the gcc version. This is in turn
used to test whether gcc >= 4.00, in which case -Wold-style-definition
is added to CFLAGS.

That is is only one case where this is needed. gcc 4.0.0 was release in
2005-04-20, 17+ years ago now. This is probably the oldest gcc version
one may reasnably expect to compile current code aganst. nowadays...

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null
  2022-11-02 21:53     ` [Buildroot] " Yann E. MORIN
@ 2022-11-02 22:11       ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-02 22:11 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Vincent Fazio, buildroot

On Wed, 2 Nov 2022 22:53:55 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> 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.

But perhaps we should not pass those CFLAGS during the "configurator"
step?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-02 22:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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     ` [Buildroot] " Yann E. MORIN
2022-11-02 22:11       ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).