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

Bug#568965: libjdic-java: Please support Renesas SH(sh4)



Source: libjdic-java
Version: 0.9.5-6
Severity: important
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org


Hi,

I am now trying to run Debian on Renesas SH(sh4) CPU.
http://buildd.debian-ports.org/status/architecture.php?suite=unstable&a=sh4

libjdic-java FTBFS on SH4.
Because   libjdic-java does not support Renesas SH.

http://buildd.debian-ports.org/fetch.php?pkg=libjdic-java&arch=sh4&ver=0.9.5-6&stamp=1262959196&file=log&as=raw
-----
[...]
[exec] g++ -c -fPIC -I/usr/lib/jvm/java-6-openjdk/include
-I/usr/lib/jvm/java-6-openjdk/include/linux `pkg-config --cflags
glib-2.0` `pkg-config --cflags libgnome-2.0` `pkg-config --cflags
gnome-vfs-2.0` `pkg-config --cflags gnome-vfs-module-2.0` `pkg-config
--cflags bonobo-activation-2.0` `pkg-config --cflags libbonobo-2.0`
`pkg-config --cflags ORBit-2.0` `pkg-config --cflags gconf-2.0` -o
WebBrowser.o WebBrowser.cpp
     [exec] g++ -c -fPIC -I/usr/lib/jvm/java-6-openjdk/include
-I/usr/lib/jvm/java-6-openjdk/include/linux `pkg-config --cflags
glib-2.0` `pkg-config --cflags libgnome-2.0` `pkg-config --cflags
gnome-vfs-2.0` `pkg-config --cflags gnome-vfs-module-2.0` `pkg-config
--cflags bonobo-activation-2.0` `pkg-config --cflags libbonobo-2.0`
`pkg-config --cflags ORBit-2.0` `pkg-config --cflags gconf-2.0` -o
WebBrowserUtil.o WebBrowserUtil.cpp
     [exec] WebBrowserUtil.cpp: In function '_jstring*
Java_org_jdesktop_jdic_browser_internal_WebBrowserUtil_nativeGetBrowserPath(JNIEnv*,
_jclass*)':
     [exec] WebBrowserUtil.cpp:67: warning: deprecated conversion from
string constant to 'char*'
     [exec] WebBrowserUtil.cpp:67: warning: deprecated conversion from
string constant to 'char*'
     [exec] g++ -c -fPIC -I/usr/lib/jvm/java-6-openjdk/include
-I/usr/lib/jvm/java-6-openjdk/include/linux `pkg-config --cflags
glib-2.0` `pkg-config --cflags libgnome-2.0` `pkg-config --cflags
gnome-vfs-2.0` `pkg-config --cflags gnome-vfs-module-2.0` `pkg-config
--cflags bonobo-activation-2.0` `pkg-config --cflags libbonobo-2.0`
`pkg-config --cflags ORBit-2.0` `pkg-config --cflags gconf-2.0` -o
../../../share/native/utils/InitUtility.o
../../../share/native/utils/InitUtility.cpp
     [exec] g++ -shared -fPIC -ldl -lrt -lpthread -L/usr/lib -lz -lm
-lgnome-2  -L/usr/lib/jvm/java-6-openjdk/jre/lib/sparc
-L/usr/lib/jvm/java-6-openjdk/jre/lib/sparcv9
-L/usr/lib/jvm/java-6-openjdk/jre/lib/i386
-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64
-L/usr/lib/jvm/java-6-openjdk/jre/lib/ia64 GnomeBrowserService.o
GnomeLaunchService.o GnomeUtility.o GnomeVfsWrapper.o WebBrowser.o
WebBrowserUtil.o ../../../share/native/utils/InitUtility.o -o
libjdic.so
     [exec] gcc -I/usr/lib/jvm/java-6-openjdk/include
-I/usr/lib/jvm/java-6-openjdk/include/linux -shared -fPIC -ldl -lrt
-lpthread -ldl -L/usr/X11R6/lib -lXt -lX11 Tray.c -o libtray.so
     [exec] Tray.c:98:6: error: #error "Unknown arch, please edit "__FILE__
     [exec] Tray.c: In function
'Java_org_jdesktop_jdic_tray_internal_impl_GnomeTrayAppletService_getWidget':
     [exec] Tray.c:711: warning: cast from pointer to integer of different size
     [exec] Tray.c: In function
'Java_org_jdesktop_jdic_tray_internal_impl_GnomeSystemTrayService_initNative':
     [exec] Tray.c:737: error: 'LIBARCH' undeclared (first use in this function)
     [exec] Tray.c:737: error: (Each undeclared identifier is reported only once
     [exec] Tray.c:737: error: for each function it appears in.)
     [exec] make[1]: Leaving directory
`/build/buildd-libjdic-java_0.9.5-6-sh4-fr7OcZ/libjdic-java-0.9.5/jdic/src/unix/native/jni'
     [exec] make[1]: *** [libtray.so] Error 1

[...]
-----

I updated patch of debian/patches/Tray.diff . Could you apply this patch?

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
--- a/jdic/src/unix/native/jni/Tray.c	2010-01-09 10:31:24.000000000 +0000
+++ b/jdic/src/unix/native/jni/Tray.c	2010-01-09 10:34:50.000000000 +0000
@@ -74,7 +74,31 @@
 static void *awtHandle = NULL;
 
 #ifdef __linux__
-#define LIBARCH  "i386"
+#  if defined(__x86_64__)
+#    define LIBARCH "amd64"
+#  elif defined(__i386__)
+#    define LIBARCH "i386"
+#  elif defined(__alpha__)
+#    define LIBARCH "alpha"
+#  elif defined(__ia64__)
+#    define LIBARCH "ia64"
+#  elif defined(__arm__)
+#    define LIBARCH "arm"
+#  elif defined(__mips__)
+#    define LIBARCH "mips"
+#  elif defined(__MIPSEL__)
+#    define LIBARCH "mipsel"
+#  elif defined(__powerpc__)
+#    define LIBARCH "ppc"
+#  elif defined(__sparc__)
+#    define LIBARCH "sparc"
+#  elif defined(__s390__)
+#    define LIBARCH "s390"
+#  elif defined(__sh__)
+#    define LIBARCH "sh"
+#  else
+#    error "Unknown arch, please edit "__FILE__
+#  endif
 #else
 #ifdef __i386
 #define LIBARCH "i386"
@@ -717,7 +741,7 @@
     awtHandle = dlopen(awtPath, RTLD_LAZY);
     if (awtHandle == NULL) {
         /* must be JDK try JDK location */
-        sprintf(awtPath,"%s/jre/lib/%s/libawt.so",java_home, LIBARCH);
+        sprintf(awtPath,"%s/lib/%s/libawt.so",java_home, LIBARCH);
         dprintf("JDK - %s\n",awtPath);
         awtHandle = dlopen(awtPath, RTLD_LAZY);
 

Reply to: