United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6590549 : Cygwin build of OpenJDK has problems and not very well documented

Details
Type:
Bug
Submit Date:
2007-08-08
Status:
Closed
Updated Date:
2014-03-03
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
OpenJDK6
Fixed Versions:

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
OPENJDK variable is set after Platform.gmk is loaded.
It should be set before including other files (it is used in the Platform.gmk for freetype-related logic)
(In fact this is generic problem with easy woraround - just set environment variable prior to running make).

Cygwin build fails on compilation of generated java files with listing of locales.
It failed because string literals contained bunch of "\r" chars.
These were introduced by cygwin's awk.

Solution is to always explicitly request binary mode for awk.
It can be done either explicitly in the make\java\java\localegen.sh
($localelist=`$NAWK -v BINARY=w -F....)
or (better) "-v BINARY=w" should be added to NAWK definition 
(btw, we do already distinguish cygwin case when define NAWK). 
In later case additional changes in the makefiles will be required to properly 
call awk.
E.g. in the make\java\java\genlocales.gmk instead of 
	NAWK=$(NAWK) SED=$(SED) $(SH) $(LOCALEGEN_SH) ...
use
	NAWK="$(NAWK)" SED=$(SED) $(SH) $(LOCALEGEN_SH) ...

Things to fix in the README-builds.html:
  - introduce ALT_JDK_IMPORT_PATH
  - mention that cygwin make has to be downgraded to 3.80
  - may be introduce ALT_UNICOWS_* (unless it will be removed from the build requirements)
  - mention that following Cygwin packages are required: zip, unzip
  - perhaps insert sample bat file to be used to start build
     (for linux build sample shell script can be useful for begginers).

                                    

Comments
EVALUATION

Freetype releated makefile issue was fixed by Kelly as part of 6654456.
ALT_UNICOWS_* is not needed anymore.

Rest is mostly doc and makefile clean up (low priority).
Reassigning to Kelly.
                                     
2008-03-24
EVALUATION

Fix related to AWK is being investigated. Looks like it's BINMODE not BINARY. These are makefile changes and will take some time to test.

The README-builds.html file will be changed to include:
  - introduce ALT_JDK_IMPORT_PATH
  - mention that cygwin make has to be downgraded to 3.80 (added more, already had some)
  - mention that following Cygwin packages are required: zip, unzip, free, awk, etc.

The defaults in the makefiles attempt to find what they can, but some things are difficult to know what to use.
See the file
  http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/tip/make/jdk_generic_profile.sh
which could be included in a shell to set some basics.
                                     
2008-04-21
EVALUATION

See http://hg.openjdk.java.net/jdk7/build/jdk/rev/7971bbb6dc42
                                     
2008-05-16



Hardware and Software, Engineered to Work Together