Problem building root on ubuntu 20.04.3 (WSL2)

Trying to build root and getting the following errors:

[ 79%] Built target RSQLite
/usr/bin/ld: cannot find -lXROOTD_XrdNet_LIBRARY-NOTFOUND
/usr/bin/ld: cannot find -lXROOTD_XrdOuc_LIBRARY-NOTFOUND
/usr/bin/ld: cannot find -lXROOTD_XrdSys_LIBRARY-NOTFOUND
/usr/bin/ld: cannot find -lXROOTD_XrdClient_LIBRARY-NOTFOUND
/usr/bin/ld: cannot find -lXROOTD_Xrd_LIBRARY-NOTFOUND
/usr/bin/ld: cannot find -lXROOTD_XrdNetUtil_LIBRARY-NOTFOUND
collect2: error: ld returned 1 exit status
make[2]: *** [net/netxng/CMakeFiles/NetxNG.dir/build.make:139: lib/] Error 1
make[1]: *** [CMakeFiles/Makefile2:31010: net/netxng/CMakeFiles/NetxNG.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
Scanning dependencies of target G__Imt
[ 79%] Building CXX object core/imt/CMakeFiles/G__Imt.dir/G__Imt.cxx.o
[ 79%] Built target G__Imt
make: *** [Makefile:152: all] Error 2

ROOT Version: v6-26-10
Platform: Ubuntu 20.04.3 (WSL2)
Compiler: gcc 9.3.0

You can try the pre-built package I posted here: Unofficial ROOT 6.26.10 package for Ubuntu 22.04.

Try to configure your ROOT using:
cmake -Dall=ON -Dxrootd=ON -Dbuiltin_xrootd=ON ...
cmake -Dall=ON -Dxrootd=OFF ...

BTW. The ROOT Team provides ready-to-use binary distributions for some systems (see “Download a pre-compiled binary distribution” therein), including various Ubuntu versions, which you just need to download and unpack.

For Ubuntu 20.04 / x86_64 / gcc 9.4:;O=A;P=*[uU][bB][uU][nN][tT][uU]*20*

Thank you very much, the cmake flags for xroot helped.
Thanks for the prebuild suggestions as well.

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