Skip to content

Installing on MAC notes

christian2nguyen edited this page Jun 3, 2021 · 12 revisions

my Current OS: MacOS Big Sur version 11.3.1

The easiest method (for me) to install/upgrade root was -> brew install root And to upgrade root brew upgrade root

When trying to compile PlotUtils, the code couldn't find the Headers. error output something like ->

fatal error:‘stdlib.h’ when running make install for Mac

my solution was to

xcode —-install

pushd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ sudo ln -s MacOSX.sdk MacOSX10.14.sdk popd

set up paths for root for my local machine when opening a new terminal: source /usr/local/bin/thisroot.sh

Update gethub: git pull origin main

For USB stick: to Access the files on Mac they are located in the directory of /Volumes

IF you opening a root file using root -l filename.root and your not seeing anything it may be you need to add this file to your directory where you using root commands

vim .rootlogon.C then put in it { if( gSystem->Getenv("PLOTUTILSROOT") ) { gInterpreter->AddIncludePath( gSystem->ExpandPathName("$PLOTUTILSROOT") ); string newpath = string(gROOT->GetMacroPath()) + ":" + string(gSystem->ExpandPathName("$PLOTUTILSROOT")) + "/PlotUtils"; gROOT->SetMacroPath( newpath.c_str() ); //gSystem->Load( "libCintex.so" ); // needed to process the dictionaries for the objects //Cintex::Enable(); gSystem->Load( gSystem->ExpandPathName("$PLOTUTILSROOT/libPlotUtils.so") ); gInterpreter->ExecuteMacro("PlotStyle.C"); } }