bug-make
[Top][All Lists]
Advanced

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

make goes into an infinite loop


From: Ian Lynagh
Subject: make goes into an infinite loop
Date: Mon, 7 Jan 2013 18:17:21 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi all,

I've got a makefile for a large project which appears to send make into
an infinite loop. I wonder if anyone could help me work out what is
going wrong, and how to fix it, please?

Unfortunately, it does so after about 30mins of compiling with parallel
make (using e.g. -j5), and making a small testcase is unlikely to be
easy.

I've run make with the -d flag, and put the part of the log around where
it starts to go wrong here:
    http://lambda.haskell.org/~igloo/make-loop.txt
(14MB).

My understand is:

* around line 1, there are 2 child processes building things, one
  of which finishes

* around line 2607, there is 1 child process building something, and
  another child is started

* around line 18477 there are 2 child processes building things, one
  of which finishes

* around line 36876 there is 1 process building something, and it
  finishes

* on line 55282 an iteration of the infinite loop starts
* on line 73678 the next iteration of the infinite loop starts
* on line 92074 the next iteration of the infinite loop starts
* on line 110470 the next iteration of the infinite loop starts
* on line 128866 the next iteration of the infinite loop starts

The end of one loop and start of the next looks like this:

    The prerequisites of `libraries/dist-haddock/index.html' are being made.
   Finished prerequisites of target file `all_library_doc_index'.
  The prerequisites of `all_library_doc_index' are being made.
 Finished prerequisites of target file `all'.
The prerequisites of `all' are being made.
Considering target file `all'.
 File `all' does not exist.
  Considering target file `check_packages'.
  File `check_packages' was considered already.
  Considering target file `all_utils/mkdirhier'.

Note that there are no "Live child" lines or anything.

If I ^C it, and run make again, then compilation continues and succeeds.

Is this a bug in make, or in my makefiles? If the former, is there a
workaround? If the latter, have you got any advice on how to diagnose it
please?


I have "GNU Make 3.81".


Thanks
Ian




reply via email to

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