When using homebrew to install graphviz, the script gets to the point of “Making install in tkstubs” and then throws the following fatal error:
In file included from tkStubLib.c:15:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
I have installed XQuartz as X11 has been dropped in Mountain Lion, but I’m unsure if it is installed correctly. The location of Xlib.h is:
/opt/X11/include/X11/Xlib.h
There are also two symlinks to /opt/X11, they are:
/usr/X11
/usr/X11R6
Does this look like the correct setup to you? I’ve never dealt with X11 or XQuartz until yesterday.
Cheers.
You need to tell the
tkstubsbuild (and possibly other bits in the package as well) to look for headers in/opt/X11/include; this is not on the standard include path.Usually this is achieved by passing
-I/opt/X11/includeas an additional compiler flag, the method to do so is however dependent on the build system.For reasonably modern
configurescripts, the best approach is to pass it in the environment variableCPPFLAGS; if the package uses another build system or this doesn’t work for another reason, then you need to look at theMakefilein the build directory.