FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 01-17-2012, 08:24 AM
peter green
 
Default java architecture names and armhf/sh4

While looking at armhf build failures I took a look at uwsgi I
determined it was failing on armel, armhf, sh4 and powerpc due to using
incorrect paths for java stuff (it's also failing on ia64 and alpha for
what appears to be unrelated reasons). Specifically it was seting the
following paths.


UWSGICONFIG_JVM_INCPATH='/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/include/
-I/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/include/linux'

UWSGICONFIG_JVM_LIBPATH='/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/jre/lib/$(JAVA_ARCH)/server/'

Where JAVA_ARCH was defined by

$(eval JAVA_ARCH := $(shell /usr/share/javahelper/java-arch.sh))

After taking a look at packages.debian.org I worked out (haven't run any
test builds yet) this could be fixed for armel and powerpc without
breaking any architectures that have already built the package by
changing those statements to the following.


UWSGICONFIG_JVM_INCPATH='/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/include/
-I/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/include/linux'

UWSGICONFIG_JVM_LIBPATH='/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/jre/lib/$(JAVA_ARCH)/server/'

Then defining DEB_HOST_ARCH in the usual way.

However on armhf and sh4 those paths don't hold.

On armhf /usr/share/javahelper/java-arch.sh returns "armhf" but
libjvm.so is in /usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server/
On sh4 /usr/share/javahelper/java-arch.sh appears to return* "sh4" but
libjvm.so is in /usr/lib/jvm/java-6-openjdk-sh4/jre/lib/sh/server/


Now the question is how to fix the uwsgi build for armel, armhf, powerpc
and sh4? I see four possibilities
1: modify /usr/share/javahelper/java-arch.sh to return "arm" on armhf
and "sh" on sh4. Then make the change I mentioned above.
2: modify openjdk packaging so it installs in locations consistent with
the name returned by java-arch.h on armhf and sh4. Then make the change
I mentioned above.
3: Make the change I mentioned above and further add special cases for
armhf and sh4.
4: Find some other way of determining java include and library locations
which works on all architectures.


Please advise on the appropriate course of action. If I get no response
I will file a bug against uwsgi in a few days time with a patch

implementing possibility 3.

* based on the contents of the uwsgi build log as I don't have a local
sh4 system to test on



--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F153E4A.4030807@postgrad.manchester.ac.uk">http://lists.debian.org/4F153E4A.4030807@postgrad.manchester.ac.uk
 
Old 01-17-2012, 10:56 AM
Matthias Klose
 
Default java architecture names and armhf/sh4

On 01/17/2012 10:24 AM, peter green wrote:
> While looking at armhf build failures I took a look at uwsgi I determined it was
> failing on armel, armhf, sh4 and powerpc due to using incorrect paths for java
> stuff (it's also failing on ia64 and alpha for what appears to be unrelated
> reasons). Specifically it was seting the following paths.
>
> UWSGICONFIG_JVM_INCPATH='/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/include/
> -I/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/include/linux'
> UWSGICONFIG_JVM_LIBPATH='/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/jre/lib/$(JAVA_ARCH)/server/'
>
>
> Where JAVA_ARCH was defined by
>
> $(eval JAVA_ARCH := $(shell /usr/share/javahelper/java-arch.sh))
>
> After taking a look at packages.debian.org I worked out (haven't run any test
> builds yet) this could be fixed for armel and powerpc without breaking any
> architectures that have already built the package by changing those statements
> to the following.
>
> UWSGICONFIG_JVM_INCPATH='/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/include/
> -I/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/include/linux'
> UWSGICONFIG_JVM_LIBPATH='/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/jre/lib/$(JAVA_ARCH)/server/'
>
>
> Then defining DEB_HOST_ARCH in the usual way.
>
> However on armhf and sh4 those paths don't hold.
>
> On armhf /usr/share/javahelper/java-arch.sh returns "armhf" but libjvm.so is in
> /usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server/
> On sh4 /usr/share/javahelper/java-arch.sh appears to return* "sh4" but libjvm.so
> is in /usr/lib/jvm/java-6-openjdk-sh4/jre/lib/sh/server/
>
> Now the question is how to fix the uwsgi build for armel, armhf, powerpc and
> sh4? I see four possibilities
> 1: modify /usr/share/javahelper/java-arch.sh to return "arm" on armhf and "sh"
> on sh4. Then make the change I mentioned above.
> 2: modify openjdk packaging so it installs in locations consistent with the name
> returned by java-arch.h on armhf and sh4. Then make the change I mentioned above.
> 3: Make the change I mentioned above and further add special cases for armhf and
> sh4.
> 4: Find some other way of determining java include and library locations which
> works on all architectures.

