2

I believe I am in dependency hell.

I am trying to get GLFW working. I'm on Linux Mint with Cinnamon. When I try to compile GLFW using these steps, I get the following output:

$ cmake -G "Unix Makefiles"
-- Could NOT find Vulkan (missing:  VULKAN_LIBRARY VULKAN_INCLUDE_DIR) 
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Using X11 for window creation
-- Configuring done
-- Generating done
-- Build files have been written to: ~/Downloads/glfw
$ make
[ 20%] Building C object src/CMakeFiles/glfw.dir/context.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/init.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/input.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/monitor.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/vulkan.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/window.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/x11_init.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/x11_monitor.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/x11_window.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/xkb_unicode.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/linux_joystick.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/posix_time.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/posix_tls.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/glx_context.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/egl_context.c.o
Linking C shared library libglfw.so
[ 20%] Built target glfw
[ 20%] Building C object examples/CMakeFiles/boing.dir/boing.c.o
In file included from ~/Downloads/glfw/examples/boing.c:40:0:
~/Downloads/glfw/include/GLFW/glfw3.h:168:21: fatal error: GL/gl.h: No such file or directory
   #include <GL/gl.h>
                     ^
compilation terminated.
make[2]: *** [examples/CMakeFiles/boing.dir/boing.c.o] Error 1
make[1]: *** [examples/CMakeFiles/boing.dir/all] Error 2
make: *** [all] Error 2

According to this, this has something to do with mesa-common-dev.

When I try to install mesa-common-dev, I get this output:

$ sudo apt-get install mesa-common-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 mesa-common-dev : Depends: libdrm-dev (>= 2.4.52) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Apparently this has something to do with this bug in Linux Mint. According to this answer, the solution is to continue trying to install dependencies until you run out and find the missing one.

Tried that. Here's the final large command and its output:

$ sudo apt-get install build-essential libevent-pthreads-2.0.5 doxygen xorg-dev libglu1-mesa-dev xserver-xorg-dev mesa-common-dev libdrm-dev libdrm2="2.4.64-1~ubuntu14.04.1" libdrm-intel1="2.4.64-1~ubuntu14.04.1" libdrm-nouveau2="2.4.64-1~ubuntu14.04.1" libdrm-radeon1="2.4.64-1~ubuntu14.04.1" libgbm1 libdrm2:i386="2.4.64-1~ubuntu14.04.1"
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libevent-pthreads-2.0-5' for regex 'libevent-pthreads-2.0.5'
build-essential is already the newest version.
libgbm1 is already the newest version.
The following packages were automatically installed and are no longer required:
  cheese-common gnome-video-effects
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libdmx-dev libdrm-amdgpu1 libegl1-mesa libevent-core-2.0-5 libfontenc-dev
  libfs-dev libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx
  libgl1-mesa-glx:i386 libglapi-mesa libglapi-mesa:i386 libgles2-mesa
  libllvm3.4 libmirclient-dev libmirclient7 libmirclientplatform-mesa
  libmirprotobuf-dev libmirprotobuf0 libpciaccess-dev libwayland-egl1-mesa
  libx11-xcb-dev libxaw7-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev
  libxcb-present-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxfont-dev libxkbfile-dev libxmu-dev libxmu-headers
  libxmuu-dev libxres-dev libxshmfence-dev libxss-dev libxtst-dev libxv-dev
  libxvmc-dev libxxf86dga-dev libxxf86vm-dev mircommon-dev
  x11proto-bigreqs-dev x11proto-dmx-dev x11proto-dri2-dev x11proto-dri3-dev
  x11proto-fonts-dev x11proto-gl-dev x11proto-present-dev x11proto-record-dev
  x11proto-resource-dev x11proto-scrnsaver-dev x11proto-video-dev
  x11proto-xcmisc-dev x11proto-xf86bigfont-dev x11proto-xf86dga-dev
  x11proto-xf86dri-dev x11proto-xf86vidmode-dev xserver-xorg xserver-xorg-core
  xserver-xorg-input-evdev
Suggested packages:
  doxygen-latex doxygen-doc doxygen-gui graphviz libglide3 libxaw-doc
