# Problems compiling on os x 10.9

**URL:** <https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774>\
**Category:** ROOT\
**Created:** [October 21, 2013, 2:24am UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774 "2013-10-21T02:24:40Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 8:39pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/61 "2013-10-24T20:39:05Z")

</div>

Checking for libXpm …  
libraries to check for: [libXpm.so](http://libXpm.so) [libXpm.sl](http://libXpm.sl) libXpm.dylib libXpm.dll.a libXpm.a libXpm.lib libXpm  
Checking in directories /opt/local/lib for [libXpm.so](http://libXpm.so) [libXpm.sl](http://libXpm.sl) libXpm.dylib libXpm.dll.a libXpm.a libXpm.lib libXpm  
Checking for library [libXpm.so](http://libXpm.so) in directory /opt/local/lib  
Checking /opt/local/lib/libXpm.so  
[libXpm.so](http://libXpm.so) not found in /opt/local/lib  
Checking for library [libXpm.sl](http://libXpm.sl) in directory /opt/local/lib  
Checking /opt/local/lib/libXpm.sl  
[libXpm.sl](http://libXpm.sl) not found in /opt/local/lib  
Checking for library libXpm.dylib in directory /opt/local/lib  
Checking /opt/local/lib/libXpm.dylib  
Found file /opt/local/lib/libXpm.dylib  
Checking if /opt/local/lib/libXpm.dylib contains compatible code  
lipo -info /opt/local/lib/libXpm.dylib | grep ’ x86\_64’  
result: 1  
is a compatible library  
Checking if /opt/local/lib/libXpm.dylib is linked against compatible C++ run-time  
otool -L /opt/local/lib/libXpm.dylib | grep libstdc++  
result: 0  
is linked against compatible C++ run-time library

---

<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:** [October 24, 2013, 8:41pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/62 "2013-10-24T20:41:30Z")

</div>

[quote=“unelg”]picnam5a: /Users/ngu/jroot/abc/icons/arrow\_down.xpm  
picnam5b: /Users/ngu/jroot/abc/icons/arrow\_down.xpm 0x7fe84b34e4f0 0  
pic: arrow\_down.xpm  
getting xpms  
picnam3a: /Users/ngu/jroot/abc/icons/arrow\_up.xpm  
picnam3b: /Users/ngu/jroot/abc/icons/arrow\_up.xpm  
picnam5a: /Users/ngu/jroot/abc/icons/arrow\_up.xpm  
picnam5b: /Users/ngu/jroot/abc/icons/arrow\_up.xpm 0x7fe84b34f7d0 0

```auto
 std::cout<<"picnam5b: "<<picnam<< " "<<pic<< " "<< pic->fPic <<std::endl;[/quote]

Ok, thanks! I'd say, this TGPicturePool is quite obviously a very sloppy code: its method was called TWICE with argument "arrow_down.xpm" (or any xpm file - looks like something is broken under the hood with xpms/images)and the first time it returns a valid pointer, but the second time - 0, though it should return 0 the first time already not obscuring and hiding the problem till the next call. I'll investigate why fPic is 0 and let you know later (well, unless somebody else already knows the reason and can help before, also, have a look at previous topics with arrow_*.xpm, may be they already had a recipe).
```

---

<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:** [October 24, 2013, 9:15pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/63 "2013-10-24T21:15:53Z")

</div>

> [@unelg](#):
>
> Checking for libXpm …

What about libAfterImage (I do not know the exact name).  
In my configure.log I can see something like:  
…

`Checking whether to build included libAfterImage
Result: yes`  
…

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 9:27pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/64 "2013-10-24T21:27:42Z")

</div>

I think I don’t have that.  
but config.log says:  
checking whether to build included libAfterImage  
Result: yes

Here it is in the root distro:  
graf2d/asimage/src/libAfterImage

---

<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:** [October 24, 2013, 9:31pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/65 "2013-10-24T21:31:35Z")

</div>

[quote=“unelg”]I think I don’t have that.  
but config.log says:  
checking whether to build included libAfterImage  
Result: yes[/quote]

Good, it’s much better if the problem is not complicated by some external library.

Well, fPic == kNone can actually come from TASImage.  
So, next 🙂 In graf2d/asimage/src/TASImage.cxx, method TASImage::GetPixmap, line number ~ 2212:

`if (x11) {
     ret = .....
   //can you print this 'ret' here?
}`

We’ll have a lot of prints now (I guess so), but it’s ok.

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 9:38pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/66 "2013-10-24T21:38:50Z")

</div>

zero all the time

```auto
Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
  TASI:0
picnam5b: /Users/ngu/jroot/abc/icons/arrow_down.xpm 0x7faa63b6ca20 0
pic: arrow_down.xpm
getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
  TASI:0
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7faa63a6da10 0
pic: arrow_up.xpm
got up xpm
not scaled???
????
got down xpm
```

---

<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:** [October 24, 2013, 9:47pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/67 "2013-10-24T21:47:12Z")

</div>

[quote=“unelg”]zero all the time

```auto
Path: /Users/ngu/icons:/Users/ngu/jroot/abc/icons:.:/Users/ngu/icons:/Users/ngu/jroot/abc/icons:.
picnam: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_down.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_down.xpm
  TASI:0
picnam5b: /Users/ngu/jroot/abc/icons/arrow_down.xpm 0x7faa63b6ca20 0
pic: arrow_down.xpm
getting xpms
picnam3a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam3b: /Users/ngu/jroot/abc/icons/arrow_up.xpm
picnam5a: /Users/ngu/jroot/abc/icons/arrow_up.xpm
  TASI:0
picnam5b: /Users/ngu/jroot/abc/icons/arrow_up.xpm 0x7faa63a6da10 0
pic: arrow_up.xpm
got up xpm
not scaled???
????
got down xpm[/quote]

hmm, it looks like asimage2pixmap _always_ fails.
This function is in graf2d/asimage/src/libAfterImage/ximage.c. Can you either add some printfs there (since it's a C code) or set a breakpoint in asimage2pixmap function (if you have a debug build).
I have to recompile my ROOT now, since it's not an X11 version.
```

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 9:59pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/68 "2013-10-24T21:59:42Z")

</div>

Who defines X\_DISPLAY\_MISSING ?  
I never see “1 b”

```auto
printf ("1\n");
#ifndef X_DISPLAY_MISSING
printf ("1 b\n");
        if( im )
```

---

<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:** [October 24, 2013, 10:01pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/69 "2013-10-24T22:01:55Z")

</div>

[quote=“unelg”]Who defines X\_DISPLAY\_MISSING ?

```auto
printf ("1\n");
#ifndef X_DISPLAY_MISSING
printf ("1 b\n");
        if( im )[/quote]

Is it defined in your case? In my - it's not.
```

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 10:12pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/70 "2013-10-24T22:12:19Z")

</div>

config.h has  
/\* Define to 1 if the X Window System is missing or not being used. \*/  
#define X\_DISPLAY\_MISSING 1

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 10:14pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/71 "2013-10-24T22:14:16Z")

</div>

remove the damn define and finally I got my damn arrow XPM.  
what a waste of time !!!

---

<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:** [October 24, 2013, 10:15pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/72 "2013-10-24T22:15:19Z")

</div>

[quote=“unelg”]config.h has  
/\* Define to 1 if the X Window System is missing or not being used. \*/  
#define X\_DISPLAY\_MISSING 1[/quote]

Aha, this is much better - so none of functions in ximage.c actually works?  
Ha, can you add #undef X\_DISPLAY\_MISSING at the beginning of ximage.c and will it change anything?

---

<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:** [October 24, 2013, 10:17pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/73 "2013-10-24T22:17:06Z")

</div>

[quote=“unelg”]remove the damn define and finally I got my damn arrow XPM.  
what a waste of time !!![/quote]

Yes, you are right, it’s a waste of time, if I had this problem on my mac it would be much faster, it’s quite stupid to “debug in a forum”. Still there is a bug in libAfterImage configuration we can fix so people in future will not have the similar problem on Mac OS and other platforms. While searching on this forum, I found the topic with the same problem and people … were using g++ 2.95 - so you can imagine, how old this bug is.

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 10:24pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/74 "2013-10-24T22:24:02Z")

</div>

graf2d/asimage/src/libAfterImage/configure has a bug to define validity of X,  
or not.  
Remember this thing came up w/ osx 10.9 fresh install.  
Who knows what the guys at cupertino did to X11 standards … They might have moved around  
some files to fool the configure utility…

---

<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:** [October 24, 2013, 10:27pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/75 "2013-10-24T22:27:49Z")

</div>

[quote=“unelg”]graf2d/asimage/src/libAfterImage/configure has a bug to define validity of X,  
or not.  
Remember this thing came up w/ osx 10.9 fresh install.  
Who knows what the guys at cupertino did to X11 standards … They might have moved around  
some files to fool the configure utility…[/quote]

Yes, probably this script has a bug.  
I do not have this problems with 10.9 and other people in this topic did not. Also, when ROOT crashes on linux with the same warning/error message, it can be the similar problem. And I have no idea about your XQuartz installation. For example, I’ve installed XQuartz from the scratch.

---

<div class="post-metadata">

**Author:** ![unelg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/71c47a/32.png) [@unelg](https://root-forum.cern.ch/u/unelg)\
**Post date:** [October 24, 2013, 10:34pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/76 "2013-10-24T22:34:40Z")

</div>

you know what?  
make clean; ./configure ==\> X11 is now defined…  
Where did my bug go? is this real ? or a very very bad nightmare ?

---

<div class="post-metadata">

**Author:** ![SongofHeaven](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@SongofHeaven](https://root-forum.cern.ch/u/SongofHeaven)\
**Post date:** [October 24, 2013, 10:53pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/77 "2013-10-24T22:53:50Z")

</div>

> [@tpochep](#):
>
> [quote=“giakov”]ftp://root.cern.ch/root/root\_v5.34.10.source.tar.gz

I’m afraid this is not what you need to compile (this is not the branch I’ve mentioned in this topic).

Do:  
git clone [root.cern.ch/git/root.git](http://root.cern.ch/git/root.git) any-name-you-want  
cd any-name-you-want  
git checkout -t origin/v5-34-00-patches  
./configure  
make[/quote]  
Hi, all  
I used this method to install root again in my updated mac os x 10.9, finally what i get is a error message below:

> [@](#):
>
> Error: cannot open file “AvailabilityMacros.h” include/RConfig.h:376:  
> Warning: Error occurred during reading source files
> 
> Warning: Error occurred during dictionary source generation
> 
> !!!Removing core/base/src/G\_\_Base1.cxx core/base/src/G\_\_Base1.h !!!
> 
> Error: core/utils/src/rootcint\_tmp: error loading headers…
> 
> make: \*\*\* [core/base/src/G\_\_Base1.cxx] Error 1

but if i do not use the v5-34-00-patches ,i.e. use the default branch, the error message I got is :

> [@](#):
>
> In file included from G\_\_Core.cxx.h:1:  
> In file included from input\_line\_2:1:  
> etc/cling/Interpreter/ValuePrinter.h:11:10: fatal error: ‘string’ file not found  
> #include   
> ^  
> In file included from G\_\_Core.cxx.h:1:  
> input\_line\_4:1:10: fatal error: ‘assert.h’ file not found  
> #include \<assert.h\>  
> ^  
> Error: Error loading the default header files.  
> make: \*\*\* [core/base/src/G\_\_Core.cxx] Error 1

need your help,thanks!

---

<div class="post-metadata">

**Author:** ![remitche](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/f04885/32.png) [@remitche](https://root-forum.cern.ch/u/remitche)\
**Post date:** [October 24, 2013, 11:32pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/78 "2013-10-24T23:32:01Z")

</div>

Hi,

I find the same thing after downloading v5-34-00-patches and trying to compile:

Error: cannot open file “AvailabilityMacros.h” include/RConfig.h:376:  
Warning: Error occurred during reading source files  
Warning: Error occurred during dictionary source generation  
!!!Removing core/base/src/G\_\_Base1.cxx core/base/src/G\_\_Base1.h !!!  
Error: core/utils/src/rootcint\_tmp: error loading headers…  
make: \*\*\* [core/base/src/G\_\_Base1.cxx] Error 1

Any ideas?

Ryan

---

<div class="post-metadata">

**Author:** ![aphecetche](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@aphecetche](https://root-forum.cern.ch/u/aphecetche)\
**Post date:** [October 25, 2013, 8:50am UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/79 "2013-10-25T08:50:50Z")

</div>

Hi all,

I also had some issues with libstd++ and I guess it might be due to an improper install of the XCode command line tools upon initial XCode install.

Could you try “xcode-select --install” and answer yes when prompted to install the command line tools and then retry the root compilation ?

It worked for me (well, at least those “etc/cling/Interpreter/ValuePrinter.h:11:10: fatal error: ‘string’ file not found” messages disappeared).

Regards,

---

<div class="post-metadata">

**Author:** ![dinbach](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@dinbach](https://root-forum.cern.ch/u/dinbach)\
**Post date:** [October 25, 2013, 12:28pm UTC](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/80 "2013-10-25T12:28:08Z")

</div>

[quote=“aphecetche”]Hi all,

I also had some issues with libstd++ and I guess it might be due to an improper install of the XCode command line tools upon initial XCode install.

Could you try “xcode-select --install” and answer yes when prompted to install the command line tools and then retry the root compilation ?

It worked for me (well, at least those “etc/cling/Interpreter/ValuePrinter.h:11:10: fatal error: ‘string’ file not found” messages disappeared).

Regards,[/quote]

Hi,  
I had exactly the same issues with the compilation and the “xcode-select --install” indeed fixed everything.  
Many thanks!

[Previous page](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774.md?page=3)

[Next page](https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774.md?page=5)
