[foreign] libclang.dll not copied to JDK image on Windows

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Jan 16 14:07:00 UTC 2019


As the subject implies, there seems to be a build setup issue on 
windows, as the image I've built doesn't have libclang.dll under the 
images 'lib' folder.

As a result jextract fails with the simplest of example:

$ build/windows-x64/images/jdk/bin/jextract.exe foo.h
Exception in thread "main" java.lang.UnsatisfiedLinkError: 
C:\cygwin64\home\MCIMADAM\panama\closed\build\windows-x64\images\jdk\bin\jclang.dll: 
Can't find dependent libraries
         at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native 
Method)
         at 
java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2451)
         at 
java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2523)
         at 
java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2733)
         at 
java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2679)
         at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:849)
         at java.base/java.lang.System.loadLibrary(System.java:1905)
         at 
jdk.internal.clang/jdk.internal.clang.LibClang.<clinit>(LibClang.java:35)
         at 
jdk.jextract/com.sun.tools.jextract.parser.Parser.parse(Parser.java:71)
         at 
jdk.jextract/com.sun.tools.jextract.JextractTool.processHeaders(JextractTool.java:58)
         at jdk.jextract/com.sun.tools.jextract.Main.run(Main.java:264)
         at jdk.jextract/com.sun.tools.jextract.Main.main(Main.java:334)


Is this a known issue? This is what I get in the spec.gmk file:

CLANG_LIB_PATH:=/cygdrive/c/progra~1/llvm/lib
CLANG_INCLUDE_PATH:=/cygdrive/c/progra~1/llvm/include
CLANG_INCLUDE_AUX_PATH:=/cygdrive/c/progra~1/llvm/lib/clang/70fe6e~1.0/include
CLANG_LIBNAME:=/cygdrive/c/progra~1/llvm/bin/libclang.dll
LIBCLANG_CPPFLAGS:=-I/cygdrive/c/progra~1/llvm/include
LIBCLANG_LDFLAGS:=/LIBPATH:/cygdrive/c/progra~1/llvm/lib
LIBCLANG_LIBS:=/cygdrive/c/progra~1/llvm/lib/libclang.lib

All paths involved seem to exist.

Maurizio



More information about the panama-dev mailing list