diff mbox

[v2] dependencies: Reject gcj in BR2_NEEDS_HOST_JAVA check

Message ID 1408182278-5026-1-git-send-email-bernd.kuhls@t-online.de
State Accepted
Headers show

Commit Message

Bernd Kuhls Aug. 16, 2014, 9:44 a.m. UTC
Xbmc uses the Groovy java package to generate API code, for details see
http://wiki.xbmc.org/index.php?title=Codegeneration#How_it_works

Groovy itself is broken when used with gcj:
http://jira.codehaus.org/browse/GROOVY-3701

Xbmc recommends to use another java package instead, like openjdk:
http://forum.xbmc.org/showthread.php?tid=199742

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.

Fixes
http://autobuild.buildroot.net/results/213/213d7454a1dc68cfb8f4c8d9508f52ebf8e58e33/
http://autobuild.buildroot.net/results/639/639cda872cf36c122cbd6139dd76f6b51ac1864e/
http://autobuild.buildroot.net/results/c9e/c9eb12c95b2939c64590692a82af8d84bbd90956/

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

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

Comments

Thomas Petazzoni Aug. 17, 2014, 7:02 p.m. UTC | #1
Dear Bernd Kuhls,

On Sat, 16 Aug 2014 11:44:38 +0200, Bernd Kuhls wrote:
> Xbmc uses the Groovy java package to generate API code, for details see
> http://wiki.xbmc.org/index.php?title=Codegeneration#How_it_works
> 
> Groovy itself is broken when used with gcj:
> http://jira.codehaus.org/browse/GROOVY-3701
> 
> Xbmc recommends to use another java package instead, like openjdk:
> http://forum.xbmc.org/showthread.php?tid=199742
> 
> 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.
> 
> Fixes
> http://autobuild.buildroot.net/results/213/213d7454a1dc68cfb8f4c8d9508f52ebf8e58e33/
> http://autobuild.buildroot.net/results/639/639cda872cf36c122cbd6139dd76f6b51ac1864e/
> http://autobuild.buildroot.net/results/c9e/c9eb12c95b2939c64590692a82af8d84bbd90956/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: Keep check_prog_host function (Yann)

Even though I'm not entirely happy with the BR2_NEEDS_HOST_JAVA
discriminating specifically 'gcj', I've applied this patch because I
don't really have a better suggestion, and we need to apply something
like this before the release.

Note however that I'm not sure it's going to immediately fix the
autobuilder issues: build will continue to fail, only earlier, unless
the autobuilder script used by Peter is fixed.

Best regards,

Thomas
Bernd Kuhls Aug. 17, 2014, 7:08 p.m. UTC | #2
Hi Thomas,

Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote
in news:20140817210247.4f01527d@free-electrons.com: 

> Even though I'm not entirely happy with the BR2_NEEDS_HOST_JAVA
> discriminating specifically 'gcj', I've applied this patch because I
> don't really have a better suggestion, and we need to apply something
> like this before the release.

+1

> Note however that I'm not sure it's going to immediately fix the
> autobuilder issues: build will continue to fail, only earlier, unless
> the autobuilder script used by Peter is fixed.

True of course, autobuilder will still fail, the same is valid for users 
trying to build xbmc using buildroot with gcj installed on the host. At least 
it fails an hour or so earlier now and with a clear error message ;)

Regards, Bernd
Thomas Petazzoni Aug. 17, 2014, 7:12 p.m. UTC | #3
Dear Bernd Kuhls,

On Sun, 17 Aug 2014 21:08:49 +0200, Bernd Kuhls wrote:

> > Note however that I'm not sure it's going to immediately fix the
> > autobuilder issues: build will continue to fail, only earlier, unless
> > the autobuilder script used by Peter is fixed.
> 
> True of course, autobuilder will still fail, the same is valid for users 
> trying to build xbmc using buildroot with gcj installed on the host. At least 
> it fails an hour or so earlier now and with a clear error message ;)

Indeed :-)

Thomas
diff mbox

Patch

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
 fi
 
 if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then