I’m getting a similar error when rebuilding root:
In file included from include/TGX11TTF.h:30:
include/TGX11.h:31:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
I am on Mac OS X 10.9.2 and I was able to build root once after I updated to Maverick. But recently I updated my port (via command ‘sudo port selfupdate’ followed by ‘port upgrade outdated’). As a result of this recent update, my previously built root stopped working due to failing to find some library (I think the update removed some library; unfortunately can’t recall what that was). So I attempted to re-configure root (ran ./configure, no options). Now in the config print out, it notes this:
Checking for libX11 ... /opt/local/lib
Checking for X11/Xlib.h ... /opt/local/include
Checking for X11/xpm.h ... /opt/local/include
Checking for X11/Xft/Xft.h ... /opt/local/include
Checking for X11/extensions/shape.h ... /opt/local/include
Checking for libXpm ... /opt/local/lib
Checking for libXft ... /opt/local/lib
Checking for libXext ... /opt/local/lib
So clearly from the configure log, it has no problem finding where this header is and I verified it, that that header in question is there.
$ ls -l /opt/local/include/X11/Xlib.h
-rw-r--r-- 1 root admin 99819 Oct 30 22:42 /opt/local/include/X11/Xlib.h
So the question is, why is the makefile (presumably generated from this ./configure) still failing when clearly the configure found the header?
So this is the compilation line that failed:
bin/rmkdepend -R -fgraf2d/x11ttf/src/TGX11TTF.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -stdlib=libc++ -pthread -I/usr/X11R6/include -I/Users/jade/anaconda/include/freetype2 -I/Users/jade/anaconda/include -D__cplusplus -- /Users/jade/root/graf2d/x11ttf/src/TGX11TTF.cxx
clang++ -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -stdlib=libc++ -pthread -I/usr/X11R6/include -I/Users/jade/anaconda/include/freetype2 -I/Users/jade/anaconda/include -o graf2d/x11ttf/src/TGX11TTF.o -c /Users/jade/root/graf2d/x11ttf/src/TGX11TTF.cxx
In file included from /Users/jade/root/graf2d/x11ttf/src/TGX11TTF.cxx:28:
In file included from include/TGX11TTF.h:30:
include/TGX11.h:31:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^
So in that compilation line, why am I not finding -I/opt/local/include( exactly where the configure found X11 to be)?!
Instead, it has:
-I/usr/X11R6/include
While I do have this:
$ ls -l /usr
total 8
drwxr-xr-x 5 root wheel 170 Aug 25 2013 X11
lrwxr-xr-x 1 root wheel 3 Oct 26 11:15 X11R6 -> X11
drwxr-xr-x 1040 root wheel 35360 Feb 26 21:21 bin
drwxr-xr-x 253 root wheel 8602 Oct 26 12:51 include
drwxr-xr-x 268 root wheel 9112 Feb 26 21:21 lib
drwxr-xr-x 166 root wheel 5644 Feb 26 21:21 libexec
drwxr-xr-x 6 root wheel 204 Oct 26 11:19 local
drwxr-xr-x 242 root wheel 8228 Feb 26 21:21 sbin
drwxr-xr-x 41 root wheel 1394 Oct 26 12:52 share
drwxr-xr-x 4 root wheel 136 Oct 26 11:07 standalone
where X11R6 is a link to X11, that X11 subdirectory does not have an include subdirectory:
$ ls -l /usr/X11R6/include
ls: /usr/X11R6/include: No such file or directory
$ ls -l /usr/X11/include
ls: /usr/X11/include: No such file or directory
ls -l /usr/X11
total 0
drwxr-xr-x 125 root wheel 4250 Oct 26 11:15 bin
drwxr-xr-x 88 root wheel 2992 Aug 25 2013 lib
drwxr-xr-x 3 root wheel 102 Aug 25 2013 libexec
So why is the makefile including a path that is clearly not there and not including the correct path for X11 includes that the configure found? Why is the makefile inconsistent to the findings of configure?