[build2] Rerunning build2 and getting different results (errors)

Wilhelm Meier wilhelm.meier at hs-kl.de
Thu May 11 15:47:19 UTC 2023


Hi all,

I'm getting different results if I rerun build2 twice or more. Sometimes 
the first run after a "clean" gives success, and rerunning build2 
directly after the first successful run gives eventually an error.

My project structure resembles that at the end of chapter 1.3.

proj/build/
     /doc/
     /src/boards/protoboard/tests
         /libs/std
              /mcu/general

The top-level buildfile lists only "dir{src}" and in src it lists only 
"dir{boards}".

The buildfile in boards is as follows:
---
include ../libs/

dir{.}: dir{* -microchip} ../libs/dir{.}
---

The buildfile in /src/boards/protoboard/tests looks like:
---

l = ../../../libs

exe{test00}: cxx{test00} $l/std/lib{std} $l/mcu/general/lib{general}
---

After several successful runs of build2 it eventually comes to:
---
error: no rule to update src/libs/mcu/general/libs{general}
info: target src/libs/mcu/general/libs{general} is not declared in any 
buildfile
info: perhaps it is a missing source file?
info: re-run with --verbose=4 for more information
info: while applying rule cxx.link to update 
src/boards/protoboard/tests/exe{test00}
info: while applying rule build.alias to update 
src/boards/protoboard/dir{tests/}
info: while applying rule build.alias to update src/boards/dir{protoboard/}
info: while applying rule build.alias to update src/dir{boards/}
info: while applying rule build.alias to update dir{src/}
info: while applying rule build.alias to update dir{./}
---

This also happens with an out-of-source build.

I'm using:

$ /usr/local/bin/b --version 
                               build2 0.16.0-a.0.f66848dbd677
libbutl 0.16.0-a.0.b0bf46a79426
host x86_64-linux-gnu
Copyright (c) 2014-2023 the build2 authors.
This is free software released under the MIT license.

Thanks for your hints,
  Wilhelm



More information about the users mailing list