cp3-llbb / CommonTools

Utilities to mass create histograms, flat trees, and more
2 stars 9 forks source link

Error message during make -> has to be run twice #64

Closed swertz closed 8 years ago

swertz commented 8 years ago

Each time I build histFactory I get this message when calling make (after configuring cmake in a CMS environment):

Error: Renaming Framework_dict.cpp_tmp into Framework_dict.cpp!
make[2]: *** [Framework_dict.cpp] Error 1
make[2]: *** Waiting for unfinished jobs....
Error: Renaming TTAnalysis_dict.cpp_tmp into TTAnalysis_dict.cpp!
make[2]: *** [TTAnalysis_dict.cpp] Error 1
make[1]: *** [CMakeFiles/multidraw.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

In the end some stuff is not built (such as createHistoWithMultiDraw.exe). Calling make again there is no error and everything gets built. Is that expected?

blinkseb commented 8 years ago

It should happen only when running make with more than one core. I need to investigate more, but it's because dictionary generation create a 'file' rule in cmake and they are known to be problematic in multicore (make tried to generate each dictionary more than once in parallel and one fails)

I know there's way to fix this by adding some dependencies between rules manually.

You found at leat one workaround. The other is to run make without the -j option. Le 21 déc. 2015 13:43, "Sébastien Wertz" notifications@github.com a écrit :

Each time I build histFactory I get this message when calling make (after configuring cmake in a CMS environment):

Error: Renaming Framework_dict.cpp_tmp into Framework_dict.cpp! make[2]: * [Framework_dict.cpp] Error 1 make[2]: * Waiting for unfinished jobs.... Error: Renaming TTAnalysis_dict.cpp_tmp into TTAnalysis_dict.cpp! make[2]: * [TTAnalysis_dict.cpp] Error 1 make[1]: * [CMakeFiles/multidraw.dir/all] Error 2 make[1]: *\ Waiting for unfinished jobs....

In the end some stuff is not built (such as createHistoWithMultiDraw.exe). Calling make again there is no error and everything gets built. Is that expected?

— Reply to this email directly or view it on GitHub https://github.com/cp3-llbb/CommonTools/issues/64.

swertz commented 8 years ago

Hm, I see! In make you can do something like that: https://github.com/swertz/MEMcpp/blob/master/makefile#L30 No idea for cmake though...

blinkseb commented 8 years ago

Also fixed