Search code examples
j9

How do I compile OpenJ9 on Fedora/RHEL/CentOS?


The default OpenJ9 build instructions use Docker, but I'd like to compile without Docker; specifically, on RHEL 7.3.


Solution

  • The build instructions on RHEL 7 (Or CentOS) should be fairly similar to OpenJDK with HotSpot.

    I have a DockerFile that creates an OpenJ9 development environment based on CentOS 7. But if you want to create the environment manually, do this:

    • Grab the build dependency for compiling OpenJDK
      yum builddep java-1.8.0-openjdk

    • Grab the rest of the build dependencies which are not installed in the minimal centos image.

      • java-1.8.0-openjdk-devel for a "Boot" JDK
      • hg, file, which, unzip, make for compiling
      • numactl-devel is needed for J9 numa support
        yum install java-1.8.0-openjdk-devel make file which unzip hg numactl-devel
    • grab a git 2 package from WANDisco:
      rpm -U http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && yum install -y git

      • Of course you can always modify the build file to make it work with git 1.7, as suggested
    • download freemarker and put the location into ./configure