harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dalibor Topic <robi...@kaffe.org>
Subject Re: Small problems building under cygwin
Date Fri, 21 Oct 2005 20:40:37 GMT
On Fri, Oct 21, 2005 at 03:33:19PM -0200, Rodrigo Kumpera wrote:
> Dalibor,
> 
> If autotools have really evolved since last time I checked, start of
> 2005, then are a really good alternative. They can do some really good
> magic with platform incompatibility issues.

Well, they have evolved in the last years :) For example, Libtool has
seen steady releases, and so has automake, whereas autoconf has pretty
much stayed on the same release for a while. 

> 
> My experience with developing with then is really depressing, I need
> to have a dozen versions of autoconf instaled because all of then are
> bloody incompatible and every project require an unique version.

Agreed. The transitions between the old ac 2.13/am 1.4/lt 1.3.5 setup
many people used to ac 2.59/am 1.9/lt 1.5.x that's what many people use
today, have been pretty rocky ones. Otoh, if one starts out with the
latest newest autotools, it's a pretty pleasant environment to work in,
once one knows where to get additional helper macros
(ac-archive.sf.net), and replacement functions for odd situations
(gnulib).

> Debuging autoconf script are really hard (maybe I'm missing
> something). Every time I had to generate Makefile.in or Makefile I had
> a long session of fixing small problems and googleing for solutions.

with the latest toolchains, if you have set things up right, an
autoreconf invocation should do it all automagically for you.

that's one part of autoheaven, the other is non-recursive Makefile.am
files :)

Writing configure.ac scripts can be a bit odd, due to the massive amount
of macro language machinery involved, so what one writes is quite
different from what the configure script ends up looking like.

I'd recommend the goat book to get an understanding of autotools and how
everything fits together. It's available online, as well. Unfortunetely,
it describes the old autotools toolchain, so I'd recommend getting a
basic understanding of it all with the goat book, and then digging into
the actual docs from latest versions, which are pretty nice, in general.

> Maybe that's because I do suck when  using and developing with
> autotools and I hope so.

The learning curve with the autotools is just very steep in the
beginning. Otoh, one can get by quite far without having to learn much
about weird old shell dialects, make and all that stuff from the 80s, as
long as one stays in the C/C++ world.

the yucky part about using autotools is dealing with special cases that
noone else has dealt with already, like say a function on some bizarre
old platform from the 80s requiring extra care from the linker and/or
compiler. Otoh, since the ASF makes the APR, I guess Harmony can
simply delegate dealing with the weird platform specifics to the APR
folks :)

cheers,
dalibor topic

> Anyway, configure scripts are really sweet... when they work and don't
> screw up too badly.
> 
> 
> On 10/21/05, Dalibor Topic <robilad@kaffe.org> wrote:
> > On Fri, Oct 21, 2005 at 01:08:34PM -0200, Rodrigo Kumpera wrote:
> > > Dan,
> > >
> > > To generate a binary that doesn't depend on cygwin shared lib, for
> > > that I use the following combination of flags "-mno-cygwin
> > > -Wl,--add-stdcall-alias", the first one is pretty obvious, the second
> > > is result of google'ing for a working solution, as I could not make it
> > > work without this flag.
> >
> > Is there something that speaks against using autotools for all that?
> >
> > I've written autotools setups that work with gcc, MSVC, etc, across
> > CygWin, OS X, various Unix variants, GNU/Linux, etc, and found the
> > underlying tools to have evolved nicely for that in the last few years,
> > offer some pretty neat features (cross-compiling for windows from
> > GNU/Linux for example), and most importantly, take care of the whole
> > platform specific linker flag zoo accross all sorts of operating system
> > and toolchain combinations.
> >
> > cheers,
> > dalibor topic
> >

Mime
View raw message