HowTo install ROOT on OSX Mavericks?

Dear ROOT-experts,

I’m very new in ROOT. I use a Mac with OSX Mavericks. I would like to install ROOT.

I’ve tried this manual, but it doesn’t work:
https://thismodernphysics.wordpress.com/2014/01/16/installing-root-on-mac-10-9/

The installation of the first few things seems not working probably. I used the binary from here: https://root.cern.ch/drupal/content/production-version-534

Could you be so kind and help me with installing? Xcode and Command Line Dev tools are on my machine.

Sincerely
Felix

Hi Filex

In my experience running ROOT on Mac OSX, its best to just compile root from source code. Since you already have Xcode and Command Line Dev tools, you are already set ( I assume you also have XQuartz 2.7.7 installed xquartz.macosforge.org/landing/)

Just download the source code for ROOT 6.02/08 (or ROOT 5.34/30) and unzip

$ gunzip   root_v6.02.08.source.tar.gz 
$ tar xvf  root_v6.02.08.source.tar.gz

then go into the directory just extracted and configure and compile. Don’t bother about how many core your machine has, just go with the standard “make”

$ cd root-6.02.08 
$ ./configure macosx64 
$ make 

Wait for 15 - 30 mins and you are done (Unless tons of error then post them here and other will help figure it out). Now keep track of the absolute path of your root-6.02.08 folder. I presume you download root_v6.02.08.source.tar.gz into your ~/Downloads folder, so the path to your compiled ROOT is ~/Download/root-6.02.08

Now open up your .profile file and add the following line anywhere you want

source ~/Downloads/root_v6.02.08/bin/thisroot.sh

Open a new terminal and start using root.

Hi,

many thanks for your answer. I will try it.

Is there no other possibility, because I didn’t like XQuartz?

What does it mean “Open a new terminal and start using ROOT.”? On the lab computers there is an icon on desktop. I click on it and then root starts with a new terminal window. Automatically.

What is the Code to use/start ROOT from Terminal on Mac?

I’m really new in ROOT. Please, don’t be angry about my… :wink:

Sorry for spelling your name wrong Felix :slight_smile:

(1) I think you need XQuartz installed to compile ROOT (definitely for ROOT 5), but you don’t need to use XQuartz when running ROOT. Probably it need some library/header files that XQuartz provides during compilation. I know XQuartz does not fit 100% into Mac OSX, but its necessary to run various programs.

(2) I’m a little surprise that you haven’t use the Terminal much, but if you have ROOT compiled and set up like I have described, when you start the Terminal, just type

root 

Hi,

I didn’t recognize this “mistake”. Doesn’t matter!

Ok, I will try it during weekend. Your step-by-step manual works also for the new ROOT 6?
RooFIT / fitting options are available after I followed your HowTo?

I’ve heard, there is a macro or something like that, that provides easy fitting by clicking “f” for fit, “u” for unzoom etc.? There is also available a “right click” on histogram for sub menu with functions like rebin, unzoom, fit panel etc.?
Is this installed after compiling or what do I need for it?

Greetings
Felix

PS: Perhaps, somebody find or know a way without XQuartz? Otherwise, I install it…

[quote=“felix93”]

PS: Perhaps, somebody find or know a way without XQuartz? Otherwise, I install it…[/quote]

By default (== you do not use options disabling cocoa back-end or enabling X11 support) ROOT on OS X does not require XQuartz and it’ll be built with a native Cocoa-based back-end (this is true for the latest ROOT 6/ROOT 5.32 releases).

Thanks. And what advantages / disadvantages do I have with XQuartz?

How do you installed ROOT without XQuartz? Can you give a step by step manual, or it is the same as we see above?

Hmm, are these words yours?

Is there no other possibility, because I didn’t like XQuartz?

So you probably already know why you do not like XQuartz?
With XQuartz you’re running X-server as a separate process and using X11 back-end with a typical X11 graphics and quite standard X11-like behavior/WM-manager.

Without XQuartz … you do not install XQuartz and run ROOT with a native back-end.
Native (Cocoa) back-end has some pros and cons. It has a superior graphics with anti-aliasing, transparency, gradients, retina-display support, etc.
It’s different, since now you do not have X-server and everything works in the same process.
While it tries to be as close as possible to X11-version, it’s not X11 and can not be (and was not intended to be X11 implementation). It works locally (no ssh -Y from remote machine etc.).
It was developed by one developer (me), while XQuartz is being developed by a team of experts (talk about optimizations and quality/reliability).

