[Win10 x64 / No VS] JNALoadTest: Can't find dependent libraries

19 views
Skip to first unread message

Markus Karg

unread,
Feb 7, 2024, 8:29:55 AMFeb 7
to Java Native Access
I have set up a fresh build environment (Win10 x64, no Visual Studio). The ANT build runs well, but there is a single test which fails: The UNICODE load test. The DLL itself is actually existing in that temporary path, but apparently some dependency is missing (unfortunately it is not clear which one).

Is that my fault (and how to fix it) or is that a known bug of the build script (so I can safely ignore it)?

    [junit] Testcase: testLoadFromUnicodePath(com.sun.jna.JNALoadTest): Caused an ERROR
    [junit] JVM error: System.load() failed to load JNA native library from C:\Users\MARKUS~1\AppData\Local\Temp\testLoadFromUnicodePath-флсву\jna8997040060671353501.dll): java.lang.UnsatisfiedLinkError: C:\Users\Markus Karg\AppData\Local\Temp\testLoadFromUnicodePath-?????\jna8997040060671353501.dll: Can't find dependent libraries
    [junit] java.lang.Error: JVM error: System.load() failed to load JNA native library from C:\Users\MARKUS~1\AppData\Local\Temp\testLoadFromUnicodePath-флсву\jna8997040060671353501.dll): java.lang.UnsatisfiedLinkError: C:\Users\Markus Karg\AppData\Local\Temp\testLoadFromUnicodePath-?????\jna8997040060671353501.dll: Can't find dependent libraries
    [junit]     at com.sun.jna.JNALoadTest.testLoadFromUnicodePath(JNALoadTest.java:266)
    [junit]     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)

Tres Finocchiaro

unread,
Feb 7, 2024, 8:51:03 AMFeb 7
to jna-...@googlegroups.com
This is normal.  AFAIR, some special terminal settings allowing Unicode are needed for that particular test to pass.

Markus Karg

unread,
Feb 7, 2024, 8:57:32 AMFeb 7
to Java Native Access
Good to know, thanks! 😅

Hm... I did chcp 65001, so I can see the Unicode characters in the terminal, but still the test fails. 🤔

Matthias Bläsing

unread,
Feb 7, 2024, 2:08:31 PMFeb 7
to jna-...@googlegroups.com
Hi,
this is a known issue in the unittest. It makes assumptions about code pages, that are only correct on certain locales. If I remember correctly I tested on german locale and with a unicode locale, both cases failed.

Greetings

Matthias

Markus Karg

unread,
Feb 8, 2024, 2:31:54 AMFeb 8
to Java Native Access
Maybe it would make sense to permanently disable that test in the suite to make it easier for new contributors to jump on the train? :-)
Reply all
Reply to author
Forward
0 new messages