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

**URL:** <https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688>\
**Category:** ROOT\
**Created:** [August 2, 2012, 2:43pm UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688 "2012-08-02T14:43:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksamdev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksamdev/32/11265_2.png) [@ksamdev](https://root-forum.cern.ch/u/ksamdev)\
**Post date:** [August 2, 2012, 2:43pm UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688/1 "2012-08-02T14:43:59Z")

</div>

Hi,

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/thisroot.sh`

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

```auto

```

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 \*
- 

```
     http://root.cern.ch *

```

- 

```
                                    *

```

* * *

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?

---

<div class="post-metadata">

**Author:** ![tpochep](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/f05b48/32.png) [@tpochep](https://root-forum.cern.ch/u/tpochep)\
**Post date:** [August 3, 2012, 8:10am UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688/2 "2012-08-03T08:10:19Z")

</div>

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.

> [@Problem setting DISPLAY on Mac OS X 10.8](https://root-forum.cern.ch/t/problem-setting-display-on-mac-os-x-10-8/14639/1):
>
> Hi all, I’m having difficulty with trying to run ROOT on the new Mac OS “Mountain Lion” on my personal machine. I installed XQuartz, then installed ROOT, no problems. Tried to run ROOT and got the message: root: can't figure out DISPLAY, set it manually In case you run a remote ssh session, restart your ssh session with: =========\> ssh -Y Here is what I have tried to set it manually export DISPLAY=/Applications/Utilities/XQuartz.app/Contents/MacOS/X11 That didn’t work. I got a message …

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [August 3, 2012, 8:25am UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688/3 "2012-08-03T08:25:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tpochep](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/f05b48/32.png) [@tpochep](https://root-forum.cern.ch/u/tpochep)\
**Post date:** [August 3, 2012, 8:36am UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688/4 "2012-08-03T08:36:19Z")

</div>

[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.  
[/quote]

Pew,

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.

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [August 3, 2012, 8:53am UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688/5 "2012-08-03T08:53:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ksamdev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksamdev/32/11265_2.png) [@ksamdev](https://root-forum.cern.ch/u/ksamdev)\
**Post date:** [August 3, 2012, 9:22pm UTC](https://root-forum.cern.ch/t/canvas-does-not-show-up-in-osx-10-8-with-xquartz-2-7-2/14688/6 "2012-08-03T21:22:27Z")

</div>

Hi,

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

Sincerely, Samvel.
