I’m having trouble getting ROOT-6 to work on Mac OS 10.10.5 (Yosemite). Specifically, graphics do not display. For example
TBrowser *b = new TBrowser()
executes without error messages but also without bringing up the TBrowser. I am able to at least create an error if I then do
b -> Draw() //inherited from TObject.
The complete stack trace is attached.
Things I’ve tried:
[ul]
[li]Install ROOT from source with cocoa enabled or with X11 enabled[/li]
[li]Reinstall xquartz, reboot[/li]
[li]Setting DISPLAY environment variable to “:0” as well as “localhost:0” (I am doing this locally, no ssh)[/li]
[li]Install ROOT 5/6 from Homebrew[/li]
[li]Install ROOT 6 from MacPorts[/li][/ul]
All of these attempts give the same result. If you want more info about my setup (pretty vanilla), just let me know. Thanks for you help!
Mostly the same results, with a warning instead of a crash when I try and display a window:
I blew away Homebrew’s and MacPort’s versions of ROOT and blew away my old ROOT build directory. Then I followed your instructions. ROOT builds fine with no errors (I have learned to set CPLUS_INCLUDE_PATH to " "). Then:
benjaminfenker:root_build$ ./bin/root
----------------------------------------------------------------
| Welcome to ROOT 6.05/03 http://root.cern.ch |
| (c) 1995-2014, The ROOT Team |
| Built for macosx64 |
| From heads/master@v6-05-02-349-g04c1ad5, Oct 12 2015, 09:29:14 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
----------------------------------------------------------------
Setting up // the only line in my rootlogon.C file
root [0] TBrowser *b = new TBrowser()
(TBrowser *) 0x7fad09e4ea30
root [1] b -> Draw()
Warning in <TCanvas::ResizePad>: c1 width changed from 0 to 10
Warning in <TCanvas::ResizePad>: c1 height changed from 0 to 10
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
So, now there is no error message, but still no window. Hopefully the warnings are helpful? Is there not a way to make things more verbose to get a better idea of what is failing?
Thanks for all your help, but no. I’ve commented out my entire rootlogon.C file except for a cout line to reassure myself that I’m editing the right one.
root[0] TCanvas C
Warning in <TCanvas::ResizePad>: c1 width changed from 0 to 10
Warning in <TCanvas::ResizePad>: c1 width changed from 0 to 10
(TCanvas &) Name: c1 Title c1
root[1] gROOT -> IsBatch()
(Bool_t) false
I haven’t edited my .rootrc file, but I’ve attached it anyways.
The most relevant bits seem to be:
# Settings for X11 behaviour.
X11.Sync: no
X11.FindBestVisual: yes
X11.UseXft: no
X11.XInitThread: yes
# Settings for Cocoa backend.
# The EnableAntiAliasing flag defines if you want to have anti-aliased
# lines/polygon in a canvas/pad. Possible values:
# yes (enable AA), no (disable AA) and auto (use AA only on Retina displays)
Cocoa.EnableAntiAliasing: yes
I am nearly convinced that this is an X11 issue because X11 (XQuartz) does not show up on my menu bar when I start ROOT or when I try and draw something. Getting desperate I tried ssh’ing to see if that worked and, even with ssh -Y, it reports that “X11 forwarding request failed on channel 0,” which I am not used to seeing. I really appreciate all your help. rootrc.txt (32.4 KB)
Ok … that’s really weird in that case. I see you have Xcode 7.0.1 but Mac OS 10.10… Is that version of Xcode not for 10.11 ? … ( just a guess… I must admit i have no much ides of what can go wrong for you … )… I am on Mac with OS X 10.11, Xcode 7.0.1, ROOT 6.05/03 and all works fine.
That’s a good point, I updated my XCode recently but have been resisting upgrading the OS. It is worth a try, but I won’t be able to do it until this evening (I’m in the US).
How did you eventually solve this problem? I’m currently experiencing a similar problem a similar problem, no error message but nothing displaying, I’ve been trying some of the same things with no results.