编译OpenJDK8:get_msc_ver.sh:需要整数表达式/integer expression expected

简介: 编译OpenJDK8:get_msc_ver.sh:需要整数表达式/integer expression expected

hotspot\make\windows\get_msc_ver.sh:需要整数表达式。


从58行开始。


解决办法一

加一句:MSC_VER_RAW=16.00.303109.01

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/'`
  MSC_VER_RAW=16.00.303109.01
  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

解决办法二

自行截取版本号:


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/'`
  MSC_VER_RAW=`cl 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*编译器[\ ]*\([0-9][0-9.]*\).*/\1/'`
  # MSC_VER_RAW=16.00.303109.01
目录
相关文章
|
C语言 Android开发 Windows
解决windows下eclipse创建project时没有include导致出现“unresolved inclusion: <stdio.h>”错误的方法
解决windows下eclipse创建project时没有include导致出现“unresolved inclusion: <stdio.h>”错误的方法
解决windows下eclipse创建project时没有include导致出现“unresolved inclusion: <stdio.h>”错误的方法
|
5月前
|
开发者 Python
【Python】已解决:TypeError: __init__() got an unexpected keyword argument ‘port’
【Python】已解决:TypeError: __init__() got an unexpected keyword argument ‘port’
774 0
【Python】已解决:TypeError: __init__() got an unexpected keyword argument ‘port’
|
5月前
|
机器学习/深度学习 Python
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
226 0
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
编译OpenJDK11:configure: error: Target CPU mismatch. We are building for x86_64 but CL is for “版“; exp
编译OpenJDK11:configure: error: Target CPU mismatch. We are building for x86_64 but CL is for “版“; exp
174 0
|
Shell
编译OpenJDK8-u332:/bin/sh: 1: [: -a: unexpected operator/line 0: [: too many arguments
编译OpenJDK8-u332:/bin/sh: 1: [: -a: unexpected operator/line 0: [: too many arguments
179 0
|
Linux
编译OpenJDK8:specified bound depends on the length of the source argument
编译OpenJDK8:specified bound depends on the length of the source argument
183 0
对‘avformat_find_stream_info’未定义的引用、to the PKG_CONFIG_PATH environment variable
对‘avformat_find_stream_info’未定义的引用、to the PKG_CONFIG_PATH environment variable
94 0
|
Java Linux
LINUX编译OPENJDK:The tested number of bits in the target (0) differs from the number of bits expected
LINUX编译OPENJDK:The tested number of bits in the target (0) differs from the number of bits expected
220 0
编译OpenJDK12:Target CPU mismatch. We are building for x86_64 but CL is for ""; expected "x64"
编译OpenJDK12:Target CPU mismatch. We are building for x86_64 but CL is for ""; expected "x64"
115 0