Root 6.16 Ubuntu 18.04.1 LTS build failure


_ROOT Version: 6.16
_Platform: Ubuntu 18.04.1 LTS
_Compiler: cmake


Hello all, I’m trying to build Root 6.16 on my ubuntu PC. I’ve installed all prerequisites (including optionals) and used cmake /RootBuild/. I then used ‘cmake --build . – -j4’ (after verifying that my computer had indeed 4 cores). Everything was building until I reached the 72 percentile when my computer froze entirely (even the clock was stuck), forcing me into hard rebooting it. I then tried running the previous command again (cmake --build . – -j4), it built a couple of things before producing an error shortly afterwards:

[ 72%] Linking CXX executable src/rootcling_stage1
[ 72%] Built target MetaCling
[ 72%] Linking CXX shared library …/…/…/lib/libCling.so
…/dictgen/CMakeFiles/Dictgen.dir/src/DictSelectionReader.cxx.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/build.make:223: recipe for target ‘core/rootcling_stage1/src/rootcling_stage1’ failed
make[2]: *** [core/rootcling_stage1/src/rootcling_stage1] Error 1
CMakeFiles/Makefile2:19072: recipe for target ‘core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all’ failed
make[1]: *** [core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
…/…/dictgen/CMakeFiles/Dictgen.dir/src/DictSelectionReader.cxx.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
core/metacling/src/CMakeFiles/Cling.dir/build.make:211: recipe for target ‘lib/libCling.so’ failed
make[2]: *** [lib/libCling.so] Error 1
CMakeFiles/Makefile2:17668: recipe for target ‘core/metacling/src/CMakeFiles/Cling.dir/all’ failed
make[1]: *** [core/metacling/src/CMakeFiles/Cling.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

Is there someway for me to fix this ?

Cheers,
Matei

Do you have at least 8 GB RAM (2 GB x number of “parallels”)?

Try with cmake --build . -- -j1. Linking rootcling and libCling require a lot of memory to do in parallel.

I only have 6 GB RAM (3 x 2)

I’ve tried that, it fails as follows:

[ 46%] Built target ClingUtils
[ 46%] Built target LLVMRES
[ 46%] Built target Dictgen
[ 46%] Linking CXX executable src/rootcling_stage1
…/dictgen/CMakeFiles/Dictgen.dir/src/DictSelectionReader.cxx.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/build.make:223: recipe for target ‘core/rootcling_stage1/src/rootcling_stage1’ failed
make[2]: *** [core/rootcling_stage1/src/rootcling_stage1] Error 1
CMakeFiles/Makefile2:19072: recipe for target ‘core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all’ failed
make[1]: *** [core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

Try to destroy everything and start with “-j1” from scratch again.

This file:

is broken. Usually gmake removes it in case of build errors, but in your case something severe happened: power cut, file system broken etc. Just remove it and try again!

cmake --build . – -j1 worked, I can now launch ROOT after sourcing it. Thank you all for your help and have a nice day.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.