[Buildroot] [PATCH v6 4/4] pkg-cmake: make ninja the default for all packages

Yann E. MORIN yann.morin.1998 at free.fr
Sun Aug 6 20:54:47 UTC 2023


Thomas, All,

On 2023-08-06 16:19 +0200, Yann E. MORIN spake thusly:
> On 2023-08-02 13:14 +0200, Thomas Devoogdt spake thusly:
> > From: Thomas Devoogdt <thomas.devoogdt at barco.com>
> > Use ninja as the default generator.
> I have not applied that patch yet, because Thomas P. and I believed this
> is a bit bold, even for next.

And I will not apply it, because it does actually break some packages
because of ninja.

For example, compiler-rt complains with:

    ninja: error: dependency cycle: include/sanitizer/allocator_interface.h -> include/sanitizer/allocator_interface.h

So, maybe the package is broken and needs fixing, but it (supposedly)
builds OKi-ish with makefiles.

So, we need to assess how many of the cmake packages build fine with
ninja. If they are the vast majority, then we annonate those that don't
and change the default to use ninja. If however, the vast majority does
not work with ninja, then we keep the curremnt status quo, and annotate
those packages that do, like webktigtk or wpewebkit.

Also, please have a look at qt6: it is already using ninja, but like
webkitgtk and wpewebkit, is was special-coded. Could you please send
a follow-up patch that upgrades qt6 to use QT6_CMAKE_BACKEND?

Regards,
Yann E. MORIN.

> I've started a build with a bunch of cmake-based packages, and I'll see
> if they break alot of not later in the evening. If there's breakage,
> I'll report and you'll have to investigate! ;-p
> 
> > A fun fact is that we of course have to disable ninja when building ninja.
> 
> Yes, of course! :-)
> 
> Regards,
> Yann E. MORIN.
> 
> > Signed-off-by: Thomas Devoogdt <thomas.devoogdt at barco.com>
> > ---
> > v5: add this optional commit
> > v6: rebase
> > ---
> >  package/ninja/ninja.mk | 1 +
> >  package/pkg-cmake.mk   | 2 +-
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/package/ninja/ninja.mk b/package/ninja/ninja.mk
> > index b7bc1a4f1c..85dd2e05aa 100644
> > --- a/package/ninja/ninja.mk
> > +++ b/package/ninja/ninja.mk
> > @@ -9,6 +9,7 @@ NINJA_VERSION = $(NINJA_VERSION_MAJOR).g95dee.kitware.jobserver-1
> >  NINJA_SITE = $(call github,Kitware,ninja,v$(NINJA_VERSION))
> >  NINJA_LICENSE = Apache-2.0
> >  NINJA_LICENSE_FILES = COPYING
> > +NINJA_CMAKE_NINJA = NO
> >  
> >  define HOST_NINJA_INSTALL_CMDS
> >  	$(INSTALL) -m 0755 -D $(@D)/ninja $(HOST_DIR)/bin/ninja
> > diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> > index 36ab88d3a1..dab87c81f4 100644
> > --- a/package/pkg-cmake.mk
> > +++ b/package/pkg-cmake.mk
> > @@ -52,7 +52,7 @@ endif
> >  define inner-cmake-package
> >  
> >  $(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES
> > -
> > +$(3)_CMAKE_NINJA ?= YES
> >  
> >  ifeq ($$($(3)_SUPPORTS_IN_SOURCE_BUILD),YES)
> >  $(2)_BUILDDIR			= $$($(2)_SRCDIR)
> > -- 
> > 2.34.1
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at buildroot.org
> > https://lists.buildroot.org/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 at buildroot.org
> https://lists.buildroot.org/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.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list