I build openjdk on windows and visual studo(all chinese version), a error ocurred.
柳鲲鹏
quantum6 at yeah.net
Sun Jul 25 09:20:21 UTC 2021
Enviroment: Windows 7 chinese version, Visual studio 2010 chinese version.
The error is:
D:\openjdk8\hotspot/make/windows/get_msc_ver.sh: line 65: [: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 16: integer expression expected
/usr/bin/expr: syntax error
NMAKE : fatal error U1077: “sh”: 返回代码“0x2”
Stop.
make[3]: *** [Makefile:231: generic_build2] Error 2
make[2]: *** [Makefile:177: product] Error 2
make[1]: *** [HotspotWrapper.gmk:45: /cygdrive/d/openjdk8/build/windows-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
make: *** [/cygdrive/d/openjdk8/make/Main.gmk:110: hotspot-only] Error 2
Fix(Maye be there is better code):
hotspot\make\windows\get_msc_ver.sh
from line number 58, like this:
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/.*Version[\ ]*\([0-9][0-9.]*\).*/\1/'`
# on win7 and vs2010 chinese version, the result is:用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.30319.01 版
# CHINESE_TEXT="优化编译器"
CHINESE_TEXT="C/C++"
if [[ ${MSC_VER_RAW} == *${CHINESE_TEXT}* ]]; then
MSC_VER_RAW=`echo ${MSC_VER_RAW} | awk '{ print $8 }'`
fi
# MSC_VER_RAW=16.00.303109.01
Many thank and best regards
Liu Kunpeng.
More information about the jdk8u-dev
mailing list