Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法从源代码ubuntu 18.04 64位构建开放jdk 8_Java_Ubuntu 18.04 - Fatal编程技术网

Java 无法从源代码ubuntu 18.04 64位构建开放jdk 8

Java 无法从源代码ubuntu 18.04 64位构建开放jdk 8,java,ubuntu-18.04,Java,Ubuntu 18.04,我尝试按照此链接构建自己的JDK: 概括步骤如下: hg克隆OpenJDK cd YourOpenJDK bash./get_source.sh bash./configure 全部 在最后一步中,它显示了如下错误: *** This OS is not supported: Linux compitition2 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Li

我尝试按照此链接构建自己的JDK:

概括步骤如下:

  • hg克隆OpenJDK
  • cd YourOpenJDK
  • bash./get_source.sh
  • bash./configure
  • 全部
在最后一步中,它显示了如下错误:

*** This OS is not supported: Linux compitition2 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
/home/jon/Downloads/OpenJDK/hotspot/make/linux/Makefile:234: recipe for target 'check_os_version' failed
make[5]: *** [check_os_version] Error 1
/home/jon/Downloads/OpenJDK/hotspot/make/linux/Makefile:255: recipe for target 'linux_amd64_compiler2/debug' failed
make[4]: *** [linux_amd64_compiler2/debug] Error 2
Makefile:216: recipe for target 'generic_build2' failed
make[3]: *** [generic_build2] Error 2
make[2]: *** [product] Error 2
Makefile:167: recipe for target 'product' failed
make[1]: *** [/home/jon/Downloads/OpenJDK/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
HotspotWrapper.gmk:44: recipe for target '/home/jon/Downloads/OpenJDK/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp' failed
/home/jon/Downloads/OpenJDK//make/Main.gmk:108: recipe for target 'hotspot-only' failed
make: *** [hotspot-only] Error 2
我的实验机器是Ubuntu 18.04,64位

cat/etc/*-释放

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
uanme-a

Linux compitition2 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
根据内核4.X,不支持。检查将
uname-r
与版本模式
2.4%2.5%2.6%3%
进行比较:

SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3%
OS_VERSION := $(shell uname -r)
EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))

您可以尝试使用
DISABLE\u HOTSPOT\u OS\u VERSION\u CHECK
选项构建,看看会发生什么,但降级到内核3.X更安全。如果您想构建旧的JDK 8,可能需要使用一些旧的发行版来启动虚拟机,例如

Thanks@Karol. 我设置了env变量,现在这个错误消失了。然而,我遇到了另一个与C++11冲突有关的问题。我会把它放在一个单独的线程中——如果这不能解决问题,我会考虑降低内核或者使用一个旧的Linux发行版。