How can I get gdk-x11-3.0 on OS X? Building an application from source (yikes), I get this on cmake:

-- checking for module 'gdk-x11-3.0'
--   package 'gdk-x11-3.0' not found
CMake Error at /usr/local/Cellar/cmake/3.3.1/share/cmake/Modules/FindPkgConfig.cmake:340 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.3.1/share/cmake/Modules/FindPkgConfig.cmake:502 (_pkg_check_modules_internal)
  src/CMakeLists.txt:12 (pkg_check_modules)


-- Configuring incomplete, errors occurred!


I have already homebrew install gtk+3 and a bunch of other things that came to mind (and were listed as dependencies), so I have no idea what this is and where I can get it, or if it is, indeed, missing.

Any help would be appreciated.



Config and Steps Taken


brew doctor is clean: Your system is ready to brew.
homebrew is upgraded and updated
I am running OS X 10.10.5


Brew's got:

atk 2.16.0
atkmm 2.22.7
autoconf 2.69
automake 1.14.1 1.15
bison 3.0.4
boost 1.58.0
brew-cask 0.53.3 0.54.0 0.54.1 0.56.0
cabextract 1.5 1.6
cairo 1.14.2 1.14.2_1
cairomm 1.11.2_1
cloog 0.18.1 0.18.3
cloog-ppl015 0.15.11
cmake 3.3.1
ctags 5.8 5.8_1
ffmpeg 2.6.3 2.7.1 2.7.2 2.7.2_1
fontconfig 2.11.1
freetype 2.5.5 2.6 2.6_1
gcc 4.9.2_1 5.1.0 5.2.0
gcc46 4.6.4
gd 2.1.1
gdbm 1.11
gdk-pixbuf 2.30.8
gettext 0.19.4 0.19.5.1
ghostscript 9.15 9.16
git 2.2.1 2.3.6 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1 2.5.2
glib 2.44.0 2.44.1
glib-networking 2.44.0
glibmm 2.44.0
gmp 6.0.0a
gmp4 4.3.2
gnutls 3.3.17.1
gobject-introspection 1.44.0
gsettings-desktop-schemas 3.16.1
gst-plugins-bad 1.4.5
gst-plugins-base 1.4.5
gst-plugins-good 1.4.5
gst-plugins-ugly 1.4.5_1
gstreamer 1.4.5
gtk+ 2.24.28_2
gtk+3 3.16.6
gtk-mac-integration 2.0.8
gtkmm 2.24.4_1
gtkmm3 3.16.0
harfbuzz 1.0.3
hicolor-icon-theme 0.15
icu4c 55.1
isl 0.12.2 0.14.1
jasper 1.900.1
jbig2dec 0.12
jpeg 8d
lame 3.99.5
libepoxy 1.3.1
libffi 3.0.13
libgee 0.16.0
libgpg-error 1.13 1.17 1.19 1.20 1.20_1
libgphoto2 2.5.7 2.5.8
libicns 0.8.1_1
libksba 1.3.0 1.3.3
libmpc 1.0.3
libmpc08 0.8.1
libpng 1.6.17 1.6.18
libsigc++ 2.4.1
libsoup 2.50.0
libtasn1 4.5
libtiff 4.0.3 4.0.4
libtool 2.4.2 2.4.6
libusb 1.0.19
libusb-compat 0.1.5
libvo-aacenc 0.1.3
libyaml 0.1.6 0.1.6_1
little-cms2 2.7
makedepend 1.0.5
mpfr 3.1.2-p11 3.1.3
mpfr2 2.4.2
nettle 2.7.1
node 0.12.7 0.12.7_1
openjpeg 1.5.2_1
openssl 1.0.1g 1.0.1j_1 1.0.2a-1 1.0.2c 1.0.2d 1.0.2d_1
p7zip 9.20.1
pandoc 1.13.2 1.13.2.1 1.14 1.14.0.2 1.14.0.4 1.15.0.4 1.15.0.5 1.15.0.6
pandoc-citeproc 0.6 0.7.0.1_1 0.7.1.1 0.7.2 0.7.3
pango 1.36.8_2
pangomm 2.36.0
pcre 8.36 8.37
pixman 0.32.6
pkg-config 0.28
poppler 0.35.0
ppl011 0.11 0.11_1
py2cairo 1.10.0_1
pygobject 2.28.6
pygtk 2.24.0_1
python 2.7.10_2
qt 4.8.7
readline 6.3.6 6.3.8
ruby 2.2.0 2.2.2 2.2.3
sane-backends 1.0.24_1
sqlite 3.8.11.1
tcl-tk 8.6.4
tree 1.7.0
unrar 5.2.6 5.2.7
vala 0.28.1
wine 1.6.2
winetricks 20150316 20150416 20150706 20150810
x264 r2533 r2555
xvid 1.3.3 1.3.4
xz 5.2.1
Short answer

