diff --git a/root-rootcling-tmpfile.patch b/root-rootcling-tmpfile.patch new file mode 100644 index 0000000..c0c21cc --- /dev/null +++ b/root-rootcling-tmpfile.patch @@ -0,0 +1,40 @@ +From b74835ec7ca9e42c160702f9690cdf2ee43b55dd Mon Sep 17 00:00:00 2001 +From: Raphael Isemann +Date: Tue, 11 Jul 2017 08:10:51 +0200 +Subject: [PATCH] Use pid in temp. file names to mitigate race conditions. + +In case CMake spawns multiple instances of a rootcling invocation +(which can happen as CMake doesn't have a good mechanism for ensuring +that we only spawn one when using the make build system), we now +choose process-unique file names for the temporaries to prevent the +build errors when multiple rootcling invocations try to work +on the same temporary file. + +This isn't a real fix, but as renaming files from temporary to the +real name is usually FS atomic, this will mitigate any future race +conditions we have in this problematic part of the building process +on obscure build systems. Those systems possible don't strictly follow the +order in which they are supposed to build those targets, so this hopefully +makes the consequences of any race conditions less intrusive (e.g. Visual +Studio also seems to suffer from this problem according to the mailing +list). +--- + core/dictgen/src/rootcling_impl.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/dictgen/src/rootcling_impl.cxx b/core/dictgen/src/rootcling_impl.cxx +index bcfaa50631..01f0ff7128 100644 +--- a/core/dictgen/src/rootcling_impl.cxx ++++ b/core/dictgen/src/rootcling_impl.cxx +@@ -3218,7 +3218,7 @@ public: + tempFileNamesCatalog(): m_size(0), m_emptyString("") {}; + + std::string getTmpFileName(const std::string &filename) { +- return filename + "_tmp"; ++ return filename + "_tmp_" + std::to_string(getpid()); + } + ///////////////////////////////////////////////////////////////////////////// + /// Adds the name and the associated temp name to the catalog. +-- +2.13.0 + diff --git a/root-stressEntryList.patch b/root-stressEntryList.patch new file mode 100644 index 0000000..e1f36ae --- /dev/null +++ b/root-stressEntryList.patch @@ -0,0 +1,35 @@ +From 70eeecccca163cc9ae0a6d7f99baf8520552b27a Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Wed, 12 Jul 2017 17:33:16 +0200 +Subject: [PATCH] Make stressEntryList Test2() more robust against rounding + errors + +--- + test/stressEntryList.cxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/stressEntryList.cxx b/test/stressEntryList.cxx +index ee6303bb01..0d3a623af1 100644 +--- a/test/stressEntryList.cxx ++++ b/test/stressEntryList.cxx +@@ -253,7 +253,7 @@ Bool_t Test2() + elistsum->Subtract(elist2); + n = elistsum->GetN(); + TEntryList *elistcheck2 = new TEntryList("elistcheck2","elistcheck2"); +- chain->Draw(">>elistcheck2", "x>0 && (y>0.1 || y<-0.1)", "entrylist"); ++ chain->Draw(">>elistcheck2", cut1 && !cut2, "entrylist"); + + wrongentries4 = 0; + for (Int_t i=0; iSubtract(elist1); + elistcheck2->Reset(); +- chain->Draw(">>elistcheck2", "x<0 && y<0.1 && y>-0.1", "entrylist"); ++ chain->Draw(">>elistcheck2", !cut1 && cut2, "entrylist"); + wrongentries5 = 0; + n = elistcheck2->GetN(); + for (Int_t i=0; i