Error compiling with Ubuntu 20.04.4 LTS

ROOT Version: 6.26.00
Platform: Ubuntu 20.04.4_ARM (virtualized with Parallels from a Mac M1 PRO)
Compiler: gcc(g++) 9.4.0

I just received my new MAC Book PRO with M1 PRO chip and I’m trying to install root on a virtual machine (with Parallels) of Ubuntu 20.04.4 LTS.
I downloaded the source code from:
I need to make this option (needed for the analysis tool we have in lab):

cmake -DCMAKE_INSTALL_PREFIX=/home/cmspix/daq/root-6.26.00/install -DPYTHON_EXECUTABLE=/usr/bin/python3 --enable-minuit2 -DCMAKE_CXX_STANDARD=17 -Ddavix=off ..

Everything seems fine and when I run:

cmake --build . --target install -j4

It start compiling but it stops here:

[ 93%] Built target ProofDraw
make[2]: *** No rule to make target '../roofit/hs3/HistFactory', needed by 'roofit/hs3/G__RooFitHS3.cxx'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:37211: roofit/hs3/CMakeFiles/G__RooFitHS3.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 93%] Built target RooFitRDataFrameHelpers
[ 94%] Built target GeomBuilder
[ 94%] Built target ProofBench
make: *** [Makefile:152: all] Error 2

Do you have some suggestions? What I’m doing wrong?
Thanks for your help and time!


1 Like

Maybe @jonas or @moneta have an idea what could be the issue

had the same issue (on a “real” Linux/64b):

$> make -j8
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/UpperLimitMCSModule.cxx.o
[100%] Linking CXX shared library ../../lib/
[100%] Built target RooStats
make[2]: *** No rule to make target '/tmp/root-6.26.00/roofit/hs3/HistFactory', needed by 'roofit/hs3/G__RooFitHS3.cxx'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:33140: roofit/hs3/CMakeFiles/G__RooFitHS3.dir/all] Error 2

probably a build parallelization issue.

here is my build recipe:

I had to add -Droofit=OFF (building with -j1 is a no-go for me)

Hi, thanks, so you solved using -Droofit option right? But sorry for my stupid questions… is this needed to perform the usual fit in root? If not I can remove it otherwise I need to find a different solution…

Thanks for your time and reply

IIRC, RooFit isn’t used for fitting histograms and such. (it’s for the RooWorkspace and friends.)

If it is just a “missing dependency”, simply try to execute this command several times in a row (and maybe with “-j1” instead of “-j4”):
cmake --build . --target install -k -j4

Update: I added the “-k” make option (which is usually helpful).

I forget how C/C++ build systems are finicky and brittle.

(come to the Go side :P)

I tired several times, also using -j1 and it stoped in different points, for example now at 53% giving always the same error.
Neverthelss doing -Droofit=OFF it worked thanks.
I will try a little bit to see if I will find issues before closing the thread thanks

Hello, thanks for reporting this!

Oh, there is something wrong there. The roofit/hs3/G__RooFitHS3.cxx target should have no dependency on HistFactory.

I have opened a PR to fix this, which will be included in the next patch release [RF] Avoid any dependencies of RooFitHS3 for dictionary generation and update HistFactory::JSONTool interface by guitargeek · Pull Request #10082 · root-project/root · GitHub


1 Like

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