All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Romain Naour <romain.naour@smile.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/boost: add option to force static build
Date: Wed, 27 Jul 2022 16:42:59 +0100	[thread overview]
Message-ID: <NNROFR.FBROLJPFYDGX1@crapouillou.net> (raw)
In-Reply-To: <efe0cf31-54a7-6abc-8034-c440327e644f@smile.fr>

Hi Romain,

Le mer., juil. 27 2022 at 17:06:52 +0200, Romain Naour 
<romain.naour@smile.fr> a écrit :
> Hello Paul,
> 
> Le 20/06/2022 à 13:55, Paul Cercueil a écrit :
>>  This option can be useful when building for a system that
>>  needs to somewhat maintain compatibility with previously built
>>  software, as Boost is notorious for breaking ABI at every
>>  single release.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
>>   package/boost/Config.in | 11 +++++++++++
>>   package/boost/boost.mk  |  2 +-
>>   2 files changed, 12 insertions(+), 1 deletion(-)
>> 
>>  diff --git a/package/boost/Config.in b/package/boost/Config.in
>>  index b99b01f22e..60eb83ff4c 100644
>>  --- a/package/boost/Config.in
>>  +++ b/package/boost/Config.in
>>  @@ -16,6 +16,17 @@ config BR2_PACKAGE_BOOST
>> 
>>   if BR2_PACKAGE_BOOST
>> 
>>  +config BR2_PACKAGE_BOOST_STATIC
>>  +	bool "Build static libraries"
>>  +	depends on BR2_SHARED_LIBS
>>  +	help
>>  +	  Build static Boost libraries.
>>  +
>>  +	  This option can be useful when building for a system that
>>  +	  needs to somewhat maintain compatibility with previously built
>>  +	  software, as Boost is notorious for breaking ABI at every
>>  +	  single release.
>>  +
>>   config BR2_PACKAGE_BOOST_ATOMIC
>>   	bool "boost-atomic"
>>   	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
>>  diff --git a/package/boost/boost.mk b/package/boost/boost.mk
>>  index f6e9a03220..162277b968 100644
>>  --- a/package/boost/boost.mk
>>  +++ b/package/boost/boost.mk
>>  @@ -109,7 +109,7 @@ endif
>> 
>>   # By default, Boost build and installs both the shared and static
>>   # variants. Override that if we want static only or shared only.
>>  -ifeq ($(BR2_STATIC_LIBS),y)
>>  +ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_BOOST_STATIC),y)
>>   BOOST_OPTS += link=static runtime-link=static
> 
> So in a BR2_SHARED_LIBS configuration, we end up with static boost 
> libraries?

If the option is set, yes.

> What could happens with packages expecting boost shared libraries due 
> to
> BR2_SHARED_LIBS but only get static boost libraries?

Then they would just compile against the static library. Or what do you 
mean?

> Also a similar per-package option could be added to all packages...
> 
> After discussing with Thomas and Arnout, we are not convinced by this 
> patch.

Yes, I know that a similar per-package option could be added to all 
packages, and I know that we (both you and me) don't want that. My 
argument is that none of the other packages (that I know of) break ABI 
at every single minor version. Only Boost does that, and it makes it 
completely impossible to support old programs.

I've been doing this trick of compiling static builds of Boost since 
Buildroot 2014.05 and the majority of binaries built back then still 
run with my current distribution based on Buildroot 2021.08. Programs 
built against shared Boost would break every 3 months.

Cheers,
-Paul


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

  reply	other threads:[~2022-07-27 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 11:55 [Buildroot] [PATCH 1/1] package/boost: add option to force static build Paul Cercueil
2022-07-27 15:06 ` Romain Naour
2022-07-27 15:42   ` Paul Cercueil [this message]
2022-07-27 15:57     ` Yann E. MORIN
2022-07-27 16:49       ` Paul Cercueil

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=NNROFR.FBROLJPFYDGX1@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@smile.fr \
    /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.