[Top][All Lists]

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

PSPP-BUG: [bug #60192] make -j4 routinely has issues

From: Friedrich Beckmann
Subject: PSPP-BUG: [bug #60192] make -j4 routinely has issues
Date: Sat, 9 Apr 2022 11:05:25 -0400 (EDT)

Follow-up Comment #8, bug #60192 (project pspp):

I think the root cause for this problem is the recursive nature of the
Makefile. The "all" target in the Makefile looks like this:

all: $(BUILT_SOURCES) config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive

while the "html" target is not calling another make instance. Both targets
"all-recursive" and "html" will in the end have the pspp executable as
dependency but because they run in independent make instances, they do not
know about each other. Therefore both start the build of the common

I made a small test Makefile. 

# Testmakefile to show recursive make
        $(MAKE) t1
all: t1 t2
t1: t3
        echo "Hallo t1"
        sleep 2
        echo "This is t1" >> t1
t2: t3
        echo "Start t2 - now sleep"
        sleep 1
        echo "This is t2" >> t2
        echo "Hallo t3"
        sleep 1
        echo "This is t3" >> t3
        rm t*

If you run "make -j4 allrec t2", then you see that t3 target is called twice.
Calling "make -j4 all t2" will show the correct result, i.e. t3 target is only
build once. Calling "make allrec t2" also works. My assumption is that this
parallel build will result in some race conditions.

I did not manage to convince autotools to avoid the call of another make
instance even for the hello world example. So I guess we have to live with


Reply to this item at:


  Message sent via Savannah

reply via email to

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