Undefined reference to symbol 'strlcpy'

ROOT Version: 6.24.99
Platform: CentOS 8 (Linux-4.18.0-240.10.1.el8_3.x86_64)
Compiler: gcc (GCC) 8.3.1

Dear experts,

I’m building ROOT on CentOS8 (HPC) as described here and while this

cmake -DCMAKE_INSTALL_PREFIX=…/root_install …/root_src

works, when I run

cmake --build . – install

I get (process at more than 70% completion)

/usr/bin/ld: ../../dictgen/CMakeFiles/Dictgen.dir/src/rootcling_impl.cxx.o: undefined reference to symbol 'strlcpy'
//opt/slurm/current/lib/libslurmfull.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [core/metacling/src/CMakeFiles/Cling.dir/build.make:215: lib/libCling.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:26924: core/metacling/src/CMakeFiles/Cling.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 76%] Built target G__RIO
[ 76%] **Linking CXX shared library ../../../../lib/libcppyy2_7.so**
[ 76%] **Linking CXX shared library ../../../../lib/libcppyy3_9.so**
[ 76%] Built target cppyy2_7
[ 76%] Built target cppyy3_9
gmake: *** [Makefile:172: all] Error 2

I built it the same way some time ago and it worked for a while, but I wanted to build it again in Debug mode and now it doesn’t work anymore.

Thank you for your help

Can you share the output of make VERBOSE=1 - i.e. the invocation of g++ that tries to link ib/libCling.so?

Dear @Axel, thank you for the support. I managed to solve the issue by purging all the loaded modules and building ROOT again from a clean environment. The problem was therefore caused by one or more of them, could be an unsupported CMake/GCC/Python/OpenMPI version.

Thank you

1 Like

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