-
Notifications
You must be signed in to change notification settings - Fork 216
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
Support compile with clang on MacOS #285
Conversation
Needs a few tweaks to make travis happy :) |
Can you rebase this into a single commit? |
Oh, sure) |
What's defining those variables?
|
Good catch! My bad, will adjust the configs |
Yep, actually need to rewrite the bsd-part, it compiled just because definitions was not set... |
@stgraber could you please suggest how to test it properly? I use go-dqlite, so where I will see it's working or not? |
src/server.c
Outdated
if (fd == -1) { | ||
return DQLITE_ERROR; | ||
} | ||
fcntl(fd, O_CLOEXEC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add error checking for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, fixed
I'm not all that familiar with the internals of dqlite, I certainly understand the goal of this logic but am not sure what's the best way to test it. I tried connecting to a number of the pipes held by LXD here, but that's not going anywhere, presumably because those are already connected, so I'm never hitting the code that would reject the connection (just stuck waiting for accept basically). @freeekanayaka would definitely be able to assist there, maybe @MathieuBordere somehow already looked at that part of the codebase too but he's mostly been focused on raft issues so far ;) |
600605b
to
e9fea2e
Compare
Not too familiar with this part of the codebase, will have a look eventually if this stays open :-) |
If you run the |
Thanks, folks - figured out there is other changes required after I compiled go-dqlite demo. Will continue to test and come back with a solution) |
Ok, that was a journey. To run the node and walk through demo it will also require libraft changes, and some other adjustments, but ended up with the networking issues - seems the custom aligned_alloc is not working well and causing a mess in the communication protocol... Will prepare the changes and try to find some help with debugging. |
A number of changes to make the code compile on MacOS with clang.
The other patches in series: