JDK7 build under windows
Pete Brunet
peter.brunet at oracle.com
Mon Aug 2 14:16:19 UTC 2010
John, This is my ALT_BOOTDIR:
set ALT_BOOTDIR=C:/Progra~1/Java/jdk1.6.0_20
Notice the forward slashes.
HTH, Pete
John Francis wrote:
>
> I am trying to build openjdk7 b100 under Windows Server 2008 SP2.
>
> I am using cygwin 1.7+
>
> I am having trouble with openjdk/langtools/make
>
> 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
>
> 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 ( http://ant.apache.org/manual/platform.html ) 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.
>
> 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?
>
>
>
> 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...
>
>
> <target name="-def-check">
>
> <macrodef name="check">
>
> <attribute name="name"/>
>
> <attribute name="property"/>
>
> <attribute name="marker" default=""/>
>
> <sequential>
>
> <echo message="-def-check @@{name} is '@{name}'" />
>
> <echo message="-def-check @@{property} is '@{property}'" />
>
> <echo message="-def-check @@{marker} is '@{marker}'" />
>
> <echo message="-def-check $${@@{property}} is '${@{property}}'" />
>
> <echo message="-def-check $${@@{property}}/@@{marker} is
> '${@{property}}/@{marker}'" />
>
> <available property="foo" file="${@{property}}/@{marker}"
> value="available" />
>
> <echo message="-def-check $${@@{property}}/@@{marker} is ${foo}" />
>
> <available property="foo2"
> file="C:\development\JDK\bootJDK\jdk1.6.0_18/bin/java.exe"
> value="available" />
>
> <echo message="-def-check a proper windows path is ${foo2}" />
>
> ….
>
>
> outputs;
>
>
> -check-boot.java.home:
>
> [echo] -def-check @{name} is 'bootstrap java'
>
> [echo] -def-check @{property} is 'boot.java.home'
>
> [echo] -def-check @{marker} is 'bin/java.exe'
>
> [echo] -def-check ${@{property}} is
> '/cygdrive/c/DEVELO~1/JDK/bootJDK/JDK16~1.0_1'
>
> [echo] -def-check ${@{property}}/@{marker} is
> '/cygdrive/c/DEVELO~1/JDK/bootJDK/JDK16~1.0_1/bin/java.exe'
>
> [echo] -def-check ${@{property}}/@{marker} is ${foo}
>
> [echo] -def-check a proper windows path is available
>
>
>
> here is my cygwin.bat
>
>
> @echo off
>
>
> @echo Remember old LIB INCLUDE and PATH, in case needed and set to
> WIN_ORIG_XXX.
>
> set WIN_ORIG_INCLUDE=%INCLUDE%
>
> set WIN_ORIG_LIB=%LIB%
>
> set WIN_ORIG_PATH=%PATH%
>
>
> @echo Clear LIB, PATH, INCLUDE ** and ** CLASSPATH
>
> set INCLUDE=
>
> set LIB=
>
> set PATH=
>
> set CLASSPATH=
>
>
> rem setup INCLUDE, LIB, PATH for M$ VC
>
> call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
>
>
> @echo Set up special VC_PATH variable to be picked up in .bashrc and
> placed on the path before cygwin.
>
> set VC_PATH=%PATH%
>
>
> @echo Clear Path to nothing ... just take what cygwin provides, do not
> edit /etc/profile which is edited only by cygwin.
>
> set PATH=
>
>
> rem setup ALT_XXX vars for OpenJDK
>
> set ALT_BOOTDIR=C:\development\JDK\bootJDK\jdk1.6.0_18
>
> set
> ALT_BINARY_PLUGS_PATH=C:\development\JDK\openjdk7-b100\openjdk-binary-plugs
>
> set ANT_HOME=C:\development\apache-ant-1.8.1
>
> rem allow openjdk to find this for itself
>
> rem set ALT_MSVCRT_DLL_PATH=C:\Program Files\Microsoft Visual Studio
> 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll
>
>
> set ALT_FREETYPE_HEADERS_PATH=C:/development/GnuWin32/include
>
> set ALT_FREETYPE_LIB_PATH=C:/development/GnuWin32/lib
>
>
> rem This is one of my own
>
> set ALT_MT_PATH=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
>
>
>
> rem DSDK should already be on the path
>
>
>
> @echo on
>
>
> set CYGWIN=upcaseenv
>
>
> @echo off
>
>
> C:
>
> chdir C:\cygwin\bin
>
>
> bash --login -i
>
>
>
>
>
> here is my .bashrc;
>
>
>
> # User dependent .bashrc file
>
>
> # Environment Variables
>
> # #####################
>
>
> # TMP and TEMP are defined in the Windows environment. Leaving
>
> # them set to the default Windows temporary directory can have
>
> # unexpected consequences.
>
> unset TMP
>
> unset TEMP
>
>
> # ADDITIONS - JF
>
> # ##############
>
>
>
> # set up OpenJDK vars
>
>
> ALT_BOOTDIR=`cygpath -d $ALT_BOOTDIR`
>
> #ALT_BOOTDIR=`cygpath -p --unix "$ALT_BOOTDIR"`
>
> echo $ALT_BOOTDIR
>
> export ALT_BOOTDIR
>
>
> ALT_BINARY_PLUGS_PATH=`cygpath -d "$ALT_BINARY_PLUGS_PATH"`
>
> ALT_BINARY_PLUGS_PATH=`cygpath -p --unix "$ALT_BINARY_PLUGS_PATH"`
>
> export ALT_BINARY_PLUGS_PATH
>
>
>
> #ALT_MSVCRT_DLL_PATH=`cygpath -d "$ALT_MSVCRT_DLL_PATH"`
>
> #ALT_MSVCRT_DLL_PATH=`cygpath -p --unix "$ALT_MSVCRT_DLL_PATH"`
>
> #export ALT_MSVCRT_DLL_PATH
>
>
> ANT_HOME=`cygpath -d "$ANT_HOME"`
>
> ANT_HOME=`cygpath -p --unix "$ANT_HOME"`
>
> export ANT_HOME
>
>
> ALT_MT_PATH=`cygpath -d "$ALT_MT_PATH"`
>
> ALT_MT_PATH=`cygpath -p --unix "$ALT_MT_PATH"`
>
> export ALT_MT_PATH
>
>
> # Put the VC Linker before cygwin
>
> UNIX_VC_PATH=`cygpath -p --unix "$VC_PATH"`
>
> export UNIX_VC_PATH
>
> PATH=$UNIX_VC_PATH:$PATH
>
> export PATH
>
>
> # Ensure ant is on the path - note this will fail unless JAVA_HOME is
> set??? which we can't
>
> # PATH=$PATH:$ANT_HOME/bin
>
> # export PATH
>
>
> cd /cygdrive/c/development/JDK/openjdk7-b100/openjdk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20100802/0b88bb8d/attachment.htm>
More information about the build-dev
mailing list