I need to compile a Python 2 extension called 'javabridge' that
links against the Oracle JVM. The compile fails with undefined
symbols:
C:\msys2\mingw64\bin/x86_64-w64-mingw32-gcc.exe -shared
-Wl,--enable-auto-image-base -pipe -s -s build/temp.mingw-2.7/_javabridge.o
build/temp.mingw-2.7/_javabridge_nomac.o build/temp.mingw-2.7/_javabridge.def
-Lc:/users/emmenlau/appdata/local/temp/pip-build-rnax5q/javabridge "-LC:\Program
Files\Java\jdk1.8.0_101/lib" -LC:/msys2/mingw64/lib/python2.7/config
-LC:/msys2/mingw64/lib -ljvm -lpython2.7 -o
build/lib.mingw-2.7/javabridge/_javabridge.pyd
build/temp.mingw-2.7/_javabridge.o:_javabridge.c:(.text+0xda3): undefined
reference to `__imp_StopVM'
build/temp.mingw-2.7/_javabridge.o:_javabridge.c:(.text+0x1f4aa): undefined
reference to `__imp_CreateJavaVM'
build/temp.mingw-2.7/_javabridge_nomac.o:_javabridge_nomac.c:(.text+0x103):
undefined reference to `__imp_JNI_CreateJavaVM'
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\msys2\\mingw64\\bin/x86_64-w64-mingw32-gcc.exe' failed
with exit status 1
I want to debug the issue and check that the def-file is correct.
So I try to run dlltool on jvm.dll, but it says "no symbols". How
does that make sense? Its the official Oracle Java JVM 1.8.0_101,
the dll must have symbols? Here is what I tried:
#> dlltool -z /tmp/somedll.def --export-all-symbol '/c/Program
Files/Java/jdk1.8.0_101/jre/bin/server/jvm.dll'
C:\msys2\mingw64\bin\dlltool.exe: C:/Program
Files/Java/jdk1.8.0_101/jre/bin/server/jvm.dll: no symbols
Indeed the generated def-file has only a header, no symbols.
Can you please suggest what I'm doing wrong? I'm on the mingw64
MSYS2 shell and its 64bit Java.
Thanks a lot,
Mario
------------------------------------------------------------------------------
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users