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/jdkClone the source repository.bash configureConfigures the build for your environment or identifies a missing dependencysudo yum install autoconfbash configurednf search openjdk-develFedora 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.aarch64The latest named version was JDK 21; latest installs JDK 23.bash configuresudo yum install gcc-c++bash configuresudo yum install alsa-lib-develbash configuresudo yum install cups-develbash configuresudo yum install libXtst-devel libXt-devel libXrender-devel lib-randr-devel libXi-develbash 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.