[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#594816: db4.8: FTBFS on mips (configure reports garbage)



On Sun, Aug 29, 2010 at 08:55:49PM +0000, Clint Adams wrote:
> On Sun, Aug 29, 2010 at 10:42:22PM +0200, Aurelien Jarno wrote:
> >   test /usr/lib/jvm/default-java/bin/../../../.. '!=' /usr
> 
> Great, I'll have it run readlink -f on $_JTOPDIR
> 

Actually it seems this is not the best solution. The issue comes from
the fact on Debian we are having the java installed in 
/usr/lib/jvm/default-java, using symlinks. The configure script tries
to follow symlinks to determine the correct include directory.

With OpenJDK, it fails to find it, but it is workarounded by the
following code in debian/rules:

  CFLAGS += -I$(JAVA_HOME)/include

With GCJ, after following the symlinks, it is able to find /usr/include
and also include /usr/include/linux as it is a linux system. This
include directory contains headers that conflicts with the GNU libc 
headers, hence the strange configure output.

In my opinion the best solution is to avoid following the symlinks on
Debian, as it can gives some strange behaviors later. That's what the
patch below does. I have a test build in progress, currently running 
the testsuite.


--- db4.8-4.8.30.orig/dist/configure
+++ db4.8-4.8.30/dist/configure
@@ -16858,7 +16858,7 @@ $as_echo "$_cur" >&6; }
 done
 _ACJNI_FOLLOWED="$_cur"
 
-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
+_JTOPDIR=`echo "$_ACJNI_JAVAC" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
 case "$host_os" in
 	darwin*)	_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
 			_JINC="$_JTOPDIR/Headers";;
--- db4.8-4.8.30.orig/dist/aclocal_java/ac_jni_include_dirs.m4
+++ db4.8-4.8.30/dist/aclocal_java/ac_jni_include_dirs.m4
@@ -44,7 +44,7 @@ case "$_ACJNI_JAVAC" in
 esac
 
 _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+_JTOPDIR=`echo "$_ACJNI_JAVAC" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
 case "$host_os" in
 	darwin*)	_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
 			_JINC="$_JTOPDIR/Headers";;

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


Reply to: