Boost logo

Boost :

From: Mojca Miklavec (mojca.miklavec.lists_at_[hidden])
Date: 2022-12-13 01:03:28


On Mon, 12 Dec 2022 at 15:58, René Ferdinand Rivera Morell wrote:
>
> This is what package managers were invented to solve.

Which one?

The first google hit for a package manager under Windows points to
    https://learn.microsoft.com/en-us/windows/package-manager/
and I don't seem to find boost there:
    https://github.com/microsoft/winget-pkgs/tree/master/manifests/b

Sure, there's probably a package manager that provides boost, but
maybe another dependency is missing there.

Supporting novice users (as well as setting up CI jobs) on tons of
operating systems is a nightmare as dependencies grow.

And, in fact, I would dare to claim that CMake's FetchContent does in
a way count to be "a package manager". Not a fully fledged one, but
certainly an extremely useful one.

On Mon, 12 Dec 2022 at 16:34, Дмитрий Архипов via Boost wrote:
>
> I can't imagine package managers pulling and building Boost
> significantly slower than FetchContent does.

I first wanted to write a longer explanation, but thought that perhaps
a live example would tell more than thousand words:
    https://github.com/mojca/cmake-troubleshooting-example/actions/runs/3681098791

Results:
- build from source: 1:48 for everything: to fetch boost, configure
and build the project
- install boost via vcpkg: 4:55 (+ whatever it takes to configure and
build the project)
- install boost via choco: 12:58 to install boost + 0:27 to configure
and build the project
- install via windows package manager: good luck ;), see above
(I'll be grateful for hints about the best way to drop the time even
lower. Maybe simply unzipping official windows builds ...)

Plus whatever it takes to (learn how to) install the package manager first.

(OK, vcpkg is a tiny bit biased. The list above fetches slightly more
dependencies than the minimal example needs, but it fetches the real
list that I need for a project. For choco I have no choice.)

On Ubuntu it's a matter of a couple of seconds.
But even on Ubuntu it's a problem that older versions don't provide a
sufficiently recent version, so in many cases it needs to be installed
"manually" as well.

Reasons for longer build times:

1. vcpkg has to build everything from source, and it has to build full
package dependencies even when the code itself doesn't need any of
those recursive dependencies.

2. choco needs to install absolutely everything, and then I suspect
that they might be checksumming files or doing some other magic that
makes the installation of existing binaries (with no compilation)
painfully, painfully slow.

> That being said, you
> usually won't be able to install a Boost *release candidate* with a
> package manager.

True.
But also: it's both heavily non-trivial to handle if one wants a
project to be easy to build for novice users across a wide range of
operating systems and compilers.

Bottomline: having a CMake-compliant source version of Boost is still
extremely, extremely useful.

Mojca


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk