Building Jdk 8 On Fedora 31 Gcc 921
1 min readJuly 01, 2020
build
jdk
fedora
jdk8
This blog lists out the steps to build JDK 8 on Fedora 31. I had some compilation problems while building it, so you may find this useful.
- I was building the openjdk 8u, so we have to clone it from the public repo
$ hg clone http://hg.openjdk.java.net/jdk8u/jdk8u
-
This will just bring some source and scripts which are necessary to get the actual JDK and hotspot sources.
- To get the actual sources, run the utility shell script
$ ./get_source.sh
- Configure the build for your system
$ bash configure
- Add below options if you want debug symbols
$ bash configure --with-debug-level=slowdebug
- Set the environment variable to resolve the compilation errors
$ export CFLAGS="-Wno-return-type"
- Run the build
$ make
Little more info
gcc version
$ gcc --version
gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.