I think the problem here is that a lot of homebrew packages don't include X11 support by default if there is a more relevant (i.e. OS X specific) backend available. But PDFPC is looking for the X11 backend for GDK.

Long answer

GDK is distributed as part of GTK+ and if you look at the formula for GTK+3 it explicitly disables the X11 backend.

args = %W[
  --disable-debug
  --disable-dependency-tracking
  --prefix=#{prefix}
  --disable-glibtest
  --enable-introspection=yes
  --disable-schemas-compile
  --enable-quartz-backend
  --disable-x11-backend
]


You could edit the formula to include the x11 backend and then run brew install --build-from-source --verbose gtk+3, but then the build fails before it even gets to the compile stage.

configure: error: Package requirements (atk atk-bridge-2.0) were not met:

No package 'atk-bridge-2.0' found


So you can then add `depends_on "at-spi2-atk" to the GTK+3 formula to get homebrew to install that package, and now GTK+3 gets through the configure stage and starts build. Unfortunately it then fails with errors because by default Cairo isn't installed with the X11 backend.

In file included from gdkapplaunchcontext-x11.c:27:
../../gdk/x11/gdkprivate-x11.h:46:10: fatal errorIn file included from gdkdevice-core-x11.c:In file included from 26gdkasync.c::
47:
../../gdk/x11/gdkprivate-x11.h:../../gdk/x11/gdkprivate-x11.h46::4610::10 :fatal error : fatal error'cairo-xlib.h' file not found
In file included from gdkcursor-x11.c:33:
../../gdk/x11/gdkprivate-x11.h:46:10: fatal error: 'cairo-xlib.h' file not found
#include &lt;cairo-xlib.h&gt;
         ^
#include &lt;cairo-xlib.h&gt;
         ^
: 'cairo-xlib.h' file not found
#include &lt;cairo-xlib.h&gt;
         ^
: 'cairo-xlib.h' file not found
#include &lt;cairo-xlib.h&gt;
         ^
1 error1 error generated.
1 error generated.


So then you can remove cairo and reinstall it with the X11 backend option.

brew remove cairo
brew install --with-x11 cairo


But now it fails with problems in libepoxy.

In file included from gdkdisplay-x11.c:40:
./gdkglcontext-x11.h:28:10: fatal error: 'epoxy/glx.h' file not found
#include &lt;epoxy/glx.h&gt;
         ^
  CC       gdkglcontext-x11.lo
1 error generated.
make[3]: *** [gdkdisplay-x11.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from gdkglcontext-x11.c:23:
./gdkglcontext-x11.h:28:10: fatal error: 'epoxy/glx.h' file not found
#include &lt;epoxy/glx.h&gt;
         ^
1 error generated.
make[3]: *** [gdkglcontext-x11.lo] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1


This is because the author of libepoxy dropped support for GLX on OS X back a few months ago.


  Another big change is that OSX drops GLX support. I had had
  near-universal complaints about including it, and its seems like X on
  OSX is really not used these days (The lack of activity on its X
  server makes that pretty obvious).


And this is where I throw in the towel. :)