Canvas does not show up in OSX 10.8 with XQuartz 2.7.2?


I’ve made a clean install of Mountain Lion this week and added XQuartz 2.7.2, XCode 4.4 and command line tools.

Now, the compilation of the ROOT 5.34.01 works fine with:

./configure macosx --enable-python --prefix=/usr/local/root make -I/opt/X11/include -j2 make install . /usr/local/root/bin/

Everything seems to be fine. The splash screen opens if I run the interactive ROOT session:

However, any attempt to crate a Canvas or Draw histograms essentially does nothing: no window is created!
The output is following:

[code] *******************************************

  •                                     *
  •    W E L C O M E  to  R O O T       *
  •                                     *
  • Version 5.34/01 13 July 2012 *
  •                                     *
  • You are welcome to visit our Web site *
  •            *
  •                                     *

ROOT 5.34/01 (branches/v5-34-00-patches@45034, Aug 02 2012, 09:13:00 on macosx)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] c = TCanvas()
Warning in TCanvas::ResizePad: c1 width changed from 0 to 10

Warning in TCanvas::ResizePad: c1 height changed from 0 to 10

(class TCanvas)2040065024[/code]

What am I doing wrong?

Try to check here in a forum, somebody had this problem on Mac OS X 10.8 a week or two ago - I think,
the problem was with “DISPLAY” environment variable, if it’s not set, gROOT switches into a batch mode.

I think, it’s clear what happened.
I believe it’s a result of a long standing problem in ROOT configuration.
The ROOT’s “etcdir” subdirectory does not exist (i.e. check if the “/etc/root” subdirectory exists), or if it exists its contents is “improper”.
Build your ROOT from scratch using:
./configure macosx --enable-python --prefix=/usr/local/root --etcdir=/usr/local/root/etc/root
Or … use your current build but execute (note however, that the ROOT’s “etcdir” will be “/etc/root” and everything in there will be overwritten -> that’s why you need “root” privileges when you install ROOT):
sudo make install

[quote=“Pepe Le Pew”]I think, it’s clear what happened.
I believe it’s a result of a long standing problem in ROOT configuration.


I was asking about the configure output, because I’m aware about some modification we made this week
in both trunk and 5-34 specially for Mac OS X 8. At some point I was afraid, the problem is in this modification. I’m happy it’s not.

I can’t say if your recent modifications trigger such problem, but I am 100% sure that if the ROOT’s “etcdir” is missing, you will get exactly this what is described in the first post, probably on any system (i.e. at least on Linux).
Let’s wait for the guy to check the existence of the “/etc/root” subdirectory.
If the subdirectory is there and contains “fresh” ROOT’s stuff, then it’s not what I guessed and one needs the part of the contents of the “config.log” file (somewhere near its end) which begins with “Result: Enabled support for …”.

BTW. Note that the guy says that the “splash screen opens”, so the “DISPLAY” environment variable should be fine.

Another strange question is … why does one need to add “-I/opt/X11/include” when running make (can this create a misbehaving executable?)? Shouldn’t all required flags be properly set internally by the configure script?


Thanks for all the answers. @pepe solution worked out: the problem was in the /etc/root folder.

Sincerely, Samvel.