[Pkg-ceph-commits] [ceph] 04/04: new "gcj.patch" with partial fix to FTBFS with gcj-jdk.

Dmitry Smirnov onlyjob at moszumanska.debian.org
Tue Mar 25 22:00:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

onlyjob pushed a commit to branch experimental
in repository ceph.

commit 8c3a9fc (experimental)
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Tue Mar 25 20:35:01 2014

    new "gcj.patch" with partial fix to FTBFS with gcj-jdk.
---
 debian/changelog         |  1 +
 debian/patches/gcj.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series    |  1 +
 3 files changed, 58 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d358b7f..b5c3c7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ ceph (0.78-2) experimental; urgency=low
     + new "init.patch" for init.d scripts lintianisation.
     + new "logrotate.patch" to avoid rotating empty logs.
     + new "fix-defaultweight.patch" to fix weight calculation on OSD start.
+    + new "gcj.patch" with partial fix to FTBFS with gcj-jdk.
   * Use symlinks to simplify installation of init.d and logrotate scripts.
   * Added retrospective changelog entry to mention new B-D "libblkid-dev".
   * Added "README.Debian" file with some hopefully useful notes.
diff --git a/debian/patches/gcj.patch b/debian/patches/gcj.patch
new file mode 100644
index 0000000..a553e22
--- /dev/null
+++ b/debian/patches/gcj.patch
@@ -0,0 +1,56 @@
+Last-Update: 2014-03-25
+Forwarded: no
+Author: Dmitry Smirnov <onlyjob at member.fsf.org>
+Description: gcj compatibility, partial fix for FTBFS with "gcj" (i.e. "gcj-jdk").
+ * prioritise use of `javac` executable (gcj provides it through alternatives).
+ * pass '-classpath' option (gcj/javah ignores CLASSPATH environment variable).
+
+ Changes should not affect OpenJDK which understand '-classpath' as well.
+
+ With gcj-jdk we still get FTBFS in "src/client/Trace.cc" later:
+
+ ~~~~
+    java/native/libcephfs_jni.cc:2878:55: error: invalid conversion from 'const jbyte* {aka const signed char*}' to 'jbyte* {aka signed char*}' [-fpermissive] 
+                 reinterpret_cast<const jbyte*>(rawAddress)); 
+                                                           ^ 
+    In file included from java/native/libcephfs_jni.cc:27:0: 
+    /usr/lib/gcc/x86_64-linux-gnu/4.8/include/jni.h:1471:8: error:   initializing argument 4 of 'void _Jv_JNIEnv::SetByteArrayRegion(jbyteArray, jsize, jsize, jbyte*)' [-fpermissive] 
+       void SetByteArrayRegion (jbyteArray val0, jsize val1, jsize val2, jbyte * val3) 
+            ^ 
+    make[5] *** [java/native/libcephfs_jni_la-libcephfs_jni.lo] Error 1 
+ ~~~~
+
+--- a/m4/ac_prog_javac.m4
++++ b/m4/ac_prog_javac.m4
+@@ -34,11 +34,11 @@
+ 
+ AC_DEFUN([AC_PROG_JAVAC],[
+ AC_REQUIRE([AC_EXEEXT])dnl
+ if test "x$JAVAPREFIX" = x; then
+-        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT)
++        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, javac$EXEEXT "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT)
+ else
+-        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX)
++        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, javac$EXEEXT "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT, $JAVAPREFIX)
+ fi
+ test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
+ AC_PROG_JAVAC_WORKS
+ AC_PROVIDE([$0])dnl
+--- a/src/java/Makefile.am
++++ b/src/java/Makefile.am
+@@ -43,13 +43,13 @@
+ #   https://blogs.oracle.com/darcy/entry/bootclasspath_older_source
+ 
+ $(CEPH_PROXY): $(JAVA_SRC)
+ 	export CLASSPATH=java/ ; \
+-	$(JAVAC) -source 1.5 -target 1.5 -Xlint:-options java/com/ceph/fs/*.java
++	$(JAVAC) -classpath java -source 1.5 -target 1.5 -Xlint:-options java/com/ceph/fs/*.java
+ 
+ $(JAVA_H): $(CEPH_PROXY)
+ 	export CLASSPATH=java/ ; \
+-	$(JAVAH) -jni -o $@ com.ceph.fs.CephMount
++	$(JAVAH) -classpath java -jni -o $@ com.ceph.fs.CephMount
+ 
+ libcephfs.jar: $(CEPH_PROXY)
+ 	$(JAR) cf $@ $(JAVA_CLASSES:%=-C java %) 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ff7416a..f2c3e91 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 fix-defaultweight.patch
+gcj.patch
 init.patch
 logrotate.patch
 modules.patch

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list