On 7 June 2010 20:21, Kelly O'Hair <kelly.oh...@oracle.com> wrote:
>
> Note that Windows7 is a bit of an unknown to use as far as being a build
> machine, it should work, but in
> general, the formal 32bit builds of jdk7 use older Windows releases, e.g.
> 2000 and soon that newer one "XP" ;^)
> You are trying a 64bit build with Visual Studio 10, on Windows 7, an even
> more unused combination.
>
> But in general, the windows build machine setup is a royal pain, and not
> easy at all. Believe it or not, it
> used to be much worse. :^(  Just remember to count to 10 and calm your mind
> a few times during the process.
>
> a few comments below...  but you are in very very unknown waters here.
>
> On Jun 7, 2010, at 11:27 AM, cowwoc wrote:
>
>>
>> Hi,
>>
>> I am attempting to build OpenJDK under Windows7 64-bit, Visual Studio
>> 2010.
>> Here is the output of "make sanity":
>>
>> --------------
>> ( cd  ./jdk/make && \
>>          make sanity HOTSPOT_IMPORT_CHECK=false
>> JDK_TOPDIR=C:/users/gili/DOCUME~1/jdk7/jdk7/jdk
>>
>> JDK_MAKE_SHARED_DIR=C:/users/gili/DOCUME~1/jdk7/jdk7/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-gili_2010_06_07_14_23-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 COOKED_BUILD_NUMBER=0 ANT_HOME="C:\Program
>> Files\apache-ant-1.8.0"
>
> Your ANT_HOME setting is using \ and has spaces in the path.
> Try:
>   export ANT_HOME=`cygpath -m -s "${ANT_HOME}"`
>
>> ALT_OUTPUTDIR=C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64
>>
>> ALT_LANGTOOLS_DIST=C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/langtools/dist
>>
>> ALT_CORBA_DIST=C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/corba/dist
>>
>> ALT_JAXP_DIST=C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/jaxp/dist
>>
>> ALT_JAXWS_DIST=C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/jaxws/dist
>>
>> ALT_HOTSPOT_IMPORT_PATH=C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/hotspot/import
>> BUILD_HOTSPOT=true ; )
>> /bin/sh: C:Program: command not found
>> make[1]: Entering directory
>> `/cygdrive/c/users/gili/Documents/jdk7/jdk7/jdk/make'
>>
>> C:/users/gili/DOCUME~1/jdk7/jdk7/jdk/make/common/shared/Sanity-Settings.gmk:120:
>> WARNING: ANT_VER should not be empty [Sanity-Settings.gmk]
>> /bin/sh: line 0: [: /bin/sh:: integer expression expected
>> /bin/sh: line 0: [: /bin/sh:: integer expression expected
>> /bin/sh: line 0: [: /NO_BOOTDIR/bin/java:: integer expression expected
>> /bin/sh: line 0: [: /NO_BOOTDIR/bin/java:: integer expression expected
>> /bin/sh: line 0: [: No: integer expression expected
>> /bin/sh: line 0: [: No: integer expression expected
>
> The above may all be due to the ANT_HOME, but there was some issues with
> CYGWIN 1.7. utilities not
> behaving correctly or behaving differently. But I thought that was fixed.
>
> Looks like you failed to set ALT_BOOTDIR too???
>

The ALT_BOOTDIR has spaces too: export ALT_BOOTDIR=$(cygpath -a -m -s
"C:/Program Files/Java/jdk1.7.0")

Having everything rooted in C:\openjdk would probably be a good idea.

Blame whoever at Microsoft decided having programs installed by
default in a directory with a space in it was a good idea...

>> make[2]: ***
>>
>> [C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/btbins/freetype_versioncheck.exe]
>
> Damn freetype...  sorry..
>
> The freetype sanity check trys to build a small program and then run it to
> get the freetype
> version number and also verify the freetype libraries at least load.
> So the makefile at jdk/make/tools/freetype is failing somehow.
> This freetype dependence is painful, and building it on windows is a bit
> painful, but once
> you have it built, you can set ALT_FREETYPE_* env vars to point at the
> include and lib
> directories. I don't think you can use the CYGWIN freetype libraries and
> include files, but
> I'm not sure, they would need to be 64bit too...
>
> I wish I could provide more details here, but I find freetype as frustrating
> as the rest of you. :^(

Frustrating on Windows presumably?  Because it's caused few issues
here.  The test is flawed though, as running this freetype check is
one of the things that won't work in a cross-compilation environment
either.

>
>> Error 2
>> make[1]: Leaving directory
>> `/cygdrive/c/users/gili/Documents/jdk7/jdk7/jdk/make'
>>
>> Build Machine Information:
>>  build machine = STALKER
>>
>> Build Directory Structure:
>>  CWD = /cygdrive/c/users/gili/Documents/jdk7/jdk7
>>  TOPDIR = .
>>  CONTROL_TOPDIR = .
>>  LANGTOOLS_TOPDIR = ./langtools
>>  JAXP_TOPDIR = ./jaxp
>>  JAXWS_TOPDIR = ./jaxws
>>  CORBA_TOPDIR = ./corba
>>  HOTSPOT_TOPDIR = ./hotspot
>>  JDK_TOPDIR = ./jdk
>>
>> Build Directives:
>>  BUILD_LANGTOOLS = true
>>  BUILD_JAXP = true
>>  BUILD_JAXWS = true
>>  BUILD_CORBA = true
>>  BUILD_HOTSPOT = true
>>  BUILD_JDK    = true
>>  DEBUG_CLASSFILES =
>>  DEBUG_BINARIES =
>>
>> Hotspot Settings:
>>     HOTSPOT_BUILD_JOBS  =
>>     HOTSPOT_OUTPUTDIR   =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/hotspot/outputdir
>>     HOTSPOT_EXPORT_PATH =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/hotspot/import
>>
>>
>>
>>
>> Bootstrap Settings:
>>  BOOTDIR = /NO_BOOTDIR
>>   ALT_BOOTDIR =
>>  BOOT_VER = /bin/sh: /NO_BOOTDIR/bin/java: No such file or directory
>> [requires at least 1.5]
>
> You need to set ALT_BOOTDIR to a jdk6 or jdk7 home.
>
>>  OUTPUTDIR = C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64
>>   ALT_OUTPUTDIR = C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64
>>  ABS_OUTPUTDIR = C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64
>>
>> Build Tool Settings:
>>  SLASH_JAVA = J:
>>   ALT_SLASH_JAVA =
>>  VARIANT = OPT
>>  JDK_DEVTOOLS_DIR = J:/devtools
>>   ALT_JDK_DEVTOOLS_DIR =
>>  ANT_HOME = C:\Program Files pache-ant-1.8.0
>
> see comment above on ANT_HOME
>
>>  UNIXCOMMAND_PATH = /usr/bin/
>>   ALT_UNIXCOMMAND_PATH =
>>  COMPILER_PATH = C:/PROGRA~2/MICROS~2.0/Common7/Tools/../../Vc/bin/amd64/
>>   ALT_COMPILER_PATH =
>>  DEVTOOLS_PATH = /usr/bin/
>>   ALT_DEVTOOLS_PATH =
>>  MSVCRT_DLL_PATH = C:/Windows/system32
>>   ALT_MSVCRT_DLL_PATH =
>>  MSVCRNN_DLL_PATH =
>>   ALT_MSVCRNN_DLL_PATH =
>>  MSDEVTOOLS_PATH =
>> C:/PROGRA~2/MICROS~2.0/Common7/Tools/../../Vc/bin/amd64/../../../
>>   ALT_MSDEVTOOLS_PATH =
>>  COMPILER_NAME = Microsoft Visual Studio 10 (16.00.30319.01)
>>  COMPILER_VERSION = VS2010
>>  CC_VER = 16.00.30319.01 [requires at least 16.00.30319.01]
>
> Did you run vcvars32.bat or vsvars32.bat? Just curious if the PATH, LIB and
> INCLUDE env vars are setup right.
>
>>  ZIP_VER = 3.0 [requires at least 2.2]
>>  UNZIP_VER = 6.00 [requires at least 5.12]
>>  LINK_VER = 10.00.30319.01 [requires at least 10.00.30319.01]
>>  TEMPDIR = C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/tmp
>>
>> Build Directives:
>>  OPENJDK = true
>>  USE_HOTSPOT_INTERPRETER_MODE =
>>  PEDANTIC =
>>  DEV_ONLY =
>>  NO_DOCS =
>>  NO_IMAGES =
>>  TOOLS_ONLY =
>>  INSANE =
>>  COMPILE_APPROACH = normal
>>  FASTDEBUG =
>>  COMPILER_WARNINGS_FATAL = false
>>  COMPILER_WARNING_LEVEL = 3
>>  INCREMENTAL_BUILD = false
>>  CC_HIGHEST_OPT =
>>  CC_HIGHER_OPT =
>>  CC_LOWER_OPT =
>>  CXXFLAGS =  -O1 -Zi -nologo -MD /D _STATIC_CPPLIB -Zc:wchar_t-
>> -FdC:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/tmp/obj64/.pdb
>> -FmC:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/tmp/obj64/.map
>> -wd4800 -W3 -D _CRT_SECURE_NO_DEPRECATE
>>  CFLAGS =  -O1   -Zi -nologo -MD /D _STATIC_CPPLIB -Zc:wchar_t-
>> -FdC:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/tmp/obj64/.pdb
>> -FmC:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/tmp/obj64/.map
>> -wd4800 -W3 -D _CRT_SECURE_NO_DEPRECATE
>>  BOOT_JAVA_CMD = /NO_BOOTDIR/bin/java -XX:-PrintVMOptions
>> -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Xmx896m -Xms128m
>> -XX:PermSize=32m -XX:MaxPermSize=160m
>>  BOOT_JAVAC_CMD = /NO_BOOTDIR/bin/javac  -J-XX:ThreadStackSize=1536
>> -J-XX:-PrintVMOptions -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput
>> -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding
>> ascii -source 6 -target 6 -XDignore.symbol.file=true
>>  BOOT_JAR_CMD = /NO_BOOTDIR/bin/jar
>>  BOOT_JARSIGNER_CMD = /NO_BOOTDIR/bin/jarsigner
>>
>> Build Platform Settings:
>>  USER = Gili
>>  PLATFORM = windows
>>  ARCH = amd64
>>  LIBARCH = amd64
>>  ARCH_FAMILY = amd64
>>  ARCH_DATA_MODEL = 64
>>  ARCHPROP = amd64
>>  PROCESSOR_ARCHITECTURE = x86
>>  PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 15 Stepping 11,
>> GenuineIntel
>>  USING_CYGWIN = true
>>  CYGWIN_VER = 6.1 [requires at least 4.0]
>>  CYGPATH_CMD = cygpath -a -s -m
>>  OS_VERSION = 6.1 [requires at least 5.2]
>>  OS_VARIANT_NAME =
>>  OS_VARIANT_VERSION = 6.1
>>  TEMP_FREE_SPACE = 52973652
>>  FREE_SPACE = 52973652
>>  MB_OF_MEMORY = 4095
>>
>> GNU Make Settings:
>>  MAKE = make
>>  MAKE_VER = 3.81 [requires at least 3.78]
>>  MAKECMDGOALS = sanity
>>  MAKEFLAGS = w
>>  SHELL = /bin/sh
>>
>> Target Build Versions:
>>  JDK_VERSION = 1.7.0
>>  MILESTONE = internal
>>  RELEASE = 1.7.0-internal
>>  FULL_VERSION = 1.7.0-internal-gili_2010_06_07_14_23-b00
>>  BUILD_NUMBER = b00
>>
>> External File/Binary Locations:
>>  USRJDKINSTANCES_PATH = C:/PROGRA~1/Java
>>  BUILD_JDK_IMPORT_PATH = J:/re/jdk/1.7.0/promoted/latest/binaries
>>   ALT_BUILD_JDK_IMPORT_PATH =
>>  JDK_IMPORT_PATH = J:/re/jdk/1.7.0/promoted/latest/binaries/windows-amd64
>>   ALT_JDK_IMPORT_PATH =
>
> If you use a jdk7 as ALT_BOOTDIR, you could have ALT_JDK_IMPORT_PATH point
> at the same jdk.
> But ALT_JDK_IMPORT_PATH must be a recent jdk7 build.
> This is used for partial builds, where you skip building hotspot, or just
> build the jdk7/jdk repo.

The original mail doesn't mention what's actually being compiled, but
I'm going to assume it's some recent snapshot of
http://hg.openjdk.java.net/jdk7/jdk7.

In which case, ALT_JDK_IMPORT_PATH and ALT_BINARY_PLUGS_PATH are both
unnecessary.

You could probably get away with just ALT_BOOTDIR and ANT on GNU/Linux
(ANT is probably unneeded too if your environment doesn't set
ANT_HOME).

>
>>  LANGTOOLS_DIST =
>>   ALT_LANGTOOLS_DIST =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/langtools/dist
>>  CORBA_DIST =
>>   ALT_CORBA_DIST =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/corba/dist
>>  JAXP_DIST =
>>   ALT_JAXP_DIST =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/jaxp/dist
>>  JAXWS_DIST =
>>   ALT_JAXWS_DIST =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/jaxws/dist
>>  HOTSPOT_DOCS_IMPORT_PATH = /NO_DOCS_DIR
>>   ALT_HOTSPOT_DOCS_IMPORT_PATH =
>>  HOTSPOT_IMPORT_PATH =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/WINDOW~1/hotspot/import
>>   ALT_HOTSPOT_IMPORT_PATH =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/hotspot/import
>>  HOTSPOT_SERVER_PATH =
>>
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/WINDOW~1/hotspot/import/jre/bin/server
>>   ALT_HOTSPOT_SERVER_PATH =
>>  HOTSPOT_LIB_PATH =
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/WINDOW~1/hotspot/import/lib
>>   ALT_HOTSPOT_LIB_PATH =
>>  DXSDK_VER = 0x0900
>>  DXSDK_PATH = C:/PROGRA~2/MICROS~1.0SD
>>   ALT_DXSDK_PATH =
>>  DXSDK_INCLUDE_PATH = C:/PROGRA~2/MICROS~1.0SD/Include
>>   ALT_DXSDK_INCLUDE_PATH =
>>  DXSDK_LIB_PATH = C:/PROGRA~2/MICROS~1.0SD/Lib/x64
>>   ALT_DXSDK_LIB_PATH =
>>  CACERTS_FILE = ./../src/share/lib/security/cacerts
>>   ALT_CACERTS_FILE =
>>
>> OpenJDK-specific settings:
>>  FREETYPE_HEADERS_PATH = /usr/include
>>   ALT_FREETYPE_HEADERS_PATH =
>>  FREETYPE_LIB_PATH = /usr/lib
>>   ALT_FREETYPE_LIB_PATH =
>
> I don't think the above freetype will work. See my freetype comments above.
>
>>
>> OPENJDK Import Binary Plug Settings:
>>  IMPORT_BINARY_PLUGS =
>>  BINARY_PLUGS_JARFILE =
>>
>> J:/re/jdk/1.7.0/promoted/latest/openjdk/binaryplugs/windows-amd64/jre/lib/rt-closed.jar
>>   ALT_BINARY_PLUGS_JARFILE =
>>  BINARY_PLUGS_PATH =
>> J:/re/jdk/1.7.0/promoted/latest/openjdk/binaryplugs/windows-amd64
>>   ALT_BINARY_PLUGS_PATH =
>>  BUILD_BINARY_PLUGS_PATH =
>> J:/re/jdk/1.7.0/promoted/latest/openjdk/binaryplugs
>>   ALT_BUILD_BINARY_PLUGS_PATH =
>>  PLUG_LIBRARY_NAMES =
>
> If I were you, I would explicitly set IMPORT_BINARY_PLUGS=false this may be
> the default now, not sure.
>
>>
>> Previous JDK Settings:
>>  PREVIOUS_RELEASE_PATH =
>>   ALT_PREVIOUS_RELEASE_PATH =
>>  PREVIOUS_JDK_VERSION = 1.6.0
>>   ALT_PREVIOUS_JDK_VERSION =
>>  PREVIOUS_JDK_FILE =
>>   ALT_PREVIOUS_JDK_FILE =
>>  PREVIOUS_JRE_FILE =
>>   ALT_PREVIOUS_JRE_FILE =
>>  PREVIOUS_RELEASE_IMAGE =
>>   ALT_PREVIOUS_RELEASE_IMAGE =
>>
>>
>> WARNING: The version of ant being used is older than
>>      the required version of '1.6.3'.
>>      The version of ant found was ''.
>>
>> ERROR: You do not have access to msvcr100.dll.
>>      Please check your access to
>>
>>      and/or check your value of ALT_MSVCRNN_DLL_PATH.
>
> Somewhere, perhaps in the Microsoft SDKs, the makefiles are looking for a
> copy of this dll so
> it can copy it into the built jdk image.
> This might indicate that you did not install the latest Microsoft SDK? Or
> the makefiles are having
> problems finding it.
> I would search your C:/ drive for a msvcr100.dll file, maybe in a "redist"
> directory, and see
> if you can set ALT_MSVCRNN_DLL_PATH. But make sure it is an Intel64 or amd64
> dll, not a
> 32bit one.
>
>>
>> ERROR: Your JAVA_HOME environment variable is set.  This will
>>      most likely cause the build to fail.  Please unset it
>>      and start your build again.
>
> Never leave JAVA_HOME set in your environment, just 'unset JAVA_HOME', it's
> a dangerous
> thing to set when building a jdk, so we just disallow it.
>
>>
>> ERROR: FreeType version  2.3.0  or higher is required.
>> make[2]: Entering directory
>> `/cygdrive/c/users/gili/Documents/jdk7/jdk7/jdk/make/tools/freetypecheck'
>> /usr/bin/mkdir -p
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/btbins
>> rm -f
>>
>> C:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/btbins/freetype_versioncheck.exe
>> C:/PROGRA~2/MICROS~2.0/Common7/Tools/../../Vc/bin/amd64/cl /nologo /c
>> -I/usr/include -I/usr/include/freetype2 -DREQUIRED_FREETYPE_VERSION=2.3.0
>>
>> -FoC:/users/gili/DOCUME~1/jdk7/jdk7/build/windows-amd64/btbins/freetype_versioncheck.obj
>> freetypecheck.c
>> freetypecheck.c
>> freetypecheck.c(29) : fatal error C1083: Cannot open include file:
>> 'stdio.h': No such file or directory
>
> Yeah. It's trying to build a freetype check program with VS2010, and
> probably found a stdio.h
> from the CYGWIN /usr/include, not the stdio.h you want.
> The problem is that you need the freetype include files which are mixed in
> with the CYGWIN
> C/C++ gcc include files. But even if you managed this, the dll used I don't
> think is right anyway.
> You need a dll built with Visual Studio 2010 compilers, which means
> downloading freetype
> sources and building it, and saving those files. Yes, I know, painful. Sorry
> in advance. ;^(
>
>> make[2]: Leaving directory
>> `/cygdrive/c/users/gili/Documents/jdk7/jdk7/jdk/make/tools/freetypecheck'
>> Failed to build freetypecheck.
>>
>> Exiting because of the above error(s).
>>
>> make: *** [post-sanity] Error 1
>> --------------
>>
>> Is there an easy way for me to figure out which file/line is causing these
>> kinds of errors?
>>
>
> Many different issues here, like I said, windows is a pain, and you are in
> uncharted territory.
>
> Hope something I've provide helps.
>
> -kto
>
>> "/bin/sh: C:Program: command not found"
>>
>> or why Ant's version isn't being detected even though I provide the
>> correct
>> path...
>>
>> Thanks,
>> Gili
>> --
>> View this message in context:
>> http://old.nabble.com/Help-building-under-Windows7-64-bit-tp28808920p28808920.html
>> Sent from the OpenJDK Build Infrastructure mailing list archive at
>> Nabble.com.
>>
>
>



-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

Reply via email to