File tree 2 files changed +8
-2
lines changed
lib/java/os-environment/src/main/java/org/enso/os/environment/jni
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -4249,7 +4249,7 @@ lazy val `os-environment` =
4249
4249
val targetDir = (Test / target).value
4250
4250
NativeImage .buildNativeImage(
4251
4251
" test-os-env" ,
4252
- staticOnLinux = true ,
4252
+ staticOnLinux = false ,
4253
4253
targetDir = targetDir,
4254
4254
mainClass = Some (" org.enso.os.environment.TestRunner" ),
4255
4255
additionalOptions = Seq (
Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ static JVM createImpl(String javaHome) {
40
40
var createJvm = CTypeConversion .toCString ("JNI_CreateJavaVM" )) {
41
41
var jvmSo = dlopen (libPath .get (), RTLD_NOW ());
42
42
assert jvmSo .isNonNull ()
43
- : "Cannot load dynamic library " + libJvmPath + " raw: " + jvmSo .rawValue ();
43
+ : "Cannot load dynamic library "
44
+ + libJvmPath
45
+ + " error: "
46
+ + CTypeConversion .toJavaString (dlerror ());
44
47
JNIBoot .JNICreateJavaVMPointer createJvmFn = dlsym (jvmSo , createJvm .get ());
45
48
int res = createJvmFn .call (jvmPtr , envPtr , jvmArgs );
46
49
assert res == 0 ;
@@ -65,6 +68,9 @@ private static File findDynamicLibrary(String javaHome) {
65
68
@ CFunction (transition = CFunction .Transition .NO_TRANSITION )
66
69
static native <T extends PointerBase > T dlsym (PointerBase handle , CCharPointer name );
67
70
71
+ @ CFunction
72
+ static native CCharPointer dlerror ();
73
+
68
74
static final class Direct implements CContext .Directives {
69
75
70
76
@ Override
You can’t perform that action at this time.
0 commit comments