4

I am installing muPDF.

I gave an input like make prefix=/usr/local install in terminal

I have installed XQuartz already

But I get an error as follows

In file included from thirdparty/glfw/src/context.c:28:
In file included from thirdparty/glfw/src/internal.h:85:
thirdparty/glfw/src/x11_platform.h:35:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
     ^
Akshay Hazari
  • 3,186
  • 4
  • 48
  • 84

3 Answers3

4
  make XCFLAGS=-I/opt/X11/include XLIBS=-L/opt/X11/lib 
Dean Wong
  • 116
  • 4
1

I'm on Mac OS X 10.9;

The makefile looks for X11 headers into /usr/local/include/X11 instead of /opt/X11/include/X11

The quick fix is a symlink

$ sudo ln -s /opt/X11/include/X11 /usr/local/include/X11

You may also need this further fix for OpenGL headers

$ sudo ln -s /opt/X11/include/GL /usr/local/include/GL

Probably exists a more elegant solution by specifying headers location when invoking make but I couldn't find a way to do that.

Paolo
  • 15,233
  • 27
  • 70
  • 91
  • Like adding -I/opt/X11/include/ to one of the CFLAGS or similar variables ... I'd expect to need a similar -L flag added to LDFLAGS or LIBS variables. – technosaurus Aug 22 '16 at 13:48
0

The best solution for now is to use the X11 mupdf (and disable the openGL one):

make HAVE_GLFW=no
JosephH
  • 37,173
  • 19
  • 130
  • 154