opensubscriber
   Find in this group all groups
 
Unknown more information…

b : bug-make@gnu.org 21 January 2012 • 5:24PM -0500

make -j2 strangely skipping dependencies
by Chris Frey

REPLY TO AUTHOR
 
REPLY TO GROUP




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;



_______________________________________________
Bug-make mailing list
Bug-make@gnu....
https://lists.gnu.org/mailman/listinfo/bug-make

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.