[build2] Missing include?: build2-0.11.0/build2/target.txx:23: undefined reference to `build2::resolve_members`

Matthew Krupcale mkrupcale at matthewkrupcale.com
Wed Jul 31 19:14:28 UTC 2019


I sometimes have build failures[1] for build2 0.11.0 with the
following error during linking of exe{b}[2]:

BUILDSTDERR: ld build2/exe{b}
BUILDSTDERR: /usr/bin/ld: build2/version/rule.o: in function
BUILDSTDERR: /builddir/build/BUILD/build2-toolchain-0.11.0/build2-0.11.0/build2/target.txx:23:
undefined reference to `build2::resolve_members(build2::action,
build2::target const&)'
BUILDSTDERR: collect2: error: ld returned 1 exit status
BUILDSTDERR: info: failed to update build2/exe{b}

Upon inspection, I believe that build2/version/rule.cxx does not
#include build2/algorithm.hxx which defines (in build2/algorithm.ixx)
build2::resolve_members, as is done for all the other
build2/*rule.cxx. I'm not entirely sure why this only fails sometimes
though because the definition should be present when linking with the
other build2/*.o files that do #include build2/algorithm.hxx.

However, I wonder if it might just make more sense to #include
build2/algorithm.hxx inside build2/target.hxx, since resolve_members
is used by build2/target.{i,t}xx.


PS: I presume this will also apply to the restructuring going on

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=36632199
[2] https://kojipkgs.fedoraproject.org//work/tasks/2759/36632759/build.log

More information about the users mailing list