djpohly / dwl

dwm for Wayland - ARCHIVE: development has moved to Codeberg
https://codeberg.org/dwl/dwl
Other
1.93k stars 284 forks source link

Fixed Typo #481

Closed two-horned closed 12 months ago

two-horned commented 12 months ago

The backtick symbol was at the wrong position. If you wanted to compile with XWayland support (by commenting according lines out in config.mk), you'd run into an error.

sevz17 commented 12 months ago

No, you wouldn't. Check carefully, what you uncomment in config.mk is XLIBS, which is appended to $(PKGS).

LIBS is just to pass raw libs to the linker, eg. another way to enable Xwayland support is append -DWAYLAND to your CPPFLAGS, and export LIBS="-lxcb -lxcb-icccm"

two-horned commented 12 months ago

contents of my config.mk (when compiling with xwayland support):

_VERSION = 0.4
VERSION  = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`

PKG_CONFIG = pkg-config

# paths
PREFIX = ~/.local
MANDIR = ~/.local/man

#XWAYLAND =
#LIBS =
# Uncomment to build XWayland support
XWAYLAND = -DXWAYLAND
LIBS = xcb xcb-icccm

Any changes unrelated to the Makefile or config.mk shouldn't affect the following compilation error. The error I got:

/usr/bin/ld: cannot find xcb: No such file or directory
/usr/bin/ld: cannot find xcb-icccm: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: dwl] Error 1

The changes mentioned in the PR have fixed the error. Do with this information what you want.

You should be able to reproduce the same error by cloning the main branch and compiling it with the above config.mk.

Again, do with this information what you want.

fauxmight commented 12 months ago

@two-horned It appears you do not have libxcb installed.

sevz17 commented 11 months ago

It's not that he doesn't have it, but...

@two-horned somehow your config.mk has LIBS instead of XLIBS, that's why it fails to compile, rename it to XLIBS and it should work.

two-horned commented 11 months ago

It's not that he doesn't have it, but...

@two-horned somehow your config.mk has LIBS instead of XLIBS, that's why it fails to compile, rename it to XLIBS and it should work.

Thank you for your patience and sorry for the trouble. I got a bit too frustrated with the compilation issue so I thought there was a mistake with the Makefile, but I was wrong.

You're right about the config.mk file.