[Rivet] Rivet 2.6.0 sometimes fails to build: can't find tmp.XXX.cc file

Ivan Razumov ivan.razumov at cern.ch
Thu Jun 21 12:46:27 BST 2018


Dear Rivet developers,

sometimes Rivet 2.6.0 build fails with an error like this:

 > make[5]: *** No rule to make target `tmp.oFwnz6L.cc', needed by 
`RivetLHCbAnalyses.so'.

We believe that this is caused by "race condition" between Make building 
a list of files needed to build .so file and rivet-buildplugin doing 
it's job:

% grep analyses/Makefile.am -e 'RivetLHCbAnalyses.so'

  RivetLHCbAnalyses.so : $(shell ls $(srcdir)/pluginLHCb/*.cc)

% grep bin/rivet-buildplugin -e 'mktemp'

  tmpfile="$(mktemp tmp.XXXXXXXX)"
  mv "$tmpfile" "$tmpfile.cc"

One possible solution to this "race condition" is to use find instead of 
ls, like this:

$(shell find $(srcdir)/pluginLHCb -name '*.cc' -not -name 'tmp.*.cc')

Best regards,
Ivan for the GENSER team



More information about the Rivet mailing list