bug-make
[Top][All Lists]
Advanced

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

make -j2 strangely skipping dependencies


From: Chris Frey
Subject: make -j2 strangely skipping dependencies
Date: Sat, 21 Jan 2012 04:24:59 -0500
User-agent: Mutt/1.4.2.2i

Hi,

I've been experiencing some odd issues with make 3.82, and the latest CVS,
when running my build with -j2.

I've done a git-bisect and traced it down to the following change:

        
http://cvs.savannah.gnu.org/viewvc/make/remake.c?root=make&r1=1.134&r2=1.135

If I undo this change, my build works just fine.  If I use make 3.81,
it works fine.  If I use make -j1, it works fine.

I thought that maybe resetting the state while in the cs_running state
was the problem, so I changed the code to read:

          if (file->command_state == cs_deps_running)
            set_command_state (file, cs_not_started);

But this didn't seem to fix the problem for me.

Somehow, by setting file state to cs_not_started, it allows targets and
commands to be run that should not yet be run, since the file state
should still be cs_deps_running.

I have make -d logs for 3.81 and 3.82 and CVS if anyone wants them.
The makefile I'm using is pretty large, but that is available online
as well.  Otherwise, please apply the following patch.

Thanks!
- Chris



diff --git a/remake.c b/remake.c
index c58d3a5..31cf831 100644
--- a/remake.c
+++ b/remake.c
@@ -1043,8 +1043,8 @@ check_dep (struct file *file, unsigned int depth,
           /* If this target is not running, set it's state so that we check it
              fresh.  It could be it was checked as part of an order-only
              prerequisite and so wasn't rebuilt then, but should be now.  */
-          if (file->command_state != cs_running)
-            set_command_state (file, cs_not_started);
+//          if (file->command_state != cs_running)
+//            set_command_state (file, cs_not_started);
 
          ld = 0;
          d = file->deps;





reply via email to

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