ROOT Installation on MacOS Ventura 13.2

Hi,

I’m trying to download ROOT from source in a new directory on my Mac. I created a new directory /Users/d/ROOT1 and moved into that directory and then executed these commands (as listed on the website):

$ git clone --branch latest-stable --depth=1 https://github.com/root-project/root.git root_src
$ mkdir root_build root_install && cd root_build
$ cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src
$ cmake --build . -- install -j2

I also have MadGraph installed on my computer (/Users/d/MG5_aMC_v3_4_0).

When I run the cmake --build .–install -j2 command, I get this error:

CMake Error at /Users/d/ROOT1/root_build/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-install-Release.cmake:49 (message):
  Command failed: 2

   '/Library/Developer/CommandLineTools/usr/bin/make' 'install'

  See also

    /Users/d/ROOT1/root_build/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-install-*.log


make[2]: *** [AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-install] Error 1
make[1]: *** [CMakeFiles/AFTERIMAGE.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 57%] Built target llvm-tblgen
make: *** [all] Error 2

But when I open the AFTERIMAGE-install-error.log file, I see

rm: /Users/d/ROOT1/root_build/include/libAfterImage/*: No such file or directory
make[3]: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
make[3]: *** [install.static] Error 1

With the “make[3]: /Users/d/MG5_aMC_v3_4_0/install: Permission denied” line repeated several times before the [installl.static] Error 1 line.

I’m still pretty new to ROOT, so I’m not sure what exactly is going wrong. My best guess is that it’s not able to access the MadGraph directory, but I’m not sure why it would need to access MadGraph or how to fix that. I’ve tried running the cmake build command as superuser and adding sudo to the beginning, but it’s still not working.

Any help would be greatly appreciated!!

_ROOT Version:_6.26.10
_Platform:_MacOS 13.2
Compiler: Not Provided


Welcome to the ROOT Forum!

As the error says, you don’t have the permission to install in /Users/d/MG5_aMC_v3_4_0/install. You can install in another place, or, since it’s on MacOS, maybe @couet or @axel can tell how to fix this issue

Thanks for your reply!

I’m still unsure why it’s trying to install in /Users/d/MG5_aMC_v3_4_0/install though. I’m building ROOT in a different folder (/Users/d/ROOT1/root_build), is there some reason it’s trying to access MadGraph?

I think this:

should be:

cmake --build . --target install -- -j2

Hmm, I just tried that and I’m still getting the same error.

Just for my own edification, what’s the difference between the two lines above? What does the ‘–target’ do?

The --target is telling CMake what to build, but you’re right, it should be the same than -- install. Can you try to build ROOT without the install flag, to see if it works?

Just tried to build it without the install flag. I’m still getting the same error message in the terminal and the same errors in the .log file.

Here’s the specific command I executed:

cmake --build . -j2

why not simply make -j2 ?

Okay, I just ran cmake . which worked fine, then make -j2 which gave me the same error I’ve been getting.

I don’t understand what’s the relationship between MadGraph and libAfterImage, and I don’t really know how to debug this…

I do not understand either why having MadGraph on your mac should interfere with the root install. libafterimage is part of ROOT, and I think the default is to use built-in libafterimage but I am not sure. Does MadGraph also install libafteriamge ?

I don’t see any folder called libAfterimage in the MadGraph folder, but I see 2 occurrences of libAfterimage in ROOT1/root_build.

Check the output of: export | grep MG5_aMC_v3_4_0

I ran export | grep MG5_aMC_v3_4_0 and then make -j2. I’m still getting the same error in the terminal. The AFTERIMAGE-install-err.log file’s contents have changed to this now:

rm: /Users/d/ROOT1/root_build/include/libAfterImage/libAfterImage: is a directory
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
make[3]: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
make[3]: *** [install.static] Error 1
make[3]: *** Waiting for unfinished jobs....
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied
/bin/sh: /Users/d/MG5_aMC_v3_4_0/install: Permission denied