All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] boost: correctly disable icu in locale if needed
Date: Sat, 14 Jul 2018 23:21:46 +0200	[thread overview]
Message-ID: <20180714232146.0050882d@windsurf> (raw)
In-Reply-To: <CAPi7W83kqXy00ntbKnMWjXDLNDfNOFWY+kXXsx+QTh-0JKT+gA@mail.gmail.com>

Hello,

On Sat, 14 Jul 2018 23:04:59 +0200, Fabrice Fontaine wrote:

> > First, if --without-icu has no effect, why isn't your patch removing
> > it ?
> >  
> I don't fully understand yet what --without-icu does in the other boost
> libraries so I didn't want to remove it.
> From my current understanding, icu should also (at least) be used by regex.

--without-icu apparently has the effect that ICU_PATH is not defined,
which has an impact in libs/locale/build/Jamfile.v2, but the syntax of
those .v2 files is really weird, so I don't get what's happening
afterwards.

> > Second, why are you introducing another BR2_PACKAGE_ICU conditional,
> > even if there's already one ?
> >  
> Because there was already a BR2_PACKAGE_BOOST_LOCALE conditional and it
> seems strange to set boost.locale.icu if locale is not enabled. But I can
> move it if you think it's better.

I think it would be good to understand the interaction with
--without-icu to have a clean solution.

> > Third, what is the problem with libboost_locale linking with icu if
> > found in the staging directory ?
> >  
> Because, if it links with icu, boost will also build chrono and thread. To
> avoid always selecting these two libraries, I sent a patch to select them
> only if BR2_PACKAGE_ICU is set (see http://patchwork.ozlabs.org/patch/943753).

Indeed, boost_locale will build boost_thread if ICU is enabled:

        if $(found-icu)
        {
            ICU_SOURCES = 
                boundary
                codecvt
                collator
                conversion
                date_time
                formatter
                icu_backend
                numeric
                time_zone
                ;
            
            result += <source>icu/$(ICU_SOURCES).cpp 
                      <library>../../thread/build//boost_thread 
                      ;
        }

However, I don't see this happening for chrono.

> My patch won't always work if boost links with icu when BR2_PACKAGE_ICU is
> not set (for example if the user changes his configuration between two
> builds). Perhaps, I should sent a patch serie with these two patches to
> better reflect the dependencies between them?

If patches have dependencies/interactions, then yes sending them as a
series makes it clear they are related.

However, I still don't see the relation here. We indeed recommend in
Buildroot to explicitly enable/disable features using configuration
options when possible, mainly to avoid target packages incorrectly
detecting some host library and trying to use it. So I'm still confused
by what this patch is *fixing*. That it makes things more correct is
OK, but that it is fixing something, I'm not sure.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-07-14 21:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 17:42 [Buildroot] [PATCH 1/1] boost: correctly disable icu in locale if needed Fabrice Fontaine
2018-07-14 20:41 ` Thomas Petazzoni
2018-07-14 21:04   ` Fabrice Fontaine
2018-07-14 21:21     ` Thomas Petazzoni [this message]
2019-04-07 20:25 ` Thomas Petazzoni
2019-04-07 20:39   ` Fabrice Fontaine
2019-04-07 20:45   ` Max Filippov
2019-04-07 21:09     ` Max Filippov
2019-04-08  7:21       ` Thomas Petazzoni
2019-04-08 15:53         ` Max Filippov

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=20180714232146.0050882d@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 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.