I recently loaded Asahi Linux on a M1 Mac Mini and decided I should do something more intensive than just web browsing. First test: build the latest OpenJDK.
Let’s Go
I followed the official Building The JDK page: my nature is to be impatient, so I followed the tl;dr and was successful. Perhaps later I’ll return to read the rest. Basically two steps: configure and build.
Configure Build
Despite the multiple iterations to incrementally add dependencies, it’s fairly straight-forward as the script tells you what is missing, the exception being the gcc compiler.
sudo yum groupinstall "Development Tools"
Don’t know what all is included but found a number of references to itgit clone https://git.openjdk.org/jdk
Clone the source repository.bash configure
Configures the build for your environment or identifies a missing dependencysudo yum install autoconf
bash configure
dnf search openjdk-devel
Fedora Linux comes with an installed JRE; however, a fully-baked JDK with compiler and tools is required, at least a JDK 22 for building JDK 23.sudo dnf install java-latest-openjdk-devel.aarch64
The latest named version was JDK 21; latest installs JDK 23.bash configure
sudo yum install gcc-c++
bash configure
sudo yum install alsa-lib-devel
bash configure
sudo yum install cups-devel
bash configure
sudo yum install libXtst-devel libXt-devel libXrender-devel lib-randr-devel libXi-devel
bash configure
Building Images
Very straight-forward: time make images
real 4m51.666s
user 30m27.171s
sys 1m40.516s
Final Thoughts
Much easier and much faster than expect.
Next I want to open the source in an IDE and whether I can make any sense of it, especially the C++ parts.