[build2] usage issues/feedback

Boris Kolpackov boris at codesynthesis.com
Thu Apr 12 07:14:17 UTC 2018


Hi Robin,

Thanks for taking the time to write this detailed report, it is
definitely useful feedback and is much appreciated. I've noted
your suggestions and also commented on some of them below.


Robin Moussu <robin.moussu at gmail.com> writes:

> If you look at https://build2.org/, their is a nice example of bpkg. But
> from what I understood of your conferences, I'm not going to use `bpkg`,
> but `b` directly. At the bottom of the pag, their is a link to
> https://build2.org/build2-toolchain/doc/build2-toolchain-intro.xhtml with
> once again a nice use example of bpkg.

Yes, we have realized (thanks for other user's feedback similar to yours)
that the current introduction approches things from the wrong direction
(consumption rather than production). So we are in the process of
rewriting it. We will be circulating a private preview in a couple of
weeks to those who provided feedback and you are now on the list.


> I didn't found any references to `b create` in the manual, and I think it's
> missing. Furthermore, the content of the generated text file are not ideal.
> Some minimal examples and default value (maybe commented) should be put in
> them.

The create meta-operation is not really meant to create sample projects.
Rather, it creates amalgamation projects that are normally used for
building multiple sub-projects with the same configuration; see b(1)[3]
for details.

But: the idea of creating a canonical sample project is a good one
and we have this (plus something much cooler ;-)) in the works. So
stay tuned.


> As you said multiple time in your conferences, you don't want to write
> magic incantations, but to be honest, and even if their isn't a lot of
> them, they look like magic incantations if you don't have a proper
> tutorial.

Yes, I agree, without proper documentation of the underlying concepts
it may look like magic. While hopefully the new introduction will start
addressing this, proper build system manual is also in the works. 


> Then I did some tests, and wanted to move the destination directory of my
> binary to `bin`. No big deal, I quickly understood that I had to write
> `exe{bin/hello}: {cxx hxx}{**}`. However I forgot to create the `bin`
> directory. `b` got a coredump.

I belive with the latest staged[1] toolchain you will get an error instead
of the core dump. The solution is to add the bin directory as a
preprequisite:

bin/exe{hello}: {cxx hxx}{**} fsdir{bin/}


> Unfortunately, I can't use my current version of `b`, since it require the
> version 0.7 or later. Once again, it's fine, it's not the definitive
> version of build2. However, I don't understand why libpkgconf and libbutl
> aren't submodules. It would make the installation process from source much
> easier imho.

The proper procedure for the toolchain upgrade is described in the
installation manual[2]. Note also that for now, during early development,
you have to bootstrap the toolchain from scratch since we often make
breaking changes.

[1] https://stage.build2.org/0/
[2] https://build2.org/build2-toolchain/doc/build2-toolchain-install.xhtml#UPGRADE
[3] https://build2.org/build2/doc/b.xhtml

Boris



More information about the users mailing list