[build2] build2 0.14.0 released

Matthew Krupcale mkrupcale at matthewkrupcale.com
Sat Oct 23 16:11:28 UTC 2021


On Tue, Oct 19, 2021 at 7:50 AM Boris Kolpackov via users
<users at build2.org> wrote:
>
> We have released build2 toolchain version 0.14.0.

Congratulations on the new release!

>   * Support for hermetic build configurations.
>
>     See "Hermetic Build Configurations" in the manual for details.

I see that this says that it may be extended in the future to disallow
changing external resources like compilers, system headers, and
libraries. Does "disallow" mean a compiler change will not build at
all, or this new compiler configuration will rebuild hermetically?

If the former, then one should use config.config.hermetic.reload=true
to allow the compiler change to build?

And if the latter, how does this differ from the current behavior
where the compiler e.g. --version output change would be detected
already and thus rebuild (albeit non-hermetically)?

>   * Support for warning suppression from external C/C++ libraries.

This is a useful feature since it's sometimes nice to ignore external
dependency warnings, especially when compiling with stricter warning
settings than the upstream developer does. As you say, there are some
limitations, but it's definitely good to have this option for
development.

>   * C++20 modules support in GCC 11 using the module mapper.

Well done! I know you've been at the forefront of this effort since
the beginning of build2.

>   * Initial Emscripten compiler support.

Cool, are there plans to support the LLVM implementation for the
wasm32-wasi target? I don't have much experience with WASM, but when I
did a little with it, I found it annoying needing to use/get the
emscripten compiler.

>   * Support for test runners (config.test.runner).
>     Support for test timeouts (config.test.timeout).

Nice especially for development purposes, as sometimes it's useful to
run the test in e.g. gdb.

>     New config.install.etc variable with the data_root/etc/ default.

That covers sysconfdir[1,2]. I haven't yet needed that for a project,
but it's still good to have the option.

>   * Consistently install prerequisites from any scope by default.
>
>     It is also now possible to adjust this behavior with the global
>     !config.install.scope override. Valid values for this variable are:
>
>     project -- only from project
>     bundle  -- from bundle amalgamation
>     strong  -- from strong amalgamation
>     weak    -- from weak amalgamation
>     global  -- from all projects (default)

I think this may be a change that's causing a failure in my previous
bootstrap sequence as I'm trying to update to v0.14.0 for Fedora. In
particular, this is what I do:

...
# bootstrap phase 3 completed: have final, shared lib build2

# configure libodb{,-sqlite} to build static and NOT install
build2-0.14.0/build2/b configure: libodb-2.5.0-b.21/
libodb-sqlite-2.5.0-b.21/ config.bin.lib=static config.cxx=g++
'config.cxx.coptions=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
 -m64  -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection'
'config.cxx.loptions=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld '
config.import.libodb=libodb-2.5.0-b.21/ config.install=false

# configure libbpkg bpkg bdep
build2-0.14.0/build2/b configure: libbpkg-0.14.0/ bpkg-0.14.0/
bdep-0.14.0/ config.bin.lib=shared config.bin.rpath.auto=false
config.bin.rpath_link.auto=false config.cxx=g++
'config.cxx.coptions=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
 -m64  -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection'
'config.cxx.loptions=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld '
config.import.libodb=libodb-2.5.0-b.21/
config.import.libodb_sqlite=libodb-sqlite-2.5.0-b.21/
config.import.libbutl=build2-0.14.0/libbutl-0.14.0/
config.import.libbpkg=libbpkg-0.14.0/ config.install.root=/usr
config.install.exec_root=/usr config.install.bin=/usr/bin
config.install.sbin=/usr/sbin config.install.include=/usr/include
config.install.lib=/usr/lib64 config.install.man=/usr/share/man
'config.install.legal=/usr/share/licenses/<project>'
config.install.pkgconfig=/usr/lib64/pkgconfig
config.install.bin.mode=755 config.install.sbin.mode=755
config.install.lib.mode=755
config.install.chroot=/builddir/build/BUILDROOT/build2-0.14.0-1.fc34~bootstrap.x86_64

# build libbpkg bpkg bdep
build2-0.14.0/build2/b libbpkg-0.14.0/ bpkg-0.14.0/ bdep-0.14.0/

# install build2 toolchain: tries to install libodb and errors
build2-0.14.0/build2/b-boot install: build2-0.14.0/libbutl-0.14.0/
build2-0.14.0/ libbpkg-0.14.0/ bpkg-0.14.0/ bdep-0.14.0/
error: unknown installation directory name 'root'
  info: did you forget to specify config.install.root?
  info: specify !config.install.root=... if installing from multiple projects
  info: while updating (for install) libodb-2.5.0-b.21/odb/liba{odb}
  info: while updating (for install) bpkg-0.14.0/bpkg/libue{bpkg}
  info: while updating (for install) bpkg-0.14.0/bpkg/exe{bpkg}
  info: while updating (for install) bpkg-0.14.0/bpkg/exe{bpkg}
  info: while updating (for install) bpkg-0.14.0/dir{bpkg/}
  info: while updating (for install) dir{bpkg-0.14.0/}

# add !config.install.scope to try to avoid installing libodb
build2-0.14.0/build2/b-boot install: '!config.install.scope=project'
build2-0.14.0/libbutl-0.14.0/ build2-0.14.0/ libbpkg-0.14.0/
bpkg-0.14.0/ bdep-0.14.0/
error: incompatible libodb-2.5.0-b.21/odb/liba{odb} build
  info: library is built not for install
  info: while updating (for install) bpkg-0.14.0/bpkg/exe{bpkg}
  info: while updating (for install) bpkg-0.14.0/bpkg/exe{bpkg}
  info: while updating (for install) bpkg-0.14.0/dir{bpkg/}
  info: while updating (for install) dir{bpkg-0.14.0/}

What should I do in this case since I don't want to install the static
libodb libraries? config.install=false was the previous mechanism in
this case. Is there an equivalent way to achieve this result?

>   * New file cache for intermediate build results.
>
>     The file cache is used to store intermediate build results, for example,
>     partially-preprocessed C/C++ translation units (those .i/.ii files). The
>     cache implementation to use is controlled by the new --file-cache option.
>     Its valid values are noop (no caching or compression) and sync-lz4 (no
>     caching with synchronous LZ4 on-disk compression; this is the default).

Is this a typo, or is the caching functionality not enabled yet? That
is, intermediate results are compressed but not cached yet?

[1] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Installation-Directory-Variables.html



More information about the users mailing list