UtkarshVerma / dwmblocks-async

An efficient, lean, and asynchronous status feed generator for dwm.
GNU General Public License v2.0
232 stars 87 forks source link

Include xcb-xrand library in the Makefile #54

Closed swivelmargarita closed 10 months ago

swivelmargarita commented 10 months ago

OS: Arch Linux Although I installed all the packages that included xcb in the title, I could not compile the dwmblocks-async with command: sudo make install with the error:

make: pkg-config: No such file or directory
make: pkg-config: No such file or directory
LD       build/dwmblocks
/usr/bin/ld: build/x11.o: in function `x11_connection_open':
x11.c:(.text+0x6): undefined reference to `xcb_connect'
/usr/bin/ld: x11.c:(.text+0x11): undefined reference to `xcb_connection_has_error'
/usr/bin/ld: build/x11.o: in function `x11_set_root_name':
x11.c:(.text+0x6b): undefined reference to `xcb_get_setup'
/usr/bin/ld: x11.c:(.text+0x73): undefined reference to `xcb_setup_roots_iterator'
/usr/bin/ld: x11.c:(.text+0x9f): undefined reference to `xcb_change_property'
/usr/bin/ld: x11.c:(.text+0xa9): undefined reference to `xcb_request_check'
/usr/bin/ld: x11.c:(.text+0xe4): undefined reference to `xcb_flush'
/usr/bin/ld: build/x11.o: in function `x11_connection_close':
x11.c:(.text+0x51): undefined reference to `xcb_disconnect'
collect2: error: ld returned 1 exit status
make: *** [Makefile:38: build/dwmblocks] Error 1

But after including xcb-randr at the end of the line 9 in Makefile file, it was compiled just fine So I made this pull request to help resolve anyone who having the same issue

Output of the installed packages related to xcb: pacman -Q | grep xcb :

libxcb 1.16-1
xcb-imdkit 1.0.5-1
xcb-proto 1.16.0-1
xcb-util 0.4.1-1
xcb-util-cursor 0.1.5-1
xcb-util-errors 1.0.1-1
xcb-util-image 0.4.1-2
xcb-util-keysyms 0.4.1-4
xcb-util-renderutil 0.3.10-1
xcb-util-wm 0.4.2-1
xcb-util-xrm 1.3-2

P.S. I apologize I broke some guidelines. It's my first ever public pull request

UtkarshVerma commented 10 months ago

The dependencies are specified correctly in the project. You need "pkg-config" on your distro.

swivelmargarita commented 10 months ago

Thank you. I installed pkg-config and changed that line in Makefile that day. And I (wrongly) thought that changing Makefile fixed the problem. But it was the missing package all along. Silly me!