I too have had some problems building jdk7 on cygwin.   I believe they are 
caused by
changeset:   3279:4e70663f0163
   parent:      3219:435b477c4f14
   user:        ohair
   date:        Tue Dec 21 18:21:26 2010 -0800
summary: 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location

I am in the process of submitting a CR with my findings.

FWIW, my workarounds are in jdk file Defs-windows.gmk:
1.   makefile assumes cygwin is at c:/cygwin which isn't true for me.  
Workaround is:
ifdef USING_CYGWIN
CYGPATH_CMD=cygpath -a -s -m
CYGWINHOME:=$(shell $(CYGPATH_CMD) /)
# All possible drive letters
drives=a b c d e f g h i j k l m n o p q r s t v u w x y z
# Convert /cygdrive/ paths to the mixed style without an exec of cygpath
#   Must be a path with no spaces.
define MixedPath
$(patsubst /%,$(CYGWINHOME)/%,$(sort $(filter-out /cygdrive/%,$(foreach drive,$(drives),$(patsubst /cygdrive/$(drive)/%,$(drive):/%,$1)))))
endef

2  $(call MixedPath,/cygdrive/j) returns empty .  Workaround is:
define FullPath
$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL))
endef

3.  I was setting ALT_UNIXCOMMAND_PATH to /usr/bin and had to change it to /bin
 This could have been a side effect of the first three issues.

I don't know if these workarounds would work for you or not.
- jjh


On 1/14/2011 6:26 AM, Dang Nhan Nguyen wrote:
Hi All,

I recently built OpenJDK again from sources obtained from Mercurial repos 
(Windows x86_64/cygwin).
I used the same steps and configuration that I did (and succeeded) before with 
Bundle sources I download from the webpage.
However, this time I got some unexpected error:

*********************************************************************
CommandPrompt$>  buildenv.bat                   %%see buildenv.bat below
bash-3.2$ unset JAVA_HOME
bash-3.2$ make sanity
jdk/make/common/shared/Defs-windows.gmk:197: "WARNING: Value of _system_root can
not be empty, will use 'C:/WINNT'"
jdk/make/common/shared/Defs-windows.gmk:561: "WARNING: Value of MSVCRT_DLL_PATH
cannot be empty, check or set ALT_MSVCRT_DLL_PATH"
jdk/make/common/shared/Defs-windows.gmk:587: "WARNING: Value of MSVCRNN_DLL_PATH
  cannot be empty, check or set ALT_MSVCRNN_DLL_PATH"
jdk/make/common/shared/Defs-windows.gmk:600: "WARNING: Value of DXSDK_PATH canno
t be empty, check or set ALT_DXSDK_PATH"
cygwin warning:
   MS-DOS style path detected: C:/WINNT/system32/wscript.exe
   Preferred POSIX equivalent is: /cygdrive/c/WINNT/system32/wscript.exe
   CYGWIN environment variable option "nodosfilewarning" turns off this warning.
   Consult the user's guide for more details about POSIX paths:
     http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
jdk/make/common/shared/Compiler-msvc.gmk:150: *** COMPILER_PATH cannot be empty
here.  Stop.
*********************************************************************

The warning and error is unreasonable since all the mentioned environment 
variables were set (see my configuration scripts: buildenv.bat below). And when 
I check the output directory (D:/Tools/openjdk/jdk7_b121_x86_64_mer), there is 
no content inside even a log for sanity check.

As I said, with the same steps and configuration file, I succeeded building the 
OpenJDK Bundle. I want to take the course from Mercurial repos because it has 
src\share\tools\ProjectCreator that the bundle version does not have.

Could someone please explain what happened and help me through this problem?

Thank you,
/Nhan


buildenv.bat scripts:
********************************
call C:\PROGRA~2\MICROS~2.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat

set VSINSTALLDIR=C:/PROGRA~2/MICROS~2.0
set VCINSTALLDIR=%VSINSTALLDIR%/VC

set 
PATH=%VSINSTALLDIR%/VC/BIN/x86_amd64;%VSINSTALLDIR%/Common7/IDE;C:/PROGRA~2/MIA713~1/Windows/v7.0A/Bin/x64;%ANT_HOME%/bin;C:/PROGRA~1/Java/JDK16~1.0_1/bin;c:/cygwin/bin;D:/Tools/ft_64/lib;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;%VSINSTALLDIR%/VC/BIN/amd64;%PATH%

set JAVA_HOME=

set ANT_HOME=d:/Tools/APACHE~1.0
set ALT_BOOTDIR=c:/PROGRA~1/Java/JDK16~1.0_1
set ALT_OUTPUTDIR=D:/Tools/openjdk/jdk7_b121_x86_64_mer

set ALT_MSVCRT_DLL_PATH=C:/Windows/System32
set ALT_DXSDK_PATH=C:/PROGRA~2/MICROS~1.0SD
set ALT_COMPILER_PATH=%VCINSTALLDIR%/BIN/amd64
set WindowsSdkDir=C:\PROGRA~2\MIA713~1\Windows\v7.0A
set INCLUDE=%VSINSTALLDIR%/vc/include;%WindowsSdkDir%/include
set LIB=%VSINSTALLDIR%/vc/lib/amd64;%WindowsSdkDir%/lib/x64
set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%/VC/redist/x64/Microsoft.VC100.CRT
set ALT_MSDEVTOOLS_PATH=C:/PROGRA~2/MIA713~1/Windows/v7.0A
set ALT_COMPILER_PATH=%VSINSTALLDIR%/VC/BIN/x86_amd64

set ALT_FREETYPE_HEADERS_PATH=D:/Tools/ft_64/include
set ALT_FREETYPE_LIB_PATH=D:/Tools/ft_64/lib
********************************

Reply via email to