Ticket #2538 (closed defect: fixed)

Opened 2 years ago

Last modified 13 months ago

"make -j2 dist" does not work (bad dependency?)

Reported by: vincent@… Owned by: mutt-dev
Priority: trivial Milestone: 1.6
Component: build Version: cvs
Keywords: Cc:

Description (last modified by brendan) (diff)

When I do a "make -j2 dist", I get:

[...]
/usr/bin/make ../makedoc
make[1]: *** No rule to make target `index.html', needed by `distdir'.  Stop.
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory `/home/vlefevre/software/mutt/mutt/doc'
make[2]: `../makedoc' is up to date.
make[2]: Leaving directory `/home/vlefevre/software/mutt/mutt/doc'
( sed -e "s/@VERSION\@/`cat ../VERSION` (`cut -d\\\" -f2 ../reldate.h`)/" ./manual.xml.head ;\
          gcc -E -I. -I.. -I/home/vlefevre/include -I.. -DSYSCONFDIR=\"/home/vlefevre/etc\" -DBINDIR=\"/home/vlefevre/i686/bin\" -DDOTLOCK_PATH=\"/usr/bin/mutt_dotlock\" -DHAVE_CONFIG_H=1 -I../intl -D_MAKEDOC -C ../init.h | ../makedoc -s ) |      \
                cat - ./manual.xml.tail > manual.xml
touch stamp-doc-xml
make[1]: Leaving directory `/home/vlefevre/software/mutt/mutt/doc'
make: *** [distdir] Error 1

The problem doesn't occur without the -j2.
>How-To-Repeat:
>Fix:
Unknown

Attachments

mutt-1.5.15-parallel-make.patch (0.9 kB) - added by ferdy 20 months ago.
mutt-1.5.16-parallel-make.patch (0.9 kB) - added by ferdy 15 months ago.

Change History

Changed 20 months ago by Vincent Lefevre <vincent@…>

The problem is still there (with just a "make -j2", BTW):

[...]
Making all in doc
make[2]: Entering directory `/home/vlefevre/software/mutt/mutt/doc'
make makedoc-all
make[3]: Entering directory `/home/vlefevre/software/mutt/mutt/doc'
sed -e 's,@sysconfdir\@,/home/vlefevre/etc,g' -e 's,@bindir\@,/home/vlefe=
vre/i686/bin,g' -e 's,@docdir\@,/home/vlefevre/doc/mutt,g' ./mutt.man > m=
utt.1
(cd .. && make makedoc)
make ../makedoc # we do not want to rebuild the documentation in tarball =
builds
make[4]: Entering directory `/home/vlefevre/software/mutt/mutt/doc'
(cd .. && make makedoc)
make[4]: Entering directory `/home/vlefevre/software/mutt/mutt'
if gcc -DPKGDATADIR=3D\"/home/vlefevre/share/mutt\" -DSYSCONFDIR=3D\"/hom=
e/vlefevre/etc\" -DBINDIR=3D\"/home/vlefevre/i686/bin\" -DMUTTLOCALEDIR=3D=
\"/home/vlefevre/share/locale\" -DHAVE_CONFIG_H=3D1 -I. -I. -I.  -I. -I. =
-I./imap  -Iintl -I./intl  -Wall -pedantic -g -O2 -MT makedoc.o -MD -MP -=
MF ".deps/makedoc.Tpo" -c -o makedoc.o makedoc.c; \
        then mv -f ".deps/makedoc.Tpo" ".deps/makedoc.Po"; else rm -f ".d=
eps/makedoc.Tpo"; exit 1; fi
make[5]: Entering directory `/home/vlefevre/software/mutt/mutt'
if gcc -DPKGDATADIR=3D\"/home/vlefevre/share/mutt\" -DSYSCONFDIR=3D\"/hom=
e/vlefevre/etc\" -DBINDIR=3D\"/home/vlefevre/i686/bin\" -DMUTTLOCALEDIR=3D=
\"/home/vlefevre/share/locale\" -DHAVE_CONFIG_H=3D1 -I. -I. -I.  -I. -I. =
-I./imap  -Iintl -I./intl  -Wall -pedantic -g -O2 -MT makedoc.o -MD -MP -=
MF ".deps/makedoc.Tpo" -c -o makedoc.o makedoc.c; \
        then mv -f ".deps/makedoc.Tpo" ".deps/makedoc.Po"; else rm -f ".d=
eps/makedoc.Tpo"; exit 1; fi
gcc  -Wall -pedantic -g -O2   -o makedoc  makedoc.o  -lidn=20
mv: cannot stat `.deps/makedoc.Tpo': No such file or directory

--=20
Vincent Lef=E8vre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

Changed 20 months ago by brendan

  • status changed from new to closed
The problem is still there (with just a "make -j2", BTW):
This is fixed in tip (at least make -j2 and make -j2 dist
work for me now)

Changed 20 months ago by pdmef

  • status changed from closed to new
Reopened as it's not fixed. If it works then only by 
accident since makedoc is still compiled twice, i.e. 
there's a race of two compiler runs overwriting their 
results (if one is lucky, one linker writes makedoc after 
the other is completely done already; but I've seen them 
doing it concurrently).

Changed 20 months ago by brendan

  • component changed from mutt to build
  • description modified (diff)
  • milestone set to 1.6

Changed 20 months ago by Brendan Cully <brendan@…>

(In [cdac16f99c5fc2b0844714ad8736efe59fe37569]) Explicit -j1 breaks some versions of make (see #2538)

Changed 20 months ago by ferdy

That doesn't really work because make might end up running cd .. && $(MAKE) makedoc$(EXEEXT) in two different 'code paths'. The proper fix is something along the lines of the following patch.

- ferdy

Changed 20 months ago by ferdy

Changed 20 months ago by brendan

Unfortunately, your patch means that make will build the documentation when unpacked from a distribution tarball. We want to avoid this.

Changed 20 months ago by ferdy

Which is why I didn't send it for inclusion. I still have to grok how the documentation rebuilding logic works to come up with a proper patch.

- ferdy

Changed 15 months ago by ferdy

How about the attached ? I've been trying it and seems to work fine.

The last chunk is removed because ${PROGRAMNAME}.c is the default _SOURCES when nothing is specified.

- ferdy

Changed 15 months ago by ferdy

Changed 13 months ago by pdmef

  • status changed from reopened to closed
  • resolution set to fixed

This is fixed in [fce40f3a1aec] removing the cross-dir dependency for makedoc.

Note: See TracTickets for help on using tickets.