xerial/larray

MMap write error on jdk1.8_windows _x86

Opened this issue · 3 comments

hello,This is my code

public static void main(String[] args) throws IOException {
    MMapBuffer mMapBuffer = new MMapBuffer(new File("f:/down/test.data"), 1L,
        2 * 1024 * 1024 * 1024L,
        MMapMode.READ_WRITE);
    mMapBuffer.putByte(0, (byte) 'g');
    mMapBuffer.release();
  }

This is hs_err_pid.log

Event: 0.042 Thread 0x005b8c00 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x04a06e90) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\shar
Event: 0.042 Thread 0x005b8c00 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x04a07160) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\share\vm\prims\jni.cpp
Event: 0.169 Thread 0x005b8c00 Exception <a 'java/security/PrivilegedActionException'> (0x04a29280) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 0.169 Thread 0x005b8c00 Exception <a 'java/security/PrivilegedActionException'> (0x04a29480) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 0.170 Thread 0x005b8c00 Exception <a 'java/security/PrivilegedActionException'> (0x04a38090) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 0.170 Thread 0x005b8c00 Exception <a 'java/security/PrivilegedActionException'> (0x04a38290) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\share\vm\prims\jvm.cpp, line 1390]
Event: 0.170 Thread 0x005b8c00 Exception <a 'java/lang/NoClassDefFoundError': org/slf4j/impl/StaticLoggerBinder> (0x04a3f438) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u162\10278\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 199]

I think this is fixed in #58, but I couldn't find time to release a new version yet.

Thank you,I can compile success on Linux like this command.

./sbt compile
make

But I tried to compiled larray-mmap on Windows but I didn't succeed,because Windows is don't support make.
so how do I compiled the DLL with windows x86?

To build windows binary, we need to have a cross compiler in Linux, and run make win32 win64.

In my another project, I'm using docker to ease the burden of preparing a cross compiler:
https://github.com/xerial/snappy-java/blob/master/Makefile#L165

I haven't migrated this approach to LArray, but it would be possible by copying some scripts.