Project

General

Profile

Bug #8359

FTBFS with gcj-jdk v4.9.0

Added by Dmitry Smirnov almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
java
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Ceph FTBFS with gcj-jdk v4.9.0:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/usr/lib/jvm/java-gcj/include -I/usr/lib/jvm/java-gcj/include/linux -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=\"/usr/lib/x86_64-linux-gnu\" -DCEPH_PKGLIBDIR=\"/usr/lib/x86_64-linux-gnu/ceph\" -DGTEST_HAS_TR1_TUPLE=0 -D_FORTIFY_SOURCE=2 -I/usr/include/nss -I/usr/include/nspr -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -rdynamic -ftemplate-depth-1024 -Wnon-virtual-dtor -Wno-invalid-offsetof -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wstrict-null-sentinel -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c java/native/libcephfs_jni.cc  -fPIC -DPIC -o java/native/.libs/libcephfs_jni_la-libcephfs_jni.o                                            
java/native/libcephfs_jni.cc: In function '__jobject* sockaddrToInetAddress(JNIEnv*, const sockaddr_storage&, jint*)': 
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/jvm/java-gcj/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) 
        ^ 
Makefile:10590: recipe for target 'java/native/libcephfs_jni_la-libcephfs_jni.lo' failed 

gcj-jdk.patch View (1.42 KB) Dmitry Smirnov, 05/22/2014 09:34 AM

History

#1 Updated by Sage Weil almost 10 years ago

  • Status changed from New to Resolved

merged these to masters a few days ago, now in firefly branch too.

#2 Updated by Dmitry Smirnov almost 10 years ago

  • Status changed from Resolved to 12

No it wasn't resolved, at least not in Firefly.
Merged patches fixed other problems so build can progress until it stops on this particular FTBFS.

#3 Updated by Greg Farnum almost 10 years ago

There was a switch from expecting non-const to expecting const in that function:
http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
versus http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/functions.html

We can const_cast away the constness, maybe? That appears to still work on the newer headers.

#4 Updated by Dmitry Smirnov almost 10 years ago

With attached patch (provided by Gregory) I built Ceph_0.80.1 successfully with gcj-jdk and with openjdk-7.

Thank you, Gregory.

#5 Updated by Greg Farnum almost 10 years ago

  • Status changed from In Progress to Fix Under Review

https://github.com/ceph/ceph/pull/1854

It passes on our gitbuilders too; I'll get somebody to merge at standup.

#6 Updated by Greg Farnum almost 10 years ago

  • Assignee set to Greg Farnum

#7 Updated by Greg Farnum almost 10 years ago

  • Status changed from Fix Under Review to Pending Backport

This got merged in to master by 04f8e0effaae54d1cc4c4b34d30db48b85039595; I guess we need to backport it to Firefly for the packagers, though?

#8 Updated by Greg Farnum almost 10 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF