1

I am trying to build bspwm, how do I get that dependency? I already have xcb installed. I'm on Ubuntu 21.04, the error message is

cc -std=c99 -pedantic -Wall -Wextra -DJSMN_STRICT -D_POSIX_C_SOURCE=200809L -DVERSION=\"0.9.10-33-ge22d0fa\"  -c -o bspwm.o src/bspwm.c
In file included from src/bspwm.c:39:
src/types.h:29:10: fatal error: xcb/xcb_icccm.h: No such file or directory
   29 | #include <xcb/xcb_icccm.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: bspwm.o] Error 1
antoine
  • 147
  • 1
  • 6
  • 1
    [File list of package libxcb-icccm4-dev in hirsute of architecture amd64](https://packages.ubuntu.com/hirsute/amd64/libxcb-icccm4-dev/filelist) – steeldriver Aug 22 '21 at 00:01
  • Thanks, what do I do with this information? – antoine Aug 22 '21 at 00:07
  • You install `libxcb-icccm4-dev`, since it is the package that contains the file – steeldriver Aug 22 '21 at 00:16
  • 1
    See also [How do I find the package that provides a file?](https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file) – steeldriver Aug 22 '21 at 00:17
  • Thanks it worked. Now it says I need xcb/randr.h. I did dpkg -S randr.h and installed x11proto-dev and libxrandr-dev but it still says I need xcb/randr.h. – antoine Aug 22 '21 at 00:41
  • `dpkg -S` only searches packages that are already installed on your system - for files you don't have, you need to use the online package search or install and use `apt-file`. In this case, it looks like you need `libxcb-randr0-dev` – steeldriver Aug 22 '21 at 00:57

1 Answers1

4

Usually I use the followying way to search a file in all entire repositories:

$ sudo apt install apt-file
$ sudo apt-file update
$ apt-file search xcb/xcb_icccm.h
libxcb-icccm4-dev: /usr/include/xcb/xcb_icccm.h

Or use online search at packages.ubuntu.com.

N0rbert
  • 97,162
  • 34
  • 239
  • 423