<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Since some of the tools used during the build (like ant, java, etc.) do not understand the cygwin style paths<div>like /cygdrive/c/, you need to use the so called 'mixed style' of drive letters and / characters, e.g. C:/</div><div>You can use the command 'cygpath -m -s -a' on a path to get the right style, e.g.</div><div>   export ALT_BOOTDIR=`cygpath -m -s -a "${ALT_BOOTDIR}"`</div><div><br></div><div>The -m gets you mixed style, the -s gets you a short path without spaces, and the -a gets you an absolute path.</div><div>But the path needs to exist for cygpath to work.</div><div><br></div><div>-kto</div><div><br><div><div>On Aug 2, 2010, at 5:10 AM, John Francis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div bgcolor="#ffffff" text="#000000"><p class="western" style="margin-bottom: 0cm;">I am trying to build openjdk7 b100 under Windows Server 2008 SP2.</p><p class="western" style="margin-bottom: 0cm;">I am using cygwin 1.7+</p><p class="western" style="margin-bottom: 0cm;">I am having trouble with openjdk/langtools/make</p><p class="western" style="margin-bottom: 0cm;">The Makefile there sets up some java support for Ant using the ALT_BOOTDIR, which therefore must be a valid cygwin path, such as /cygdrive/c/DEVELO~1/JDK/bootJDK/JDK16~1.0_1</p><p class="western" style="margin-bottom: 0cm;">However if set to a cygwin style path, the ant build.xml in openjdk/langtools/make fails because it uses the available task to test the correctness of the boot.java.home property ( set from the same Makefile which had to have the cygwin path ). As you doubtless know ( <a href="http://ant.apache.org/manual/platform.html">http://ant.apache.org/manual/platform.html</a> ) when ant is executed by cygwin it still expects Windows path names. I could doubtless hack the build.properties or Makefile to set the boot.java.home to a windows path, but I am concerned that I am doing something else wrong which I will have to fix again and again.</p><p class="western" style="margin-bottom: 0cm;">What format should ALT_BOOTDIR have when running cygwin? Windows or cygwin? Is there some property file I can edit to satisfy all the build?</p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;">Here is the output of an edited build.xml when I set ALT_BOOTDIR to a cygwin path ( see below for the redefined macro, check...</p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"><target name="-def-check"></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"><macrodef name="check"></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"><attribute name="name"/></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"><attribute name="property"/></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"><attribute name="marker" default=""/></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"><sequential> </font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check @@{name} is '@{name}'" /></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check @@{property} is '@{property}'" /></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check @@{marker} is '@{marker}'" /></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check $${@@{property}} is '${@{property}}'" /></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check $${@@{property}}/@@{marker} is '${@{property}}/@{marker}'" /></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <available property="foo" file="${@{property}}/@{marker}" value="available" /> </font></font> </p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check $${@@{property}}/@@{marker} is ${foo}" /></font></font></p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <available property="foo2" file="C:\development\JDK\bootJDK\jdk1.6.0_18/bin/java.exe" value="available" /> </font></font> </p><p class="western" style="margin-bottom: 0cm;"> <font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"> <echo message="-def-check a proper windows path is ${foo2}" /></font></font></p><p class="western" style="margin-bottom: 0cm;">…<font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">.</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;">outputs;</p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;">-check-boot.java.home:</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check @{name} is 'bootstrap java'</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check @{property} is 'boot.java.home'</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check @{marker} is 'bin/java.exe'</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check ${@{property}} is '/cygdrive/c/DEVELO~1/JDK/bootJDK/JDK16~1.0_1'</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check ${@{property}}/@{marker} is '/cygdrive/c/DEVELO~1/JDK/bootJDK/JDK16~1.0_1/bin/java.exe'</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check ${@{property}}/@{marker} is ${foo}</p><p class="western" style="margin-bottom: 0cm;"> [echo] -def-check a proper windows path is available</p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;">here is my cygwin.bat</p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo off</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo Remember old LIB INCLUDE and PATH, in case needed and set to WIN_ORIG_XXX.</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set WIN_ORIG_INCLUDE=%INCLUDE%</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set WIN_ORIG_LIB=%LIB%</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set WIN_ORIG_PATH=%PATH%</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo Clear LIB, PATH, INCLUDE ** and ** CLASSPATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set INCLUDE=</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set LIB=</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set PATH=</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set CLASSPATH=</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">rem setup INCLUDE, LIB, PATH for M$ VC</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo Set up special VC_PATH variable to be picked up in .bashrc and placed on the path before cygwin.</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set VC_PATH=%PATH%</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo Clear Path to nothing ... just take what cygwin provides, do not edit /etc/profile which is edited only by cygwin.</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set PATH=</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">rem setup ALT_XXX vars for OpenJDK</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set ALT_BOOTDIR=C:\development\JDK\bootJDK\jdk1.6.0_18 </font></font> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set ALT_BINARY_PLUGS_PATH=C:\development\JDK\openjdk7-b100\openjdk-binary-plugs</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set ANT_HOME=C:\development\apache-ant-1.8.1</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">rem allow openjdk to find this for itself</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">rem set ALT_MSVCRT_DLL_PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set ALT_FREETYPE_HEADERS_PATH=C:/development/GnuWin32/include</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set ALT_FREETYPE_LIB_PATH=C:/development/GnuWin32/lib</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">rem This is one of my own</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set ALT_MT_PATH=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">rem DSDK should already be on the path</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo on</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">set CYGWIN=upcaseenv</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">@echo off</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">C:</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">chdir C:\cygwin\bin</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">bash --login -i</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;">here is my .bashrc;</p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># User dependent .bashrc file</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># Environment Variables</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># #####################</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># TMP and TEMP are defined in the Windows environment. Leaving</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># them set to the default Windows temporary directory can have</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># unexpected consequences.</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">unset TMP</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">unset TEMP</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># ADDITIONS - JF</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># ##############</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># set up OpenJDK vars </font></font> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ALT_BOOTDIR=`cygpath -d $ALT_BOOTDIR`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">#ALT_BOOTDIR=`cygpath -p --unix "$ALT_BOOTDIR"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">echo $ALT_BOOTDIR</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">export ALT_BOOTDIR</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ALT_BINARY_PLUGS_PATH=`cygpath -d "$ALT_BINARY_PLUGS_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ALT_BINARY_PLUGS_PATH=`cygpath -p --unix "$ALT_BINARY_PLUGS_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">export ALT_BINARY_PLUGS_PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">#ALT_MSVCRT_DLL_PATH=`cygpath -d "$ALT_MSVCRT_DLL_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">#ALT_MSVCRT_DLL_PATH=`cygpath -p --unix "$ALT_MSVCRT_DLL_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">#export ALT_MSVCRT_DLL_PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ANT_HOME=`cygpath -d "$ANT_HOME"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ANT_HOME=`cygpath -p --unix "$ANT_HOME"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">export ANT_HOME</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ALT_MT_PATH=`cygpath -d "$ALT_MT_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">ALT_MT_PATH=`cygpath -p --unix "$ALT_MT_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">export ALT_MT_PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># Put the VC Linker before cygwin</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">UNIX_VC_PATH=`cygpath -p --unix "$VC_PATH"`</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">export UNIX_VC_PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">PATH=$UNIX_VC_PATH:$PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">export PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># Ensure ant is on the path - note this will fail unless JAVA_HOME is set??? which we can't</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># PATH=$PATH:$ANT_HOME/bin</font></font></p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2"># export PATH</font></font></p><p class="western" style="margin-bottom: 0cm;"><br> </p><p class="western" style="margin-bottom: 0cm;"><font face="Courier New, monospace"><font style="font-size: 10pt;" size="2">cd /cygdrive/c/development/JDK/openjdk7-b100/openjdk</font></font></p> </div> </blockquote></div><br></div></body></html>