All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: "Daniel Price" <daniel.price@gmail.com>,
	"Gilles Talis" <gilles.talis@gmail.com>,
	"Peter Seiderer" <ps.report@gmx.net>,
	"Julien Corjon" <corjon.j@ecagroup.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org, "Martin Bark" <martin@barkynet.com>,
	"Gaël Portay" <gael.portay@collabora.com>
Subject: Re: [Buildroot] [PATCH v6 2/8] package/re2: switch to generic-package make build
Date: Sun, 13 Feb 2022 15:42:18 +0100	[thread overview]
Message-ID: <20220213144218.GA4462@scaer> (raw)
In-Reply-To: <20220205201837.3324085-2-james.hilliard1@gmail.com>

Jmes, All,

On 2022-02-05 13:18 -0700, James Hilliard spake thusly:
> The cmake build appears to be missing features such as pkg-config
> generation support, switch to the regular makefile based build
> which appears to work better.

I was wondering why we could not just fix the CMake buildsystem, and
submit the fix upstream...

And then I remembered already talking about this earlier, but this
commit did not carry any explanations why we could not do it... So I
had to dig the archives to recover the previous discussion.

So, bottom line is, the commit log would be better off with more
explanations, like:

    The cmake build appears to be missing features, such as pkg-config
    generation support which is needed for some packages to find re2,
    like qt5webengine.

    Upstream is not keen on fixing the CMake-absed buildsystem [0]

    Instead of patching it on our side, and then have to carry the patch
    forever, we switch to the Makefile-based generic buildsystem.

    Note that previously some packages like grpc failed when the generic
    Makefile was used, because they would not find the cmake-equivalent
    of pkg-config, but this is now fixed [1].

    Signed-off-by: you.

    [0] https://github.com/google/re2/issues/349
    [1] https://github.com/grpc/grpc/commit/45e413d2520795e7281e9a592af81620349bc186

> This will be needed by qt5webengine.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> Changes v1 -> v2:
>   - don't built shared libraries if BR2_STATIC_LIBS is set
> ---
>  package/re2/re2.mk | 32 ++++++++++++++++++++++++++++----
>  1 file changed, 28 insertions(+), 4 deletions(-)
> 
> diff --git a/package/re2/re2.mk b/package/re2/re2.mk
> index b562d5d7ef..2863fcb662 100644
> --- a/package/re2/re2.mk
> +++ b/package/re2/re2.mk
> @@ -10,8 +10,32 @@ RE2_LICENSE = BSD-3-Clause
>  RE2_LICENSE_FILES = LICENSE
>  RE2_INSTALL_STAGING = YES
>  
> -RE2_CONF_OPTS += -DRE2_BUILD_TESTING=OFF
> -HOST_RE2_CONF_OPTS += -DRE2_BUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON
> +define RE2_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
> +		-C $(@D) $(if $(BR2_STATIC_LIBS),static)
> +endef
>  
> -$(eval $(cmake-package))
> -$(eval $(host-cmake-package))
> +define RE2_INSTALL_STAGING_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
> +		DESTDIR="$(STAGING_DIR)" prefix=/usr -C $(@D) \

We usually do not double-quote STAGING_DIR, TARGET_DIR, or HOST_DIR,
because we do not even support building in a directory with spaces in
its name.

    $ git grep -E '=\$\(STAGING_DIR\)' |wc -l
    693
    $ git grep -E '="\$\(STAGING_DIR\)"' |wc -l
    23

So I'd prefer we stick to the not-double-quoted situation.

No need to respin, this can be fixed when applying...

Regards,
Yann E. MORIN.

> +		$(if $(BR2_STATIC_LIBS),static-install,install)
> +endef
> +
> +define RE2_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
> +		DESTDIR="$(TARGET_DIR)" prefix=/usr -C $(@D) \
> +		$(if $(BR2_STATIC_LIBS),static-install,install)
> +endef
> +
> +define HOST_RE2_BUILD_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
> +		-C $(@D)
> +endef
> +
> +define HOST_RE2_INSTALL_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
> +		-C $(@D) DESTDIR="$(HOST_DIR)" prefix=/usr install
> +endef
> +
> +$(eval $(generic-package))
> +$(eval $(host-generic-package))
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@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@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-02-13 14:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 20:18 [Buildroot] [PATCH v6 1/8] package/webp: enable host build James Hilliard
2022-02-05 20:18 ` [Buildroot] [PATCH v6 2/8] package/re2: switch to generic-package make build James Hilliard
2022-02-13 14:42   ` Yann E. MORIN [this message]
2022-02-13 14:52     ` Peter Korsgaard
2022-02-05 20:18 ` [Buildroot] [PATCH v6 3/8] package/icu: don't disable renaming for host build James Hilliard
2022-02-13 15:00   ` Yann E. MORIN
2022-02-13 16:59     ` Peter Korsgaard
2022-02-13 15:01   ` Yann E. MORIN
2022-02-05 20:18 ` [Buildroot] [PATCH v6 4/8] package/qt5/qt5base: enable ccache via configure option James Hilliard
2022-02-05 20:23   ` Thomas Petazzoni via buildroot
2022-02-05 20:40     ` James Hilliard
2022-02-13 15:06   ` Yann E. MORIN
2022-02-13 16:39     ` Arnout Vandecappelle
2022-02-05 20:18 ` [Buildroot] [PATCH v6 5/8] package/qt5/qt5webengine-chromium-catapult: new package James Hilliard
2022-02-05 20:18 ` [Buildroot] [PATCH v6 6/8] package/qt5/qt5webengine-chromium: " James Hilliard
2022-02-13 16:50   ` Yann E. MORIN
2022-02-14  1:11     ` James Hilliard
2022-02-05 20:18 ` [Buildroot] [PATCH v6 7/8] package/qt5/qt5base: disable broken qmake sysrootify James Hilliard
2022-02-05 20:18 ` [Buildroot] [PATCH v6 8/8] package/qt5/qt5webengine: bump to version 5.15.8 James Hilliard
2022-02-13 11:43 ` [Buildroot] [PATCH v6 1/8] package/webp: enable host build Peter Korsgaard

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=20220213144218.GA4462@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=corjon.j@ecagroup.com \
    --cc=daniel.price@gmail.com \
    --cc=gael.portay@collabora.com \
    --cc=gilles.talis@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=martin@barkynet.com \
    --cc=ps.report@gmx.net \
    --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.