Compile hotspot VS2010 project errors,
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Dec 22 18:06:36 UTC 2010
Hi,
I think that you now have run into the issue that VS 2010 thinks it should compile hpp-files. The fix for that is to update the tool that generates the project file and make that add guards to avoid compiling hpp-files. The patch that you need to apply is this one:
diff -r f95d63e2154a src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
--- a/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java Wed Dec 01 16:22:31 2010 +0100
@@ -397,7 +397,9 @@
"Name", cfg,
"ExcludedFromBuild", "TRUE"
});
- tag("Tool", new String[] {"Name", "VCCLCompilerTool"});
+ if (!fi.isHeader() && !fi.full.endsWith(".ad")) {
+ tag("Tool", new String[] {"Name", "VCCLCompilerTool"});
+ }
endTag("FileConfiguration");
}
You need to rebuild the project files after this patch has been applied. So, re-running the create.bat script.
I will be on vacation until January 10, so I probably won't be able to answer more Visual Studio related questions for a while. I hope you get it to work. Good luck! ;-)
Bengt
----- nhann at chalmers.se wrote:
> Hi,
>
> I used JDK1.6.0_19 for BOOTSTRAP JDK, and use Microsoft VS 64bits
> (amd86_x64).
> But still the problem with unsupported __asm still occurs when I
> compile the vm in VS2010.
>
> Something like:
> ------------------------------
> 1>------ Build started: Project: vm, Configuration: compiler1_debug
> x64 ------
> 1> java.cpp
> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\os_cpu\windows_x86\vm\orderAccess_windows_x86.inline.hpp(36):
> error C4235: nonstandard extension used : '__asm' keyword not
> supported on this architecture
> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\os_cpu\windows_x86\vm\orderAccess_windows_x86.inline.hpp(37):
> error C2065: 'mov' : undeclared identifier
> -----------------------------
>
> And therefore, I cannot compile the whole vm project.
> Could you justify which "more issues" that I should do to make it
> work?
>
> Or if anyone having create project or develop hotspot OpenJDK with
> VS2010 64bits could give me some advices?
>
> BRs,
> /Nhan
>
> -----Original Message-----
> From: Bengt Rutisson [mailto:bengt.rutisson at oracle.com]
> Sent: Tuesday, December 21, 2010 3:03 PM
> To: Dang Nhan Nguyen
> Cc: hotspot-gc-dev at openjdk.java.net
> Subject: Re: Compile hotspot VS2010 project errors,
>
>
> Hi,
>
> It should be possible to create a 64 bit project with create.bat. But
> you need to fix some things. I know you have to make sure that a 64
> bit jdk is used when generating the project. There might be more
> issues as well.
>
> Bengt
>
> 21 dec 2010 kl. 13:27 skrev Dang Nhan Nguyen <nhann at chalmers.se>:
>
> > Hi,
> >
> > I used make/windows/create.bat to create VS-project for 64bits
> (x86_64). Maybe it caused the errors.
> >
> > Is there any script to create VS-project for 64bits?
> >
> >
> > /Nhan
> >
> > -----Original Message-----
> > From: Bengt Rutisson [mailto:bengt.rutisson at oracle.com]
> > Sent: Tuesday, December 21, 2010 9:22 AM
> > To: Bengt Rutisson; Dang Nhan Nguyen
> > Cc: hotspot-gc-dev at openjdk.java.net
> > Subject: RE: Compile hotspot VS2010 project errors,
> >
> >
> > ...one thing I forgot. The make/windows/create.bat script only
> creates a 32-bit VS-project.
> >
> > Bengt
> >
> >> -----Original Message-----
> >> From: Bengt Rutisson
> >> Sent: den 21 december 2010 07:47
> >> To: Dang Nhan Nguyen
> >> Cc: hotspot-gc-dev at openjdk.java.net
> >> Subject: Re: Compile hotspot VS2010 project errors,
> >>
> >>
> >> Hi Nhan,
> >>
> >> How did you create the VS2010 project? Did you use the
> >> make/windows/create.bat script?
> >>
> >> If not, I suggest that you try it out. Staffan Larsen
> >> recently updated it and I find that it works well.
> >>
> >> Bengt
> >>
> >>
> >> 20 dec 2010 kl. 19:29 skrev Dang Nhan Nguyen <nhann at chalmers.se>:
> >>
> >>> Hi everyone,
> >>>
> >>> Following the errors in previous mail (below).
> >>> I changed the platform parameter (of the hotspot VS2010
> >> project) to x64 (which I think matching with arch parameter
> >> x86_64 when running hotspot/make/windows/create.bat scripts.
> >>> And the errors now is:
> >>>
> >>> 1>------ Build started: Project: vm, Configuration:
> >> core_debug x64 ------
> >>> 1> java.cpp
> >>>
> >> 1>d:\tools\openjdk\openjdk7\openjdk\hotspot-copy\src\share\vm\
> > runtime\globals.hpp(43): error C2370: 'pd_InlineSmallCode' : >
> redefinition; different storage class
> >>> 1>
> >> D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\cpu\x86\vm\
> > globals_x86.hpp(50) : see declaration of 'pd_InlineSmallCode'
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\os_cpu\wi
> > ndows_x86\vm\orderAccess_windows_x86.inline.hpp(36): error > C4235:
> nonstandard extension used : '__asm' keyword not
> >> supported on this architecture
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\os_cpu\wi
> > ndows_x86\vm\orderAccess_windows_x86.inline.hpp(37): error > C2065:
> 'mov' : undeclared identifier
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\os_cpu\wi
> > ndows_x86\vm\orderAccess_windows_x86.inline.hpp(37): error > C2146:
> syntax error : missing ';' before identifier 'eax'
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot-copy\src\os_cpu\wi
> > ndows_x86\vm\orderAccess_windows_x86.inline.hpp(37): error > C2065:
> 'eax' : undeclared identifier
> >>> ...<and continue with the similar errors>...
> >>> ==============================================
> >>> I built OpenJDK7_b121 on Windows 7 (64bit), on an Intel Dou
> >> core E8400.
> >>> During building process and running the script, the
> >> architecture parameter is amd64 or x86_64 respectively.
> >>>
> >>> Why error C4235: state that __asm is not supported?
> >>> If it is not supported by x64 architecture, why the
> >> create.bat script create such a file?
> >>>
> >>> And most important: how to fix it?
> >>>
> >>> Thank you for your help,
> >>> /Nhan
> >>>
> >>>
> >>>
> >>> -----Original Message-----
> >>> From: hotspot-gc-dev-bounces at openjdk.java.net
> >> [mailto:hotspot-gc-dev-bounces at openjdk.java.net] On Behalf Of
> >> Dang Nhan Nguyen
> >>> Sent: Monday, December 20, 2010 6:25 PM
> >>> To: hotspot-gc-dev at openjdk.java.net
> >>> Subject: Compile hotspot VS2010 project errors,
> >>>
> >>> Hi everyone,
> >>>
> >>> I have successfully built OpenJDK7 on Windows 7, using VS2010.
> >>>
> >>> Now I create a VC2010 project of the hotspot with
> >> hotspot/make/windows/create.bat script.
> >>> The I compile the created project in VS2010, and got the
> >> below error (So far, I have not change anything in the
> >> hotspot source code):
> >>>
> >>> =========
> >>> 1>------ Build started: Project: vm, Configuration:
> >> compiler1_debug Win32 ------
> >>> 1> java.cpp
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot\src\cpu\x86\vm\int
> > erp_masm_x86_64.hpp(65): error C2065: 'r13' : undeclared >
> identifier
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot\src\cpu\x86\vm\int
> > erp_masm_x86_64.hpp(69): error C2065: 'r13' : undeclared >
> identifier
> >>>
> >> 1>D:\Tools\openjdk\openjdk7\openjdk\hotspot\src\cpu\x86\vm\int
> > erp_masm_x86_64.hpp(73): error C2065: 'r14' : undeclared >
> identifier
> >>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0
> >> skipped ==========
> >>>
> >>> ==========
> >>>
> >>> Could somebody explain about the problem and solution suggestion?
> >>>
> >>> Thank you,
> >>> /Nhan
> >>
> >>
More information about the hotspot-gc-dev
mailing list