LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.61k stars 194 forks source link

Segmentation fault on OpenBSD #237

Closed KNIX3 closed 3 years ago

KNIX3 commented 3 years ago

I just compiled the default lemonbar from source and I get a segmentation fault when I try to run it. I only changed the Makefile to add the OpenBSD Xinerama lib and include folder. I ran the following command.

$ echo "test" | lemonbar -p
Segmentation fault (core dumped)

Please let me know what other information I can provide.

 $ uname -mrsv
 OpenBSD 6.9 GENERIC.MP#128 amd64
julianaito commented 3 years ago

Hi,

It segfaults because memrchr(3) is not resolved. You need to remove #define _POSIX_C_SOURCE 200809L from lemonbar.c

See https://github.com/openbsd/ports/blob/master/x11/lemonbar/patches/patch-lemonbar_c

You could also tweak the port to run the latest lemonbar commit, so it's pledged on top of that :)

KNIX3 commented 3 years ago

Of course! How could I have not checked the ports for patches first :facepalm: Thanks