Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build on FreeBSD #47

Open
dvogit opened this issue Oct 8, 2020 · 3 comments
Open

How to build on FreeBSD #47

dvogit opened this issue Oct 8, 2020 · 3 comments

Comments

@dvogit
Copy link

dvogit commented Oct 8, 2020

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
Copy link
Owner

domsson commented Oct 9, 2020

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
Copy link
Owner

domsson commented Oct 16, 2020

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
Copy link
Author

dvogit commented Oct 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants