[asterisk-dev] Re: russell: trunk r40153 - in /trunk: acinclude.m4 configure configure.ac

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Aug 19 07:51:40 MST 2006


On Thu, Aug 17, 2006 at 05:46:56PM +0100, Brian Candler wrote:
> On Thu, Aug 17, 2006 at 05:37:26PM +0300, Tzafrir Cohen wrote:
> > > We have found that GNU Make versions 3.79 and 3.80 are very prone to 
> > > segfault and buggy behavior when using documented GNU Make behavior 
> > > (functionality that has been documented to be available since before 
> > > 3.79 was released). We found these issues when improving the Makefiles 
> > > and simplifying them.
> > 
> > Could you please be more specific?
> 
> I don't know if this one affects Asterisk, but here are the details of one
> which breaks OpenRadius.
> http://lists.e-advies.nl/pipermail/openradius-list/2006-August/001429.html
> 
> -------- 8< --------------------------------------------------------------
> > gmake: *** virtual memory exhausted.  Stop.
> > $ gmake clean
> > gmake: *** virtual memory exhausted.  Stop.
> > $ gmake
> > gmake: *** virtual memory exhausted.  Stop.
> > $ gmake --version
> > GNU Make 3.80
> > Copyright (C) 2002  Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.
> > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> > PARTICULAR PURPOSE.
> >
> > Right, so I upgraded to 3.81, and that fixed that problem (perhaps a note
> > worth adding in a README for evblib).

I had no problem building the version from 12-Aug on my system (I was
offline earlier, and that's why I used a slightly older version) with
Debian Sarge and its native gmake 3.80.

> 
> Definitely. The offending fragment is
> 
> SUBDIRS         := auto sysdefs misc str buffer fastring stream strio
>                    hash db tests
> 
> $(foreach dir,$(SUBDIRS),$(eval include $(dir)/Rules.mk))
> 
> If you replace it with the old style
> 
> dir             := auto
> include         $(dir)/Rules.mk
> 
> dir             := sysdefs
> include         $(dir)/Rules.mk
> 
> etc., it will work with older versions. No idea why Make 3.80 would barf
> at that foreach, especially when 3.80 on Linux seemed to work fine...

But why not use the simple alternative:

include $(SUBDIRS:%=%/rules.mk)


Or a more readble alternative:


INCLUDES := $(SUBDIRS:%=%/rules.mk)
include $(INCLUDES)

If you don't want to assume 

-- 
Tzafrir Cohen         sip:tzafrir at local.xorcom.com
icq#16849755          iax:tzafrir at local.xorcom.com
+972-50-7952406          jabber:tzafrir at jabber.org
tzafrir.cohen at xorcom.com     http://www.xorcom.com



More information about the asterisk-dev mailing list