When running cmake --build . -- install -j24, the build consistently fails at ~66% with the following error:
In file included from input_line_7:10: .../root_build/include/MPSendRecv.h:18:10: remark: building module 'Net' as '.../root_build/lib/Net.pcm' [-Rmodule-build] #include "TSocket.h" ^ Error: Building module 'Net' implicitly. If 'Net' requires a dictionary please specify build dependency: 'G__MultiProc.cxx' depends on 'Net'.
```
Is there a known dependency order issue here, or should I be defining specific build targets to force the order?
Thank you for the reply. I understand now that this is a race condition within the CMake configuration, specifically where G__ targets aren’t fully resolved when ROOT_GENERATE_DICTIONARY runs, causing the build system to attempt implicit module builds.
While I follow the logic of the suggested fix using $<TARGET_EXISTS:G__>, I am unsure about the recommended implementation path for an end-user. Should I be manually patching my local CMakeLists.txt files to include this logic, or is this fix expected to be merged into the branch I am using?
I was thinking of using a sequential build (-j1) to avoid the race condition and to get past the error. Is this an acceptable approach for my installation, or should I be looking to apply the code-level patch you mentioned? Any guidance on the preferred path forward would be greatly appreciated.
Just clone from git master instead of git latest-stable
Or apply the patch locally yourself.
Or wait till the next release in November.
make -j1 might also work.
I tried the build again with -j1, but the build still fails with the same implicit module build error in core/multiproc. Even when forced to be sequential, the system does not seem to recognize that Net is already built:
[ 60%] Building CXX object net/net/CMakeFiles/Net.dir/src/TS3WebFile.cxx.o
[ 60%] Linking CXX shared library ../../lib/libNet.so
[ 60%] Built target Net
[ 60%] Generating G__MultiProc.cxx, ../../lib/MultiProc.pcm
In file included from input_line_7:10:
/home/iit/ROOT/root_build/include/MPSendRecv.h:18:10: remark: building module 'Net' as '/home/iit/ROOT/root_build/lib/Net.pcm' [-Rmodule-build]
#include "TSocket.h"
^
Error: Building module 'Net' implicitly. If 'Net' requires a
dictionary please specify build dependency: 'G__MultiProc.cxx' depends on 'Net'.
I will try to clone the latest master branch from the ROOT Git repository. I am hoping that the dependency fixes (like the $<TARGET_EXISTS:G__> logic discussed) will allow me to move past the error.
I will attempt the build again from the master branch. If the issue persists there, I will reach back out. Thank you for your assistance.