United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8012366 Fix for 8007815 breaks down when only building OpenJDK (without deploy and install forests)
JDK-8012366 : Fix for 8007815 breaks down when only building OpenJDK (without deploy and install forests)

Details
Type:
Bug
Submit Date:
2013-04-16
Status:
Resolved
Updated Date:
2013-11-19
Project Name:
JDK
Resolved Date:
2013-07-17
Component:
infrastructure
OS:
Sub-Component:
build
CPU:
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u40
Fixed Versions:
7u40 (b35)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
The top level makefiles try to step into install and do something.  If install is not there, the build fails with an error.  See example below:


[...] tried to build jdk7u-dev locally on my machine and it fails with the message:

########################################################################
########################################################################
##### Entering install for target(s) binaries-jdk-debug            #####
########################################################################

(cd  ./install/make/installer/binaries/linux && \
      make binaries-jdk-debug JDK_TOPDIR=/home/ehelin/code/oracle/disable-fasttime/jdk JDK_MAKE_SHARED_DIR=/home/ehelin/code/oracle/disable-fasttime/jdk/make/common/shared EXTERNALSANITYCONTROL=true SOURCE_LANGUAGE_VERSION=7 TARGET_CLASS_VERSION=7 MILESTONE=internal BUILD_NUMBER=b00 JDK_BUILD_NUMBER=b00 FULL_VERSION=1.7.0-internal-fastdebug-ehelin_2013_04_16_15_31-b00 PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0 JDK_MKTG_VERSION=7 JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 ARCH_DATA_MODEL=64 VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true COOKED_BUILD_NUMBER=0 ALT_OUTPUTDIR=/home/ehelin/code/oracle/disable-fasttime/build/linux-amd64/../linux-amd64-fastdebug ALT_RTPATCH_DIR= ALT_BASE_IMAGE_ZIP= ALT_BASE_IMAGE_DIR= ALT_NEW_IMAGE_DIR= ALT_BUNDLE_DATE=16_apr_2013 INSTALL_DEBUG_NAME=fastdebug ALT_LANGTOOLS_DIST=/home/ehelin/code/oracle/disable-fasttime/build/linux-amd64/../linux-amd64-fastdebug/langtools/dist)
/bin/sh: 1: cd: can't cd to ./install/make/installer/binaries/linux
make[2]: *** [install-binaries-jdk-debug] Error 2
make[2]: Leaving directory `/home/ehelin/code/oracle/disable-fasttime'
make[1]: *** [generic_debug_build] Error 2
make[1]: Leaving directory `/home/ehelin/code/oracle/disable-fasttime'
make: *** [build_fastdebug_image] Error 2

I noticed that you had committed change 613 - "8007815: extend HAVE_JPRT_SAVE_BUNDLES from product builds to all builds". I have run:

  sh get_source.sh

but everything is up to date. Am I missing something?


                                    

Comments
I think what we need is:

% hg diff make/install-rules.gmk
diff --git a/make/install-rules.gmk b/make/install-rules.gmk
--- a/make/install-rules.gmk
+++ b/make/install-rules.gmk
@@ -100,18 +100,22 @@ combo_build:

 install-binaries-jdk-debug:
 ifeq ($(BUILD_INSTALL_BUNDLES), true)
-       @$(call MakeStart,install,binaries-jdk-debug)
-       ($(CD) $(INSTALL_TOPDIR)/make/installer/binaries/$(PLATFORM) && \
-         $(MAKE) binaries-jdk-debug $(INSTALL_BUILD_ARGUMENTS))
-       @$(call MakeFinish,install,binaries-jdk-debug)
+       if [ -r $(INSTALL_TOPDIR)/make/installer/binaries/$(PLATFORM)/Makefile ]; then \
+         @$(call MakeStart,install,binaries-jdk-debug); \
+         ($(CD) $(INSTALL_TOPDIR)/make/installer/binaries/$(PLATFORM) && \
+           $(MAKE) binaries-jdk-debug $(INSTALL_BUILD_ARGUMENTS)); \
+         @$(call MakeFinish,install,binaries-jdk-debug); \
+       fi
 endif

 install-binaries-jdk-debug-clobber:
 ifeq ($(BUILD_INSTALL_BUNDLES), true)
-       @$(call MakeStart,install,binaries-jdk-debug-clobber)
-       ($(CD) $(INSTALL_TOPDIR)/make/installer/binaries/$(PLATFORM) && \
-         $(MAKE) binaries-jdk-debug-clobber $(INSTALL_BUILD_ARGUMENTS))
-       @$(call MakeFinish,install,binaries-jdk-debug-clobber)
+       if [ -r $(INSTALL_TOPDIR)/make/installer/binaries/$(PLATFORM)/Makefile ]; then \
+         @$(call MakeStart,install,binaries-jdk-debug-clobber); \
+         ($(CD) $(INSTALL_TOPDIR)/make/installer/binaries/$(PLATFORM) && \
+           $(MAKE) binaries-jdk-debug-clobber $(INSTALL_BUILD_ARGUMENTS)); \
+         @$(call MakeFinish,install,binaries-jdk-debug-clobber); \
+       fi
 endif

 install-clobber:


It fits the style elsewhere in the same file.



                                     
2013-04-16
Fix understood and out for review/approval:

  http://cr.openjdk.java.net/~tbell/8012366/webrev.00/

                                     
2013-07-08
Review feedback:

> How did BUILD_INSTALL ever become true on an OpenJDK build?

                                     
2013-07-09
I would have to concur, it seems very strange to have BUILD_INSTALL be true when there is no install repo. The better fix would seem to be to make sure BUILD_INSTALL is false if there is no install repo.
                                     
2013-07-09
Closing as user error / will not fix.  Setting BUILD_INSTALL=true when all you have is an OpenJDK source tree is a user error.

                                     
2013-07-09
Reopening.  My evaluation was incorrect.

Running the 'generic_debug_build' rule in the top level Makefile sets "BUILD_INSTALL_BUNDLES=true", which causes the 'install-binaries-jdk-debug' rule in the same Makefile to also run.  This dives into make/install-rules.gmk in a place where BUILD_INSTALL is not checked.

                                     
2013-07-10
Revised fix out for review:

  http://cr.openjdk.java.net/~tbell/8012366/webrev.01/

                                     
2013-07-10
I'm assuming that we don't need SQE-OK for this issue?
                                     
2013-07-16
> we don't need SQE-OK for this issue?

That is correct.  This is a build-time issue only.

                                     
2013-07-17
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u40-dev/rev/f6f6f414cdfe
User:  tbell
Date:  2013-07-17 15:38:58 +0000

                                     
2013-07-17
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u40/rev/f6f6f414cdfe
User:  lana
Date:  2013-07-22 17:29:07 +0000

                                     
2013-07-22



Hardware and Software, Engineered to Work Together