代码之家  ›  专栏  ›  技术社区  ›  J.E.Y

未能从源代码Ubuntu 18.04 64位构建开放式JDK 8

  •  1
  • J.E.Y  · 技术社区  · 6 年前

    我试图通过这个链接来构建我自己的JDK:

    http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html#introduction

    概括步骤如下:

    在最后一步中,它显示如下错误:

    *** 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
    

    我的实验机是Ubuntu18.0464位。

    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)"
    

    乌尼姆

    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
    
    1 回复  |  直到 6 年前
        1
  •  1
  •   Karol Dowbecki    6 年前

    按照 Makefile 不支持内核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_HOTSPOT_OS_VERSION_CHECK 选项,看看会发生什么,但是降级到kernel 3.x更安全。如果您想构建旧的JDK8,可以使用一些旧的发行版(例如 Fedora 9 with gcc 4.3.0 as per Supported Build Platforms .