[Libevent-users] Building with Visual Studio
Hi, I have done some searching and have read a couple of posts on this subject, but nothing that quite answers my questions. I am writing a Windows port of the Thrift RPC library (http://incubator.apache.org/thrift/ ) that will build in Visual Studio with no Cygwin or other *nix/Posix emulation required. Thrift uses libevent, so I tried to build the same sort of version of libevent. I was surprised to find that libevent would not build out of the box on Windows using Visual Studio. However, once I found an open source version of stdint.h for use in Visual Studio, I was able to get the 1.4.10 stable version building fairly easily. Once the library built, I was able to build and successfully execute the regression test using the same technique. The other tests weren't so successful due to missing vcproj files. I have two questions: 1) Why doesn't libevent as released just build in Visual Studio if this was so easy to accomplish for me? Or have I missed something? 2) I would be happy to provide a patch that adds this support. Are any of the developers interested in receiving it? Best regards, Rush ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users
Re: [Libevent-users] Building with Visual Studio
Hi Rush, neither Nick nor I use Windows as our primary development platform. That sometimes means that changes are introduced that break the Windows build without us noticing. Although, I believe this particular problem might already be fixed in svn. On Thu, May 14, 2009 at 4:58 PM, Rush Manbert wrote: > 2) I would be happy to provide a patch that adds this support. Are any of > the developers interested in receiving it? Sure. Thank you, Niels. ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users
Re: [Libevent-users] Building with Visual Studio
On Thu, May 14, 2009 at 04:58:02PM -0700, Rush Manbert wrote: > I have two questions: > > 1) Why doesn't libevent as released just build in Visual Studio if > this was so easy to accomplish for me? Or have I missed something? I don't maintain libevent, but I'd guess any issues exist for the same reasons I've encountered in my own projects. _Patching_ to support a platform like Win32+VS is easy. _Maintaining_ the patch/port is quite a headache. Especially so regarding Visual Studio--as opposed to a simple MinSYS make(1) port--because the build system is probably never used by the lead maintainers. And in my short, punctuated experience w/ Visual Studio, the config system changes faster than even autotools' rate of churn (and I'm no fan of autotools). (Plus, it's common these days for environments to host a plethora of autotools version combinations, but because of the monolithic IDE paradigm of Visual Studio, this isn't feasible for typical Windows developers.) > 2) I would be happy to provide a patch that adds this support. Are any > of the developers interested in receiving it? Afraid of commitment? (Just kidding.) If libevent still doesn't build out-of-the-box, despite the endless submissions of patches to fix [apparently] broken builds over the years, I suspect the only tenable solution is for somebody to step up and either manually or automagically build from the tree on a regular basis (weekly?), or to fork a Windows branch which tracks the development branch, similar to how Portable OpenSSH tracks OpenBSD's OpenSSH. In my projects, I typically only attempt to support make(1). (GNU Make if I'm lazy, or the project is too big.) But this allows me to focus on using a mingw-gcc cross-compiler to verify builds and Wine to run regressions. The best VS patch to libevent would be one which somehow automates the process similarly. Alternatively, maintain a port uses CMake--or something similar--which might ultimately get pulled into mainline. But you'll need significant buy-in (i.e. have done a very polished job) from the leads, I think. Lastly, ditching Visual Studio support altogether--instead relying on MinSYS and make(1)--and simply maintaing a binary Visual Studio archive might work better. But unless it's kept up-to-date on a very regular basis, it'll be hard to placate a developer's need/greed for the latest, greatest, just-fished-out-of-the-water code (a near universal ailment ;) ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users
Re: [Libevent-users] Building with Visual Studio
On Thu, May 14, 2009 at 04:58:02PM -0700, Rush Manbert wrote: > Hi, > > I have done some searching and have read a couple of posts on this > subject, but nothing that quite answers my questions. > > I am writing a Windows port of the Thrift RPC library > (http://incubator.apache.org/thrift/ ) that will build in Visual Studio > with no Cygwin or other *nix/Posix emulation required. Thrift uses > libevent, so I tried to build the same sort of version of libevent. > > I was surprised to find that libevent would not build out of the box > on Windows using Visual Studio. However, once I found an open source > version of stdint.h for use in Visual Studio, I was able to get the > 1.4.10 stable version building fairly easily. Once the library built, > I was able to build and successfully execute the regression test using > the same technique. The other tests weren't so successful due to > missing vcproj files. I just opened up a WinXP VM, fired up Visual C++ 2008 Express, checked out the 1.4 branch, and tried to build from the project file in Svn. It converted mostly okay. I ran into a few warnings when I built it, but no errors. It seems to have worked fine for me. (I fixed the warnings and checked the modified code back in.) Then I tried it with the distributed version. Ouch! Apparently, we have not been including the event-config.h file that is supposed to be in WIN32-Code for VC libevent builds... but we _have_ been including the generated event-config.h that shouldn't actually be distributed; only installed. I've cleaned up the code that builds the distribution. (It wasn't an absence of stdint.h; Libevent works around the fact that 10 years out, MS still hasn't seen fit to implement C99. But using the wrong event-config.h made libevent act as if it had stdint.h when it didn't, which was the problem.) > I have two questions: > > 1) Why doesn't libevent as released just build in Visual Studio if > this was so easy to accomplish for me? Or have I missed something? Apparently, nobody who knew how Libevent was _supposed_ to build with Visual Studio had tried building with Visual Studio using a source distribution for a long time. We suck at paying attention to Visual Studio. [How it's _supposed_ to work is this: on everywhere that has a shell that can handle autoconf, the autoconf script detects the system settings and generates a config.h file, which gets post-processed into a event-config.h automatically. On anywhere without a shell that can handle autoconf (this is basically only Visual Studio), we use a pre-generated event-config.h file that has the right settings for Windows on Visual Studio's idea of C.] > 2) I would be happy to provide a patch that adds this support. Are any > of the developers interested in receiving it? Give 1.4.11 a try when it comes out some time in the next 24 hours; let us know if it's any better for you? (Also, once 2.0.2-alpha is out, somebody needs to work on decent project files for the 2.0.x series. The ones we have now are kind of stupid and crufty.) apologies, -- Nick ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users
Re: [Libevent-users] Building with Visual Studio
On Fri, May 15, 2009 at 11:41 AM, Nick Mathewson wrote: > (Also, once 2.0.2-alpha is out, somebody needs to work on decent > project files for the 2.0.x series. The ones we have now are kind of > stupid and crufty.) > Would you consider using cmake? I know KDE switched to using cmake, because amongst other reasons it offers good support for windows, allowing them to easily build visual studio project files. See http://lwn.net/Articles/188693/ Pete ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users
[Libevent-users] ANN: Libevent 1.4.11-stable released
Hi everyone, we just released libevent 1.4.11-stable. You can download the source from the usual place: http://monkey.org/~provos/libevent-1.4.11-stable.tar.gz This release fixes the following bugs: - Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen] - Remove the limit on size of HTTP headers by removing static buffers. - Fix a nasty dangling pointer bug in epoll.c that could occur after epoll_recalc(). [Patch from Kevin Springborn] - Distribute Win32-Code/event-config.h, not ./event-config.h The Linux epoll bug is somewhat nasty, so you are really encouraged to upgrade to this release. We would like to thank everyone who reported bugs or supplied patches. Thank you, Niels. ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users