This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
A parallel make bug
- To: gcc-bugs at gcc dot gnu dot org
- Subject: A parallel make bug
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Fri, 9 Jun 2000 17:14:03 -0700
In gcc/Makefile.in, there are
# Internationalization library.
INTLLIBS = $(top_builddir)/intl/libintl.a
LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(INTLLIBS) $(VFPRINTF) $(DOPRINT) $(CLIB) ../libiberty/libiberty.a
...
native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \
$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
....
# This is needed to when doing a partial build after a `make clean'.
# libintl.a does not depend on intl.all,
# as that would force a lot of recompiling.
$(top_builddir)/intl/libintl.a:
@echo "$(MAKE) intl.all"
@$(MAKE) $(FLAGS_TO_PASS) intl.all
....
intl.all intl.install intl.uninstall intl.distdir \
intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean:
@for d in $(INTL_SUBDIRS); do \
target=`expr $@ : 'intl.\(.*\)'` && \
echo "(cd $$d && $(MAKE) $$target)" && \
(cd $$d && AWK='$(AWK)' $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $$target); \
if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
done
On a Linux SMP machine with a shell script I posted early, make may
start building libintl.a and intl.all at the same time. In my case,
I saw
make -j 4 intl.all
...
(cd intl && make -j 4 all)
...
(cd intl && make -j 4 all)
...
ar cru libintl.a intl-compat.o bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o explodename.o
ar: libintl.a: Malformed archive
make[4]: *** [libintl.a] Error 1
Will it ever be fixed?
--
H.J. Lu (hjl@gnu.org)