domsson / succade

Run, feed and style your Lemonbar with ease
Creative Commons Zero v1.0 Universal
55 stars 3 forks source link

How to build on FreeBSD #47

Open dvogit opened 3 years ago

dvogit commented 3 years ago

This requires the sys/epoll.h, while on FreeBSD we only have sys/poll.h. The port libepoll-shim does contain a epoll implementation for FreeBSD, but the linker does not recognize it in the object code.

How would I go about building succade on FreeBSD.

domsson commented 3 years ago

Hey dvogit, thank you for your interest in the project!

When I started writing it, I did so only for myself, so I used some non-portable stuff, like epoll. Most of it I've removed over time, but that one is obviously still left.

Unfortunately, I have no experience with FreeBSD, but I guess simply replacing epoll with select or poll should solve the problem. Fortunately, the event handling code now resides in libkita, in other words, the offending code is well isolated and it shouldn't be too hard to swap it out without major changes to succade. Another option here would be to use an event handling library, like libevent, but I wanted to reduce the amount of dependencies (and overall code in the project) as much as I can, so I'm not too fond of that idea.

In other words, I'll look into this as soon as I have enough time, but can't promise when that would be. In the meantime, if there is someone out there who has experience with event handling using epoll, poll and/or select, feel free to contribute. I've opened an issue over at libkita.

domsson commented 3 years ago

Interim update: I've spent some considerable amount of time trying to make this work with kqueue (see the branch named accordingly) and it kind of works somewhat. However, I'm quite stuck; porting this over turns out to be pretty time consuming. I'm not sure I'll be able to get this to run properly with the limited time I've got on my hands. :(

dvogit commented 3 years ago

Ok. I also read through libkita, I’m thinking about forking it to make it more BSD friendly, but I am not the best at C, so I’m going to see if I can help