Error building openjdk 8 with buildroot
GAUVIN Florian
florian.gauvin at nl.thalesgroup.com
Mon Jul 13 14:19:39 UTC 2015
Hi,
I'm trying to build openjdk8 with buildroot but I have this error :
"
checking for java in Boot JDK... ok
checking for javac in Boot JDK... ok
checking for javah in Boot JDK... ok
checking for javap in Boot JDK... ok
checking for jar in Boot JDK... ok
checking for rmic in Boot JDK... ok
checking for native2ascii in Boot JDK... ok
checking flags for boot jdk java command ...
checking flags for boot jdk java command for big workloads... -Xms64M -Xmx1600M -XX:ThreadStackSize=1536 -XX:PermSize=32m -XX:MaxPermSize=160m
checking flags for boot jdk java command for small workloads... -XX:+UseSerialGC -Xms32M -Xmx512M
checking for jtreg... no
checking for cl... no
checking for cc... /usr/bin/cc
configure: Resolving BUILD_CC (as /usr/bin/cc) failed, using /usr/bin/cc directly.
checking for cl... no
checking for CC... no
checking for g++... /usr/bin/g++
configure: Resolving BUILD_CXX (as /usr/bin/g++) failed, using /usr/bin/g++ directly.
checking for ld... /usr/bin/ld
configure: Resolving BUILD_LD (as /usr/bin/ld) failed, using /usr/bin/ld directly.
checking for /home/student/Documents/buildroot-openjdk8-min/output/host/usr/bin/x86_64-buildroot-linux-gnu-gcc... no
checking for /home/student/Documents/buildroot-openjdk8-min/output/host/usr/bin/x86_64-buildroot-linux-gnu-gcc... no
configure: error: Could not find a C compiler. You might be able to fix this by running 'sudo yum groupinstall "Development Tools"'.
configure exiting with result code 1
make: *** [/home/student/Documents/buildroot-openjdk8-min/output/build/openjdk-jdk8u60-b22/.stamp_configured] Error 1
"
I don't understand why because the path to x86_64-buildroot-linux-gnu-gcc is the good one so the checking should be successful. Do you have an idea why?
Here are all the steps that I have followed to build openjdk with buildroot :
1. If docker is already installed on your pc go to the next steps, other go to this website : https://docs.docker.com/userguide/, click on the install tab, choose your distribution and follow the steps.
2. In the terminal, go to the directory where you want to have buildroot and and run this command : git clone https://github.com/cranby/rpi-buildroot/ --branch openjdk
3. In rpi-buildroot/package/jamvm/jamvm.mk erase the following line : --without pic \
4. In rpi-buildroot/package/openjdk delete the patches (otherwise there is errors patching)
5. In rpi-buildroot/package/openjdk/openjdk.mk :
a. In order to avoid linking problems with libffi, add the following lines after OPENJDK_PROJECT :
export LIBBFFI_CFLAGS=-I/$(HOST_DIR)/usr/x86_64-linux-gnu/include
export LIBBFFI_CFLAGS=-L/$(HOST_DIR)/usr/x86_64-linux-gnu/sysroot/usr/lib/ -lffi
b. To avoid missing headers of X11, in OPENJDK_CONF_OPT, add the following line :
--disable-headful
c. In OPENJDK_MAKE_OPT, change "all images pofiles" by "profiles", because we want only the compact profiles of openjdk
and just after in CONF change "linux-arm-normal-zero-release" by "linux-x86_64-normal-zero-release"
d. In OPENJDK_DEPENDENCIES, add the following dependencies
libffi cups freetype xlib_libXrender xlib_libXt xlib_libXext xlib_libXtst libusb
e. There is three compact run time environment for openjdk,
On the following website you can see what are these run time environments and choose which one you need : http://openjdk.java.net/jeps/161
At the end of the file, in OPENJDK_INSTALL_TARGET_CMDS, add the two following lines replacing the X by the 2 compact profiles that you don't need :
rm -f -r $(TARGET_DIR)/usr/lib/jvm/j2re-comapctX-image
rm -f -r $(TARGET_DIR)/usr/lib/jvm/j2re-comapctX-image
f. Change the version of openjdk :
#Version is the same as OpenJDK HG tag
OPENJDK_VERSION = jdk8u60-b22
#Release is the same as
OPENJDK_RELEASE = jdk8u60
OPENJDK_PROJECT = jdk8u
#OPENJDK_VERSION = jdk9-b36
#OPENJDK_RELEASE = m2
#OPENJDK_PROJECT = jigsaw
6. In the terminal, in the directory rpi-buildroot, run the following command : make menuconfig
7. Select the following options : (This are the options that I have chosen for the INAETICS project but you can choose others target architecture, c library or target packages but you have to enable openjdk )
Target options
Target Architecture : x86_64
Target Architecture Variant : atom
Toolchain
C library : glibc
Enable C++ support
Target Packages
Interpreter languages and scripting
openjdk : y
Libraries
Audio/Sound
alsa-lib : y
8. Escape and save the changes
9. Launch the build, run the command : make
Regards,
Florian GAUVIN
------------------------------------------------------------------------------------------------------------
Disclaimer:
If you are not the intended recipient of this email, please notify the sender and
delete it.
Any unauthorized copying, disclosure or distribution of this email or its
attachment(s) is forbidden.
Thales Nederland BV will not accept liability for any damage caused by this email or
its attachment(s).
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of
Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------
More information about the build-dev
mailing list