-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for Solaris #470
base: master
Are you sure you want to change the base?
Conversation
It requires an-tao/trantor#94 for the tests to pass. I also verified that the tests still pass on Linux and FreeBSD after these changes. |
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.
@vedranmiletic the drogon_ctl -v
command doesn't work after this PR, please check it. I guess you renamed the version class to drogonVersion for avoiding name conflict, please use namespace for this. And please try to keep drogon_ctl help
command consistent with before.
I’ll make some sanity checks on macOS tomorrow. |
You're indeed correct, I should have been more careful and checked |
I have no idea why PostgreSQL failed in Travis on Linux. Any pointers are welcome. |
Wait, I figured now I should also run However, on Solaris webapp_test blocks indefinitely on a future Do you maybe want to merge this as "Fix building and tests on Solaris" and then I can make a separate patch for the rest? |
@vedranmiletic When a patch fails the existing test, I prefer not to merge it. I think you can create a port/solaris branch on this repository (instead of on your forked repo), you now have this permission. |
Makes sense. I don't have time today to resume working on this, but I will later this week. I first need to figure out why
You are very welcome to try installing OpenIndiana in VirtualBox or VMware. IIRC it had some issue with weird keyboard keys being repeatedly pressed when running under KVM/QEMU. |
@vedranmiletic I compiled and tested drogon on OmniOS, and I found that errors are in the trantor library. The reading and writing on a TCP connection don't work. I'll try to figure it out. |
@vedranmiletic I know what's wrong with trantor now. The IO multiplexer (epoll on linux and kqueue on macOS or FreeBSD) is different on solaris, the change you made just implement a It seems that poll() is used on solaris, you could find the wapper of poll() in very early version of trantor (before kqueue was introdued into trantor), but I don't know if it is compatible with solaris. poll() on linux is slower than epoll(), I don’t know if it is also inefficient on solaris. I'm afraid there is a lot of work to be done for solaris. |
@an-tao Indeed, in
OK, I'll see what I can do. |
see the git log, Following are the files in the trantor/net/inner/poller folder of the 4dade42 commit:
you could checkout the deleted PollPoller.cc from old version of trantor, and then: #if defined __linux__ || defined _WIN32
return new EpollPoller(loop);
#elsdef __sun
return new PollPoller(loop);
#else
return new KQueue(loop);
#endif |
Thanks, was just looking for that commit. Exactly the approach I had in mind. |
Tested on illumos distribution OmniOS Community Edition.
Now that |
@vedranmiletic Thanks so much for resuming this PR, I have no environment of solaris OS, would you please test this PR on your Solaris host? |
Yes, sure. I'll get back with the results in a few days. |
@vedranmiletic have you tested this? thanks. |
@an-tao I tried. Unfortunately, the machine that I could dedicate to Solaris isn't supported in terms of hardware. Virtual machines had trouble in the past. I will find time in the next few weeks to try on a server that worked well in the past and fix the issues that appear (if any). |
Thanks so much for your help! |
Tested on illumos distribution OmniOS Community Edition.
Not sure if we care about this (I don't use Solaris in production), but I wanted to learn more about portability so I did the porting.