[issue25696] "make -j9 install" fails because bininstall target requires the libainstall target

Martin Panter report at bugs.python.org
Wed Nov 25 18:58:23 EST 2015


Martin Panter added the comment:

$(LIBPC) is a single directory name, so I suggest dropping the “for” loop.

Patch 2 should avoid the practical race condition. But there is technically still a race with “libainstall” and “bininstall” both testing and creating the same directory. Maybe we should factor it out, something like:

$(DESTDIR)$(LIBPC):
	@echo "Creating directory $@"
	@$(INSTALL) -d -m $(DIRMODE) $@
. . .
bininstall: altbininstall $(DESTDIR)$(LIBPC)
. . .
libainstall: all python-config $(DESTDIR)$(LIBPC)
	@for i in $(LIBDIR) $(LIBPL); \
	. . .

Looking at the history, the test-then-install code comes from 20 years ago: <https://hg.python.org/cpython/rev/d41d89eb43e5#l1.150>. I would say calling install unconditionally (without a test or echo message) might be simpler, but that’s probably getting out of scope here.

----------
nosy: +martin.panter
stage:  -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25696>
_______________________________________


More information about the Python-bugs-list mailing list