Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsatisfiedLinkError: jssc.dll: Can't find dependent libraries #108

Closed
tresf opened this issue Aug 6, 2021 · 1 comment · Fixed by #109
Closed

java.lang.UnsatisfiedLinkError: jssc.dll: Can't find dependent libraries #108

tresf opened this issue Aug 6, 2021 · 1 comment · Fixed by #109

Comments

@tresf
Copy link

tresf commented Aug 6, 2021

Since #104, a new file is available for Windows win_arm64/jssc.dll. The file will not load due to an upstream bug report explained in #75 (comment), however the boot path should still work by using:

System.setProperty("jssc.boot.library.path", "/path/to/jssc.dll")

However, it still doesn't work even with the workaround.

Using Dependencies (because dependency walker hangs on Windows ARM64), the following error is shown:

- libc++.dll module could not be found on disk

Research points at a few reported and possibly related upstream issues:

Note: This issue does NOT occur if the jssc.dll is compiled using MSVC. It only exists when cross-compiling using llvm-ming.

@tresf
Copy link
Author

tresf commented Aug 6, 2021

This may simply be a matter of NOT statically linking when using clang to compile a Windows binary... Proposed change:

Click to expand code
 # Statically link gcc/c++
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-       if(WIN32)
-               # Assume mingw, use "-static"
-               set(CMAKE_CXX_STANDARD_LIBRARIES "-static ${CMAKE_CXX_STANDARD_LIBRARIES}")
-       elseif(NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
-               set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc -static-libstdc++ ${CMAKE_CXX_STANDARD_LIBRARIES}")
-       endif()
-elseif(MSVC)
-       # /MT = Multithread, static version of the run-time library
-       set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+if(MSVC)
+    # /MT = Multithread, static version of the run-time library
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+elseif(WIN32)
+    # Assume mingw, use "-static"
+    set(CMAKE_CXX_STANDARD_LIBRARIES "-static ${CMAKE_CXX_STANDARD_LIBRARIES}")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
+    set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc -static-libstdc++ ${CMAKE_CXX_STANDARD_LIBRARIES}")
 endif()

@tresf tresf closed this as completed in #109 Aug 6, 2021
tresf added a commit that referenced this issue Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant