[ 
https://issues.apache.org/jira/browse/MESOS-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14284034#comment-14284034
 ] 

Tony Reix commented on MESOS-2216:
----------------------------------

With conftest.cpp :
#include <jni.h>
int main(int argc, char** argv)
{
  JNIEnv* env;
  JavaVM* jvm;
  JavaVMInitArgs vmArgs;
  return JNI_CreateJavaVM(&jvm, (void**) &env, &vmArgs);
}

$ ./libtool --tag=CXX --mode=link g++ -Wall -Werror 
-I/usr/lib/jvm/ibm-java-x86_64-71/include 
-I/usr/lib/jvm/ibm-java-x86_64-71/include/linux -o conftest conftest.cpp 
-L/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server 
-R/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server -Wl,-ljvm -ldl
libtool: link: g++ -Wall -Werror -I/usr/lib/jvm/ibm-java-x86_64-71/include 
-I/usr/lib/jvm/ibm-java-x86_64-71/include/linux -o conftest conftest.cpp 
-Wl,-ljvm  -L/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server -ldl 
-Wl,-rpath -Wl,/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server

$ ./conftest
libjvm.so 
preloadLibrary(/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/libj9vm27.so): 
/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/libj9vm27.so: cannot open shared 
object file: No such file or directory
libjvm.so failed to load: j9vm27


$ ll /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/libj9vm27.so
ls: cannot access /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/libj9vm27.so: 
No such file or directory

$ find   /usr/lib/jvm/ibm-java-x86_64-71 -name libj9vm27.so
/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/default/libj9vm27.so
/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/compressedrefs/libj9vm27.so

$ ll /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/default/libj9vm27.so 
/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/compressedrefs/libj9vm27.so
-rwxr-xr-x 1 root root 1141581 Oct 26 00:37 
/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/compressedrefs/libj9vm27.so*
-rwxr-xr-x 1 root root 1085481 Oct 26 00:37 
/usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/default/libj9vm27.so*


There are no file libj9*27.so at:
   /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64

However, there are 20 at:
   /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/default/
and at:
  /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/compressedrefs/
But they are not the same.

It seems that libtool looks at the wrong place.
How can we say to it to look at .../default or ..../compressedrefs ?

> The "configure" phase breaks with the IBM JVM.
> ----------------------------------------------
>
>                 Key: MESOS-2216
>                 URL: https://issues.apache.org/jira/browse/MESOS-2216
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 0.20.1
>         Environment: Ubuntu / x86_64
>            Reporter: Tony Reix
>
> ./configure does not work with IBM JVM, since it looks for a directory:
>    /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server       x86_64
>    /usr/lib/jvm/ibm-java-ppc64le-71/jre/lib/ppc64le/server    PPC64 LE
> that does not exist for the IBM JVM.
> Though this directory does exist for Oracle JVM and Open JDK:
>    /usr/lib/jvm/jdk1.7.0_71/jre/lib/amd64/server                  Oracle JVM
>    /usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/amd64/server     OpenJDK
> However, the files:
>   libjsig.so
>   libjvm.so   (3 versions)
> do exist for IBM JVM.
> Anyway, creating the server directory and copying the files (tried with the 3 
> versions of libjvm.so) does not fix the issue:
> checking whether or not we can build with JNI... 
> /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server/libjvm.so: undefined 
> reference to `dlopen'
> /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server/libjvm.so: undefined 
> reference to `dlclose'
> /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server/libjvm.so: undefined 
> reference to `dlerror'
> /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server/libjvm.so: undefined 
> reference to `dlsym'
> /usr/lib/jvm/ibm-java-x86_64-71/jre/lib/amd64/server/libjvm.so: undefined 
> reference to `dladdr'
> Something (dlopen, dlclose, dlerror, dlsym, dladdr) is missing in IBM JVM.
> So, either the configure step relies on a feature that is not in the Java 
> standard but only in the Oracle JVM and OpenJDK, or the IBM JVM lacks part of 
> the Java standard.
> I'm not an expert about this. So, I'd like Mesos people to experiment with 
> IBM JVM. Maybe there is another solution for this step of the Mesos configure 
> that would work with all 3 JVMs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to