'collect2: error: ld returned 1 exit status' message when I try to build root with -j4

_ROOT Version: 6.22.06
_Platform: Ubuntu LTS
_Compiler: gcc 9.3.0

My laptop turned off because of an accident when it was at 74% after ‘make -j 4’ command while I was building ROOT from source. When I initialized my laptop and run ‘make -j 4’ again I got the next error:

/usr/bin/ld: TTabCom.cxx:(.text.unlikely+0xdd5): referencia a TString::~TString()' sin definir ... /usr/bin/ld: TTabCom.cxx:(.text.unlikely+0xdd5): referencia a TString::~TString()’ sin definir
/usr/bin/ld: CMakeFiles/Rint.dir/src/TTabCom.cxx.o: en la función _GLOBAL__sub_I_TTabCom.cxx': TTabCom.cxx:(.text.startup+0x15): referencia a TVersionCheck::TVersionCheck(int)’ sin definir
/usr/bin/ld: TTabCom.cxx:(.text.startup+0x42): referencia a ROOT::GenerateInitInstance(TTabCom const*)' sin definir /usr/bin/ld: TTabCom.cxx:(.text.startup+0x5a): referencia a ROOT::TGenericClassInfo::SetImplFile(char const*, int)’ sin definir
/usr/bin/ld: CMakeFiles/Rint.dir/src/TTabCom.cxx.o:(.data.rel.ro._ZTV7TTabCom[_ZTV7TTabCom]+0x38): referencia a `TTabCom::Streamer(TBuffer&)’ sin definir
collect2: error: ld returned 1 exit status
make[2]: *** [core/rint/CMakeFiles/Rint.dir/build.make:102: lib/libRint.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:19164: core/rint/CMakeFiles/Rint.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

If the build was incomplete, some files might be corrupted, so I would just delete the files causing an error and start again (otherwise just re-start from scratch)

Hi @fer-tofe ,
slightly off-topic but in case it helps: note that unless you have very specific needs you don’t need to compile ROOT from scratch, you can install a pre-compiled binary, or install ROOT via conda or snap (in particular on Ubuntu snap is really easy to use, see this blog post). See https://root.cern/install for an overview of different installation methods.


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