From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/nodejs: use system-icu for host-nodejs when available
Date: Tue, 28 Jan 2020 10:20:57 +0100 [thread overview]
Message-ID: <20200128102057.6c5cda1f@windsurf> (raw)
In-Reply-To: <20200126162659.GR32369@scaer>
On Sun, 26 Jan 2020 17:26:59 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> James, All,
>
> On 2020-01-26 00:58 -0700, James Hilliard spake thusly:
> > Fixes:
> > - http://autobuild.buildroot.net/results/1ef947553ec762dba6a6202b1cfc84ceed75dbb2/
>
> Pointing to an autobuild failure is nice, but you really need to provide
> a bit more context and explanations on what you are doing here...
>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> > package/nodejs/nodejs.mk | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> > index e6eb73d576..abc868c364 100644
> > --- a/package/nodejs/nodejs.mk
> > +++ b/package/nodejs/nodejs.mk
> > @@ -65,7 +65,7 @@ define HOST_NODEJS_CONFIGURE_CMDS
> > --shared-openssl-libpath=$(HOST_DIR)/lib \
> > --shared-zlib \
> > --no-cross-compiling \
> > - --with-intl=small-icu \
> > + --with-intl=$(if $(BR2_PACKAGE_ICU),system-icu,small-icu) \
>
> We already have a conditional block about icu, lines 35-40.
>
> > )
> > endef
> >
> > @@ -80,6 +80,7 @@ define HOST_NODEJS_BUILD_CMDS
> > $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
> > $(MAKE) -C $(@D) \
> > $(HOST_CONFIGURE_OPTS) \
> > + $(if $(BR2_PACKAGE_ICU),CXXFLAGS.target="-DU_DISABLE_RENAMING=1") \
>
> Why do you need to account for a target package when building the host
> variant of nodejs? If this is needed, then explain it in the commit log.
>
> Then, the way we usually pass such options is to append to the existing
> CXXFLAGS. With the above comment, that would probably yield something
> like (e.g. for target, ditto for host):
>
> NODEJS_CXXFLAGS = $(TARGET_CXXFLAGS)
>
> ifeq ($(BR2_PACKAGE_ICU),y)
> NODEJS_DEPENDENCIES += icu
> NODEJS_CONF_OPTS += --with-intl=system-icu
> NODEJS_CXXFLAGS += -DU_DISABLE_RENAMING=1
> else
> NODEJS_CONF_OPTS += --with-intl=small-icu
> endif
I think you're missing the fact that James is tweaking
HOST_NODEJS_CONF_OPTS, depending on the value of BR2_PACKAGE_ICU, which
looks very wrong.
The issue is apparently that when host-icu has been built, the
host-nodejs internal small-icu causes a build failure. However, while
BR2_PACKAGE_ICU=y implies that host-icu will be built, host-icu can
potentially be built even with BR2_PACKAGE_ICU is disabled. It is not
the case today in Buildroot, because host-icu is only in the build
dependencies of the target icu package, but relying on this assumption
seems wrong.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-01-28 9:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-26 7:58 [Buildroot] [PATCH 1/1] package/nodejs: use system-icu for host-nodejs when available James Hilliard
2020-01-26 16:26 ` Yann E. MORIN
2020-01-26 20:57 ` James Hilliard
2020-01-28 9:20 ` Thomas Petazzoni [this message]
2020-01-28 9:57 ` James Hilliard
2020-01-29 17:28 ` Thomas Preston
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=20200128102057.6c5cda1f@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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