How to test a fresh HotSpot build on Windows without building the whole JDK?

Volker Simonis volker.simonis at gmail.com
Wed Nov 19 10:49:20 PST 2008


Here are my findings so far:

I build on the command line of course (hey, I'm a real man:) From
hotspot/make from within a Cygwin bash I do:

ALT_BOOTDIR=/cygdrive/d/Software/jdk1.6.0_10
ALT_OUTPUTDIR=../../build/hotspot_amd64_fastdebug
ALT_JDK_IMPORT_PATH=/cygdrive/d/Software/jdk1.7.0_x64_debug_b39 make
fastdebug 2>&1 | tee ../../build/hotspot_amd64_fastdebug.log

Besides some warnings which I had to eliminate and the additional
'cl'-paramters "/D _CRT_SECURE_NO_DEPRECATE /D
_CRT_NONSTDC_NO_DEPRECATE" which I had to supply (I'll submit a patch,
once I'm done), the build succeeded. Just for the sake of completness,
the Makefile calls "nmake" with the following command line, which
looks quite reasonable to me:

nmake /NOLOGO -f d:/priv/d046063/OpenJDK/jdk7/hotspot/make/windows/build.make \
                      Variant=compiler2 \
                      WorkSpace=d:\\priv\\d046063\\OpenJDK\\jdk7\\hotspot \
                      BootStrapDir=d:\\Software\\jdk1.6.0_10 \
                      BuildUser=D046063 \
                       LP64=1 ARCH=x86 BUILDARCH=amd64
Platform_arch=x86 Platform_arch_model=x86_64 JDK_MKTG_VERSION=7.0
JDK_MAJOR_VER=1 JDK_MINOR_VER=7 JDK_MICRO_VER=0
JAVA_HOME=d:\\Software\\jdk1.6.0_10
OUTPUTDIR=d:\\priv\\d046063\\OpenJDK\\jdk7\\build\\hotspot_amd64_fastdebug
GAMMADIR=d:\\priv\\d046063\\OpenJDK\\jdk7\\hotspot MAKE_VERBOSE=y
HOTSPOT_RELEASE_VERSION=14.0-b06 JRE_RELEASE_VERSION="1.7.0"
HOTSPOT_BUILD_VERSION=internal fastdebug

After the build I've copied the "jvm.dll" into the server directory of
a JDK 7 debug build (b39) and got the error described in my previous
mail. Menawhile I found out (by using "DependencyWalker" on the
generated "jvm.dll") that "jvm.dll" is dynamically linked to
"msvcr80.dll" which can not be found when java is started. So I copied
"msvcr80.dll" into the same directory where "java.exe" is located. Now
the dll is found, but I get another error:

C Run-Time Error R6034 - "An application has made an attempt to load
the C runtime library incorrectly."

The Microsoft documentation at
http://msdn.microsoft.com/en-us/library/ms235560(VS.80).aspx explains:
"An application has made an attempt to load the C runtime library
without using a manifest. This is an unsupported way to load Visual
C++ DLLs. You need to modify your application to build with a
manifest. For more information, see the "Visual C++ Libraries as
Shared Side-by-Side Assemblies" topic in the product documentation."

This also explains why "msvcr80.dll" couldn't be found in the first
place - it is located in the SideBySide Assemblies directory under:
C:\WINDOWS\WinSxS\

So apparently I have to link jvm.dll somhow specially if I use VS2005
and use "mt.exe" in order to add a mainfest to it. Does anybody has
experience with this?

Thank you and best regards,
Volker

PS: I just rememered the change "6764892: VS2008 changes required to
compile hotspot sources" which has been recently posted on the list:
http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/3c07cda72b7d.
But it was in hotspot-comp and I synced jdk7:(  I'll try it tomorrow -
looks like this could solve my problems...


On 11/19/08, Tom Rodriguez <Thomas.Rodriguez at sun.com> wrote:
> That's a reasonable way to test your built jvm.dll so I would suspect some build problem.  Did you build it using the generated project file inside VS or make/windows/build.bat?  It's possible there are some issues with the generated project file.  The machinery for generating that is separate from our normal make process so it will sometimes be broken until some one notices it.  You might compare the symbol exports between your build and the standard one.
>
>  tom
>
>
>  On Nov 19, 2008, at 2:08 AM, Volker Simonis wrote:
>
>
> >  Hi,
> >
> >  I've just built a 64-bit debug HotSpot on Windows and I realized that
> >  under Windows there's no "gamma" launcher like under Linux/Solaris
> >  which can be used to run a freshly build HotSpot with an existing JDK
> >  by setting the JAVA_HOME environment variable. The quick hack of just
> >  replacing the "jvm.dll" (together with "jvm.map" and "jvm.pdb") of a
> >  recent 64-bit Java 7 debug release (b39) with my newly build versions
> >  of these files didn't work either:
> >
> >  Error: loading: d:\Software\jdk1.7.0_x64_b39\jre\bin\server\jvm.dll
> >
> >  Is there a simple way how one can run a freshly build  HotSpot on
> >  Windows without building the whole JDK?
> >
> >  I should also mention that I built the HotSpot with VS 2005 which to
> >  my knowledge is different from the version that was used to build the
> >  Java 7 binaries. May this be a problem?
> >
> >  Any suggestions are highly welcome.
> >
> >  Volker
> >
>
>



More information about the hotspot-dev mailing list