[build2] Issues with my first attempt at build2 CI

Karen Arutyunov karen at codesynthesis.com
Mon Oct 8 14:15:15 UTC 2018


Hi Joël,

> 1. Am I correct that this is the intended behavior of bpkg? > 2. If yes, the fix is to add these files (in some ways) explicitely 
as> dependencies of the target in question. Am I correct? Or should I> 
approach this differently?
Note that the way bpkg deals with packages in git repositories boils 
down to cloning the repository into some "hidden" directory 
(bpkg-rep-fetch) and creating the package distribution (bpkg-pkg-checkout).

The problem with gtest-build2 package is that it's distribution doesn't 
contain all files required to build the project, as you have actually 
noticed.

You can reproduce the issue locally preparing the distribution and 
trying to build it:

$ git clone https://github.com/Klaim/gtest-build2.git
$ git -C gtest-build2/ submodule update --init --recursive
$ b dist: gtest-build2/@gtest-build2-out/ config.dist.root=./
$ b gtest-1.8.0-a.1/
error: no rule to update 
gtest-1.8.0-a.1/gtest/gtest-origin/googletest/src/cxx{gtest}
   info: re-run with --verbose 4 for more information
   info: while extracting header dependencies from 
gtest-1.8.0-a.1/gtest/gtest-origin/googletest/src/cxx{gtest-all}
   info: while applying rule cxx.compile to update 
gtest-1.8.0-a.1/gtest/gtest-origin/googletest/src/obja{gtest-all}
   info: while applying rule cxx.link to update 
gtest-1.8.0-a.1/gtest/gtest-origin/googletest/liba{gtest}
   info: while applying rule bin.lib to update 
gtest-1.8.0-a.1/gtest/gtest-origin/googletest/lib{gtest}
   info: while applying rule alias to update 
gtest-1.8.0-a.1/gtest/gtest-origin/dir{googletest/}
   info: while applying rule alias to update gtest-1.8.0-a.1/dir{gtest/}
   info: while applying rule alias to update dir{gtest-1.8.0-a.1/}
info: failed to update dir{gtest-1.8.0-a.1/}

To fix this you need to distribute the missed files, for example, changing

lib{gtest} : src/cxx{gtest-all} include/hxx{**}

to

lib{gtest} : src/cxx{gtest-all} include/hxx{**} \
              src/hxx{*} \
              src/file{gtest.cc gtest-death-test.cc gtest-filepath.cc \
                       gtest-port.cc gtest-printers.cc \
                       gtest-test-part.cc gtest-typed-test.cc}

Best regards,
Karen



More information about the users mailing list