The following packages will be REMOVED:
  caribou cheese cinnamon gir1.2-clutter-1.0 gir1.2-clutter-gst-2.0
  gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-gtkclutter-1.0 gir1.2-muffin-3.0
  gir1.2-totem-1.0 gstreamer1.0-clutter ia32-libs kubuntu-desktop
  libcheese-gtk23 libcheese7 libclutter-1.0-0 libclutter-gst-2.0-0
  libclutter-gtk-1.0-0 libcogl-pango15 libcogl15 libdrm-intel1:i386
  libdrm-nouveau2:i386 libdrm-radeon1:i386 libegl1-mesa-lts-vivid
  libgbm1-lts-vivid libgl1-mesa-dri-lts-vivid libgl1-mesa-dri-lts-vivid:i386
  libgl1-mesa-glx-lts-vivid libgl1-mesa-glx-lts-vivid:i386
  libglapi-mesa-lts-vivid libglapi-mesa-lts-vivid:i386 libgles1-mesa-lts-vivid
  libgles2-mesa-lts-vivid libmuffin0 libtotem0 libwayland-egl1-mesa-lts-vivid
  libxatracker2-lts-vivid mint-meta-cinnamon mint-meta-codecs nemo-preview
  totem totem-mozilla totem-plugins totem-plugins-extra virtualbox-guest-x11
  xorg xserver-xorg-core-lts-vivid xserver-xorg-input-all-lts-vivid
  xserver-xorg-input-evdev-lts-vivid xserver-xorg-input-mouse-lts-vivid
  xserver-xorg-input-synaptics-lts-vivid xserver-xorg-input-vmmouse-lts-vivid
  xserver-xorg-input-wacom-lts-vivid xserver-xorg-lts-vivid
  xserver-xorg-video-all-lts-vivid xserver-xorg-video-ati-lts-vivid
  xserver-xorg-video-cirrus-lts-vivid xserver-xorg-video-fbdev-lts-vivid
  xserver-xorg-video-intel-lts-vivid xserver-xorg-video-mach64-lts-vivid
  xserver-xorg-video-mga-lts-vivid xserver-xorg-video-neomagic-lts-vivid
  xserver-xorg-video-nouveau-lts-vivid xserver-xorg-video-openchrome-lts-vivid
  xserver-xorg-video-r128-lts-vivid xserver-xorg-video-radeon-lts-vivid
  xserver-xorg-video-savage-lts-vivid
  xserver-xorg-video-siliconmotion-lts-vivid
  xserver-xorg-video-sisusb-lts-vivid xserver-xorg-video-tdfx-lts-vivid
  xserver-xorg-video-trident-lts-vivid xserver-xorg-video-vesa-lts-vivid
  xserver-xorg-video-vmware-lts-vivid
The following NEW packages will be installed:
  doxygen libdmx-dev libdrm-amdgpu1 libdrm-dev libegl1-mesa
  libevent-core-2.0-5 libevent-pthreads-2.0-5 libfontenc-dev libfs-dev
  libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libgl1-mesa-glx:i386
  libglapi-mesa libglapi-mesa:i386 libgles2-mesa libglu1-mesa-dev libllvm3.4
  libmirclient-dev libmirclient7 libmirclientplatform-mesa libmirprotobuf-dev
  libmirprotobuf0 libpciaccess-dev libwayland-egl1-mesa libx11-xcb-dev
  libxaw7-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev
  libxcb-present-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxfont-dev libxkbfile-dev libxmu-dev libxmu-headers
  libxmuu-dev libxres-dev libxshmfence-dev libxss-dev libxtst-dev libxv-dev
  libxvmc-dev libxxf86dga-dev libxxf86vm-dev mesa-common-dev mircommon-dev
  x11proto-bigreqs-dev x11proto-dmx-dev x11proto-dri2-dev x11proto-dri3-dev
  x11proto-fonts-dev x11proto-gl-dev x11proto-present-dev x11proto-record-dev
  x11proto-resource-dev x11proto-scrnsaver-dev x11proto-video-dev
  x11proto-xcmisc-dev x11proto-xf86bigfont-dev x11proto-xf86dga-dev
  x11proto-xf86dri-dev x11proto-xf86vidmode-dev xorg-dev xserver-xorg
  xserver-xorg-core xserver-xorg-dev xserver-xorg-input-evdev
The following packages will be DOWNGRADED:
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdrm2:i386
0 upgraded, 71 newly installed, 5 downgraded, 73 to remove and 1 not upgraded.
Need to get 18.2 MB of archives.
After this operation, 25.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]

This looks like it is going to uninstall cinnamon and completely destroy my system. What am I missing? How can I install GLFW on Linux Mint 17.3?

I also investigated further and tried to install xserver-xorg-core-dev-Its-vivid but it just said that the package has broken dependencies and wouldn't let me install.

My system information:

Linux my-computer-name 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • GLFW : sudo apt-get update && sudo apt-get install libglfw3-dev – Knud Larsen Jul 17 '16 at 20:47
  • @KnudLarsen Gets me into the same position as installing mesa-common-dev (see my question post) where there are some dependencies missing and no matter what I do I can't get it installed. Any other ideas? – Sunjay Varma Jul 17 '16 at 22:11
  • Sorry, libglfw3-dev is a Mint 18 package. Right is : sudo apt-get install libglfw-dev ... and for the GL.h : sudo apt-get install libgl1-mesa-dev ... If you still get errors, please upload your /etc/apt/sources.list , and show a link to the file. ( I have no issues with those two packages. (Ubuntu 14.04.4 )) – Knud Larsen Jul 18 '16 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.