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
Reply to: