codefollower / openjdk-research Goto Github PK
View Code? Open in Web Editor NEWOpenJDK(HotSpot JVM、Javac)源代码学习研究(包括代码注释、文档、用于代码分析的测试用例)
License: GNU General Public License v2.0
OpenJDK(HotSpot JVM、Javac)源代码学习研究(包括代码注释、文档、用于代码分析的测试用例)
License: GNU General Public License v2.0
jvm.dll how to debug?
OpenJDK-Research/hotspot/my-test/jni/api-test/ApiTest.c:6:10: fatal error:
'ApiTest.h' file not found
^
1 error generated.
make[2]: *** [CMakeFiles/OpenJDK_Research.dir/hotspot/my-test/jni/api-test/ApiTest.c.o] Error 1
make[1]: *** [CMakeFiles/OpenJDK_Research.dir/all] Error 2
make: *** [all] Error 2
Error 1
error C2220: warning treated as error - no 'object' file generated E:\JavaProject\openjdk\OpenJDK-Research\hotspot\src\share\vm\runtime\java.cpp 1 1 jvm
can anybody solve this problem
在 构建与调试-Windows.md中给出的 Microsoft Visual Studio 2010 链接为中文版本,我在实际构建时,发现中文版本的在运行 create.bat 时,会出现错误:
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/get_msc_ver.sh: line 65: [: ▒▒▒▒ 80x86 ▒▒ Microsoft (R) 32 λ C/C++ ▒Ż▒▒▒▒▒▒▒ 16: integer expression expected
/usr/bin/expr: syntax error
**************************************************************
MSC_VER = ""
Will generate VC7 project {Visual Studio 2003 .NET}
D:\HotSpotResearch\OpenJDK-Research\hotspot\build\vs-i486\jvm.vcproj
**************************************************************
NOTE: Using the following settings:
HotSpotWorkSpace=D:\HotSpotResearch\OpenJDK-Research\hotspot\
HotSpotBuildSpace=D:\HotSpotResearch\OpenJDK-Research\hotspot\build\vs-i486
HotSpotJDKDist=d:\jdk8
-- compiler1 --
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
Stop.
-- compiler2 --
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
Stop.
-- tiered --
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
Stop.
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
原因在于 cl.exe 使用的是中文版本
>cl
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.30319.01 版
版权所有(C) Microsoft Corporation。保留所有权利。
用法: cl [ 选项... ] 文件名... [ /link 链接选项... ]
因此,create 在调用脚本 get_msc_ver.sh
时,由于脚本是针对英文版本的,所以无法得到 cl 的版本。
解决方案:
get_msc_ver.sh
注释掉脚本中获取cl版本的代码, 并根据自己的cl版本手动设置
if [ "x$FORCE_MSC_VER" != "x" ]; then
echo "MSC_VER=$FORCE_MSC_VER"
else
#MSC_VER_RAW=`cl 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*[\ ]*\([0-9][0-9.]*\).*[\ ]版/\1/'`
#MSC_VER_MAJOR=`"$ECHO" $MSC_VER_RAW | "$CUT" -d'.' -f1`
#MSC_VER_MINOR=`"$ECHO" $MSC_VER_RAW | "$CUT" -d'.' -f2`
#MSC_VER_MICRO=`"$ECHO" $MSC_VER_RAW | "$CUT" -d'.' -f3`
#if [ "${MSC_VER_MAJOR}" -eq 14 -a "${MSC_VER_MINOR}" -eq 0 -a "${MSC_VER_MICRO}" -eq 30701 ] ; then
# This said 1400 but it was really more like VS2003 (VC7) in terms of options
# MSC_VER=1399
#else
# MSC_VER=`"$EXPR" $MSC_VER_MAJOR \* 100 + $MSC_VER_MINOR`
#fi
MSC_VER=1600
MSC_VER_RAW=16.00.30319.01
echo "MSC_VER=$MSC_VER"
echo "MSC_VER_RAW=$MSC_VER_RAW"
fi
另外需要注意的是,需要保证 openjdk 源代码版本与机器上安装的jdk版本一致,包括主版本,32位还是64位,否则可能出现奇怪的错误。
有些文件用notpad++打开是 utf-8 无BOM 格式编码。 vs2013 编译起来有问题。 但转成utf-8格式编码之后就没有问题了。
D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(409): error C2039: 'tag_at' : is not a member of 'ConstantPool'
1> D:\workspace\OpenJDK\hotspot\src\share\vm\oops/constantPool.hpp(86) : see declaration of 'ConstantPool'
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(409): error C2228: left of '.is_klass_or_reference' must have class/struct/union
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(410): error C2039: 'tag_at' : is not a member of 'ConstantPool'
1> D:\workspace\OpenJDK\hotspot\src\share\vm\oops/constantPool.hpp(86) : see declaration of 'ConstantPool'
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(410): error C2228: left of '.is_klass_reference' must have class/struct/union
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(416): error C2039: 'tag_at' : is not a member of 'ConstantPool'
1> D:\workspace\OpenJDK\hotspot\src\share\vm\oops/constantPool.hpp(86) : see declaration of 'ConstantPool'
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(416): error C2228: left of '.is_utf8' must have class/struct/union
请问大牛,这个该怎么解决呢?
error C2220: warning treated as error - no 'object' file generated
我使用vs2013进行编译 把msvrc100 替换成msvcr120 为什么不行啊
报错:
$ make sanity 2>&1 | tee /cygdrive/f/openjdk/build.log
jdk/make/common/shared/Defs-windows.gmk:324: WARNING: No VS2010 available. No VS
100COMNTOOLS found on system. No WINDOWSSDKDIR found on system.
jdk/make/common/shared/Defs-windows.gmk:337: *** ERROR: No VS2010 found on syste
m.. Stop.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.