当前位置: 代码迷 >> 综合 >> 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

热度:27   发布时间:2023-12-11 18:06:56.0
  • 错误:

The tested number of bits in the target (0) differs from the number of bits expected to be found in the target

  • 解决办法:

1、使用新的JDK版本。我现在编译已经没有这个错误了。

2、编译时指明64位。参数是:--with-target-bits=64

3、修改配置文件。

打开common/autoconf/generated-configure.sh,搜索这个语句,把判断语句用到的两个变量改为64即可。如:

      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`# 加上这一句
TESTED_TARGET_CPU_BITS=64if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; thenas_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5fi

  相关解决方案