[Buildroot] [PATCH v2] dependencies: Reject gcj in BR2_NEEDS_HOST_JAVA check

Bernd Kuhls bernd.kuhls at t-online.de
Sat Aug 16 09:44:38 UTC 2014

Xbmc uses the Groovy java package to generate API code, for details see

Groovy itself is broken when used with gcj:

Xbmc recommends to use another java package instead, like openjdk:

Until we come up with a host package to provide a java setup and
in order to make autobuilder happy let´s reject gcj when we check
for a java installation on the host.

Currently Xbmc is the only package using BR2_NEEDS_HOST_JAVA
so changing the behaviour of dependencies.sh has no side effects.


Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
v2: Keep check_prog_host function (Yann)

 support/dependencies/dependencies.sh |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 88e5ad2..a9c5b31 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -189,6 +189,13 @@ fi
 if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then
 	check_prog_host "java"
+	JAVA_GCJ=$(java -version 2>&1 | grep gcj)
+	if [ ! -z "$JAVA_GCJ" ] ; then
+		echo
+		echo "$JAVA_GCJ is not sufficient to compile your package selection."
+		echo "Please install an OpenJDK/IcedTea/Oracle Java."
+		exit 1 ;
+	fi
 if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then

More information about the buildroot mailing list