It’s up to you to decide what do you really need.

[quote=“felix93”]
How do you installed ROOT without XQuartz? Can you give a step by step manual, or it is the same as we see above?[/quote]

download/git clone the source tree
./configure
make [-jNprocessors_to_use] (for example, make -j8).
That’s all.

[quote=“useROOT”]Hi Filex

In my experience running ROOT on Mac OSX, its best to just compile root from source code. Since you already have Xcode and Command Line Dev tools, you are already set ( I assume you also have XQuartz 2.7.7 installed xquartz.macosforge.org/landing/)

Just download the source code for ROOT 6.02/08 (or ROOT 5.34/30) and unzip

$ gunzip   root_v6.02.08.source.tar.gz 
$ tar xvf  root_v6.02.08.source.tar.gz

then go into the directory just extracted and configure and compile. Don’t bother about how many core your machine has, just go with the standard “make”

$ cd root-6.02.08 
$ ./configure macosx64 
$ make 

Wait for 15 - 30 mins and you are done (Unless tons of error then post them here and other will help figure it out). Now keep track of the absolute path of your root-6.02.08 folder. I presume you download root_v6.02.08.source.tar.gz into your ~/Downloads folder, so the path to your compiled ROOT is ~/Download/root-6.02.08

Now open up your .profile file and add the following line anywhere you want

source ~/Downloads/root_v6.02.08/bin/thisroot.sh

Open a new terminal and start using root.[/quote]

Hi useRoot,

I am getting the following error each time.Any help would be appreciated.it says 20 errors.

/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error:
expected ‘;’ after @class
@class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error:
cannot find protocol declaration for ‘ObjectType’
@class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error:
cannot find protocol declaration for ‘ObjectType’
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error:
expected unqualified-id
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:13: error:
expected ‘)’

  • (nullable ObjectType)nextObject;
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:3: note:
    to match this ‘(’
  • (nullable ObjectType)nextObject;
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error:
    cannot find protocol declaration for ‘ObjectType’
    @interface NSEnumerator (NSExtendedEnumerator)
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error:
    duplicate interface definition for class ‘NSEnumerator’
    @interface NSEnumerator (NSExtendedEnumerator)
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note:
    previous definition is here
    @interface NSEnumerator : NSObject
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error:
    method type specifier must start with ‘-’ or ‘+’
    @interface NSEnumerator (NSExtendedEnumerator)
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error:
    expected a type
    @interface NSEnumerator (NSExtendedEnumerator)
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error:
    expected selector for Objective-C method
    @property (readonly, copy) NSArray *allObjects;
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:36: error:
    cannot find protocol declaration for ‘ObjectType’
    @property (readonly, copy) NSArray *allObjects;
    ^
    In file included from /Users/Ali/root-6.06.00/core/macosx/src/CocoaUtils.mm:12:
    In file included from include/CocoaUtils.h:18:
    In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:32: error:
    cannot find protocol declaration for ‘ObjectType’
    @interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMuta…
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:44: error:
    expected unqualified-id
    @interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMuta…
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:19:4: error:
    expected a type
  • (ObjectType)objectAtIndex:(NSUInteger)index;
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:40: error:
    C++ requires a type specifier for all declarations
  • (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUI…
    ^~~~
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:40: error:
    expected ‘)’
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:33: note:
    to match this ‘(’
  • (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUI…
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:20: error:
    cannot find protocol declaration for ‘ObjectType’
    @interface NSArray (NSExtendedArray)
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:1: error:
    duplicate interface definition for class ‘NSArray’
    @interface NSArray (NSExtendedArray)
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:12: note:
    previous definition is here
    @interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMuta…
    ^
    /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:32: error:
    method type specifier must start with ‘-’ or ‘+’
    @interface NSArray (NSExtendedArray)
    ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make: *** [core/macosx/src/CocoaUtils.o] Error 1

Can you please follow the instructions in root.cern.ch/build-prerequisites#macosx are also fulfilled, in particular the installation of the command line tools.