This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

build/install failure with -jN, N > 1, and nonexistent $(prefix)


[resend to this address, as suggested]

I found that when I build (bootstrap and install) in parallel these
days, `make' would fail because it'd try to install into a directory
before it'd been created.  Perhaps no one else has noticed this because
everyone else installs into existing $(prefix) directory and associated
subdirectories.  But I configure with --prefix=/p/gcc-$(date +%Y-%m-%d.%Hh%M),
so am sensitive to the install-time race condition.

Here's the patch I've been happily using every night for the
last few weeks.

FYI, this was previously reported (though with an incomplete patch)
and assigned the gnats ID, c++/1711.

gcc/:
2001-01-20  Jim Meyering  <meyering@lucent.com>

        * Makefile.in (install-common): Don't depend on installdirs here.
        Instead, make each of the lang.install-common targets (e.g.,
        c++.install-common in cp/Make-lang.in) depend on it.
	(install-driver): Depend on installdirs.

gcc/cp:
2001-01-20  Jim Meyering  <meyering@lucent.com>

        * Make-lang.in (c++.install-common): Depend on installdirs.
        (c++.install-info): Likewise
        (c++.install-man): Likewise

gcc/java:
2001-01-20  Jim Meyering  <meyering@lucent.com>

        * Make-lang.in (java.install-common): Depend on `installdirs'.
        (java.install-info): Likewise.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.601
diff -u -p -r1.601 Makefile.in
--- Makefile.in	2001/02/11 21:52:28	1.601
+++ Makefile.in	2001/02/12 15:39:37
@@ -2490,7 +2490,7 @@ installdirs:
 	-if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
 
 # Install the compiler executables built during cross compilation.
-install-common: native installdirs $(EXTRA_PARTS) lang.install-common
+install-common: native $(EXTRA_PARTS) lang.install-common
 	for file in $(COMPILERS); do \
 	  if [ -f $$file ] ; then \
 	    rm -f $(libsubdir)/$$file; \
@@ -2549,7 +2549,7 @@ install-common: native installdirs $(EXT
 
 # Install the driver program as $(target_alias)-gcc
 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
-install-driver: xgcc$(exeext)
+install-driver: installdirs xgcc$(exeext)
 	-if [ -f gcc-cross$(exeext) ] ; then \
 	  rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
 	  $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
Index: cp/ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/ChangeLog,v
retrieving revision 1.2225
diff -u -p -r1.2225 ChangeLog
--- ChangeLog	2001/02/11 21:23:41	1.2225
+++ ChangeLog	2001/02/12 15:39:47
@@ -286,6 +286,10 @@ Sun Feb  4 15:52:44 2001  Richard Kenner
 	(most_specialized_instantiation): Adjust call to
 	more_specialized.
 
+2001-01-20  Jim Meyering  <meyering@lucent.com>
+
+	* Make-lang.in (c++.install-common): Depend on installdirs.
+
 2001-01-19  Jason Merrill  <jason@redhat.com>
 
 	* decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
Index: cp/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/Make-lang.in,v
retrieving revision 1.77
diff -u -p -r1.77 Make-lang.in
--- Make-lang.in	2001/02/11 21:23:42	1.77
+++ Make-lang.in	2001/02/12 15:39:47
@@ -147,7 +147,7 @@ c++.install-normal:
 
 # Install the driver program as $(target)-g++
 # and also as either g++ (if native) or $(tooldir)/bin/g++.
-c++.install-common:
+c++.install-common: installdirs
 	-if [ -f cc1plus$(exeext) ] ; then \
 	  if [ -f g++-cross$(exeext) ] ; then \
 	    rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
@@ -185,7 +185,7 @@ c++.install-common:
 	  fi ; \
 	fi
 
-c++.install-info: c++.info
+c++.install-info: c++.info installdirs
 	if [ -f cc1plus$(exeext) ] ; then \
 	  if [ -f $(srcdir)/cp/g++int.info ]; then \
 	    rm -f $(infodir)/g++int.info*; \
@@ -202,7 +202,7 @@ c++.install-info: c++.info
 	  else true; fi; \
 	else true; fi
 
-c++.install-man: $(srcdir)/cp/g++.1
+c++.install-man: installdirs $(srcdir)/cp/g++.1
 	-if [ -f cc1plus$(exeext) ] ; then \
 	  if [ -f g++-cross$(exeext) ] ; then \
 	    rm -f $(man1dir)/$(GXX_CROSS_NAME)$(manext); \
Index: java/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/Make-lang.in,v
retrieving revision 1.52
diff -u -p -r1.52 Make-lang.in
--- Make-lang.in	2001/02/09 21:34:57	1.52
+++ Make-lang.in	2001/02/12 15:39:47
@@ -156,7 +156,7 @@ java.dvi: java/gcj.dvi
 # Nothing to do here.
 java.install-normal:
 
-java.install-common:
+java.install-common: installdirs
 	-if [ -f $(GCJ)$(exeext) ]; then \
 	  if [ -f $(GCJ)-cross$(exeext) ]; then \
 	    rm -f $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
@@ -182,7 +182,7 @@ java.uninstall:
 	-rm -rf $(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
 	-rm -rf $(bindir)/$(JAVA_CROSS_NAME)$(exeext)
 
-java.install-info:
+java.install-info: installdirs
 	if [ -f jc1$(exeext) ] ; then \
 	  if [ -f $(srcdir)/java/gcj.info ]; then \
 	    rm -f $(infodir)/gcj.info*; \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]