The name of the jre/lib/<arch> directory is unconnected to DEB_HOST_ARCH; please
use the names used by OpenJDK and gcj. If these should change, I'll add
compatibility symlinks for these directories so that they continue to work.

Matthias


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F1561EC.4090906@debian.org">http://lists.debian.org/4F1561EC.4090906@debian.org
 
Old 01-17-2012, 11:40 AM
Niels Thykier
 
Default java architecture names and armhf/sh4

On 2012-01-17 10:24, peter green wrote:
> While looking at armhf build failures I took a look at uwsgi I
> determined it was failing on armel, armhf, sh4 and powerpc due to using
> incorrect paths for java stuff (it's also failing on ia64 and alpha for
> what appears to be unrelated reasons). Specifically it was seting the
> following paths.
>
> UWSGICONFIG_JVM_INCPATH='/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/include/
> -I/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/include/linux'
> UWSGICONFIG_JVM_LIBPATH='/usr/lib/jvm/java-6-openjdk-$(JAVA_ARCH)/jre/lib/$(JAVA_ARCH)/server/'
>
>
> Where JAVA_ARCH was defined by
>
> $(eval JAVA_ARCH := $(shell /usr/share/javahelper/java-arch.sh))
>

As your testing shows, the paths definde above are definitely wrong.

> [...]
>
> UWSGICONFIG_JVM_INCPATH='/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/include/
> -I/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/include/linux'
> UWSGICONFIG_JVM_LIBPATH='/usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH)/jre/lib/$(JAVA_ARCH)/server/'
>
>
> Then defining DEB_HOST_ARCH in the usual way.
>

I believe these paths are correct.

> However on armhf and sh4 those paths don't hold.
>

Presumably because java-arch.sh has not been updated to handle armhf and
sh4 (nor powerpcspe for that matter).

> On armhf /usr/share/javahelper/java-arch.sh returns "armhf" but
> libjvm.so is in /usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server/
> On sh4 /usr/share/javahelper/java-arch.sh appears to return* "sh4" but
> libjvm.so is in /usr/lib/jvm/java-6-openjdk-sh4/jre/lib/sh/server/
>
> Now the question is how to fix the uwsgi build for armel, armhf, powerpc
> and sh4? I see four possibilities
> 1: modify /usr/share/javahelper/java-arch.sh to return "arm" on armhf
> and "sh" on sh4. Then make the change I mentioned above.

I have updated java-arch.sh and is uploading a new version of
javahelper. You want (>= 0.39~) in your dependency line (or dw).

> [...]
>
>

~Niels


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F156C25.6000202@thykier.net">http://lists.debian.org/4F156C25.6000202@thykier.net
 
Old 01-17-2012, 12:09 PM
peter green
 
Default java architecture names and armhf/sh4

The name of the jre/lib/<arch> directory is unconnected to DEB_HOST_ARCH;

On interesting architectures* the full name of the directory is

armel: /usr/lib/jvm/java-6-openjdk-armel/jre/lib/arm/server
armhf: /usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server
powerpc:/usr/lib/jvm/java-6-openjdk-powerpc/jre/lib/ppc/server
powerpcspe:/usr/lib/jvm/java-6-openjdk-powerpcspe/jre/lib/ppc/server
sh4: /usr/lib/jvm/java-6-openjdk-sh4/jre/lib/sh/server

In that directory name the architecture is mentioned TWICE by different names.

The first mention (as part of java-6-openjdk-<arch>) seems to be using debian
architecture names. looking at the source for the openjdk-6 package would
seem to confirm this "jdirname = java-$(shortver)-$(origin)-$(DEB_HOST_ARCH)"

The second mention (as part of lib/<arch>/server) seems to be using java
specific architecture names (which further seem to be ambiguous).

/usr/share/javahelper/java-arch.sh is a tool with the following help output

Usage: java-arch.sh [debian arch name]
Returns the equivelent name used by the JDK for that arch
or the debian build arch if not specified


However for armhf, powerpcspe and sh4 the names it returns do not match
those used by the jdks.

So now for the two main questions I would like answering

1: is this arch name discrepancy between the architecture name returned by
java-arch.sh and the lib/<arch>/server used by the jdks on armhf, sh4
and powrpcspe a bug in javahelper? is it a bug in the jdks? or is
it neither? (i'm guessing it's a bug in javahelper myself but I'd like
confirmation before writing packages).

2: is there a better way to get the names of the include and library
directories for a jdk than building them up manually from a mixture of
hardcoded parts and architecture names?

* that is architectures which appear to have two different names


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F157301.4030304@postgrad.manchester.ac.uk">http://lists.debian.org/4F157301.4030304@postgrad.manchester.ac.uk
 

Thread Tools




All times are GMT. The time now is 05:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org