[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Infinite loop bug with parallel make

From: Ian Lynagh
Subject: Re: Infinite loop bug with parallel make
Date: Sat, 23 Feb 2013 02:32:25 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Sebastian,

On Sat, Feb 23, 2013 at 12:24:11AM +0100, Sebastian Pipping wrote:
> On 22.02.2013 03:31, Ian Lynagh wrote:
> > Also, is there a way to tell make not to treat any file as intermediate?
> > I think that it's possible that this would work around the problem.
> > If that's not possible, then if I can make a list of all files that the
> > build system might build then adding
> >     list of all files : | exists
> >     exists:
> >         touch $@
> > would do it, right?
> > Although then, if the build system didn't actually find a rule for a
> > file in the list, then the dependency on exists would make it think
> > that it could build it; is there any way to avoid that?
> I do not understand that part, sorry.  Please elaborate more.

Thanks for your mail. I think I understand what's going on now - and at
any rate I appear to have a solution that works!

The problem was that our compiler generates 2 output files (foo.o and
foo.hi) when compiling one source file, and we had thus ended up with a
bunch of rules like
    %.hi: %.o ;
which worked fine, until I wanted to make a change which meant that I
needed to have some .o files depending on other .hi files. This meant
make started actually using the above rule, and as far as it was
concerned the .hi files that were produced were 'intermediate files',
and thus it deleted them when it had finished.

The missing files then tickled the make bug from my earlier mail, which
meant that rather than getting a nice error message, make just set there
eatin CPU for eternity.

So now I instead generate a load of
    foo.hi: foo.o ;
rules instead, and everything appears to work!

(I also tried just adding ".SECONDARY:", but with that included make
becomes pathologically slow: I left it churning for 2 hours and it still
hadn't made progress.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]