Re: [Libevent-users] Building with Visual Studio

2009-05-18 Thread Dan Kegel
On Sun, May 17, 2009 at 10:37 PM, James Mansion
 wrote:
>> Seems to work well for our needs across win/mac/linux.
>
> How odd that it creates a scons file on Linux.  scons is supposed to solve
> cross-platform building on its own.

We tried scons on all three platforms, but it just wasn't a good fit.
First off,  it uses huge amounts of RAM and is very slow.  (This has
not changed in five years.)  Second, the mac and linux developers
really wanted to use xcode and visual studio to do builds.
So we moved to gyp.  The guy who wrote it is also the guy
who wrote scons :-) so he used scons as the target on Linux
until we have a chance to write a make backend for gyp.
(One's written, but not fully debugged yet.)

> I was using scons before I tried waf, and haven't gone
> back.

I'll have to check out waf.
- Dan
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Building with Visual Studio

2009-05-17 Thread James Mansion

Dan Kegel wrote:

Seems to work well for our needs across win/mac/linux.
  
How odd that it creates a scons file on Linux.  scons is supposed to 
solve cross-platform
building on its own.  I was using scons before I tried waf, and haven't 
gone back.


James

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Building with Visual Studio

2009-05-17 Thread Dan Kegel
On Sat, May 16, 2009 at 9:01 AM, Nick Mathewson  wrote:
>> Would you consider using cmake?
>
> Looks interesting, but for the short term (i.e., the 2.0.x timeframe),
> maintaining and improving the autotools-based system we have now seems
> like it will be way less effort than switching.

This is creeping kind of offtopic for this list, but:

Another system to consider might be gyp.
Chromium was thinking about using cmake, but
something made it not quite good enough (possibly
its visual studio template wasn't flexible enough?),
so they rolled their own.  It's at
http://gyp.googlecode.com
and there is some doc in the wiki there.
Seems to work well for our needs across win/mac/linux.
- Dan
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Building with Visual Studio

2009-05-17 Thread Shannon Morahan
Hi Guys

1.4.11 that incorporated the changes to the build system worked out of the box 
on my VS2008.

- Original Message -
From: Nick Mathewson 
To: Peter Ross 
Cc: libevent-users@monkey.org
Sent: Sun, 17 May 2009 02:01:45 +1000 (EST)
Subject: Re: [Libevent-users] Building with Visual Studio

On Fri, May 15, 2009 at 12:01:30PM +1000, Peter Ross wrote:
> 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?

Looks interesting, but for the short term (i.e., the 2.0.x timeframe),
maintaining and improving the autotools-based system we have now seems
like it will be way less effort than switching.  To switch, we'd have
to learn cmake, convert all our autoconf and automake stuff to use it,
testing it on all the platforms where libevent currently builds, and
shake out any bugs we find.

That's not something to do in a release series we're trying to finish
and stabilize.  Maybe in 2.1.x, if somebody wants to actually do the
work.  But if somebody else writes a compatible cmake/whatever file,
it would be great if they share it with the rest of the list so they
can try to get the bugs out.

yrs,
-- 
Nick
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Building with Visual Studio

2009-05-16 Thread Nick Mathewson
On Fri, May 15, 2009 at 12:01:30PM +1000, Peter Ross wrote:
> 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?

Looks interesting, but for the short term (i.e., the 2.0.x timeframe),
maintaining and improving the autotools-based system we have now seems
like it will be way less effort than switching.  To switch, we'd have
to learn cmake, convert all our autoconf and automake stuff to use it,
testing it on all the platforms where libevent currently builds, and
shake out any bugs we find.

That's not something to do in a release series we're trying to finish
and stabilize.  Maybe in 2.1.x, if somebody wants to actually do the
work.  But if somebody else writes a compatible cmake/whatever file,
it would be great if they share it with the rest of the list so they
can try to get the bugs out.

yrs,
-- 
Nick
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Building with Visual Studio

2009-05-16 Thread James Mansion

Nick Mathewson wrote:

[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.]

  
If you provided waf or cmake files too, then they can also do the simple 
platform config

chores, but work cross-platform.  Both will generate config files.

cmake has the advantage that it will generate VS configs that can then 
be used by devs who
want to fiddle with the software - but waf is probably more 
straightforward and Python is

probably not too hard a sell as a prerequisite.

Perhaps something to consider for 2.x?

James


___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Building with Visual Studio

2009-05-15 Thread Rush Manbert

Hi Nick,

On May 14, 2009, at 6:41 PM, Nick Mathewson wrote:


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.)


This explains so much. I had tried 1.4.8, 1.4.9, 2.0.1, and finally  
1.4.10. It was so clearly broken in regard to the config stuff, yet  
was so easily fixed that it just seemed weird. Distribution of the  
wrong config makes a lot of sense.






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.


The company I work for makes a cross platform product, currently Mac  
and Windows. (That's why I'm writing the Thrift port for Windows. We  
need it.) I would turn my back on Windows in a heartbeat otherwise,  
and I hate worrying about Visual Studio compatibility. Luckily, our  
software is written in C++, so we get incredible mileage from using  
Boost to abstract away the platform-specific issues.





[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.]


"this is basically only Visual Studio"

Windows just sucks in so many ways. I could go on. :-)




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?


I did try it, using VS 2005. The library builds with no errors. The  
regress projects builds despite warnings and runs without errors.


The other sub-projects don't build, I think because there are no  
vcproj files, but I'm happy with what I have.


Thank you so much for taking care of this.

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

2009-05-14 Thread Peter Ross
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


Re: [Libevent-users] Building with Visual Studio

2009-05-14 Thread Nick Mathewson
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

2009-05-14 Thread William Ahern
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

2009-05-14 Thread Niels Provos
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