Got this weird error when running under 32bit JRE

Reporter: KelvinShadewing  |  Status: open  |  Last Modified: April 09, 2019, 12:35:02 PM

I'm using 32bit Java because the program was corrupting games saved in the native file format when running under 64bit, but when I tried it with 32, I got this error. Apparently something is missing in enigma.jar?

kelvin@Shadewing ~/enigma-dev $ ./start32.sh
Java Version: 10800 (1.8.0_201)
Loading lib files in /home/kelvin/enigma-dev/lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl 
 05_score.lgl 06_extra.lgl 07_draw.lgl 
Calling `make eTCpath=""`
> make -C shared/protos/
> make[1]: Entering directory '/home/kelvin/enigma-dev/shared/protos'
> make codegen
> make[2]: Entering directory '/home/kelvin/enigma-dev/shared/protos'
> mkdir -p codegen/
> protoc -I=. -I=/usr/include --cpp_out=codegen/ server.proto
> server.proto:8:54: Expected ")".
> server.proto:9:44: Expected ")".
> server.proto:10:42: Expected ")".
> Makefile:35: recipe for target 'codegen//server.pb.cc' failed
> make[2]: *** [codegen//server.pb.cc] Error 1
> make[2]: Leaving directory '/home/kelvin/enigma-dev/shared/protos'
> make[1]: *** [lib] Error 2
> Makefile:47: recipe for target 'lib' failed
> make: *** [libProtocols] Error 2
> make[1]: Leaving directory '/home/kelvin/enigma-dev/shared/protos'
> Makefile:29: recipe for target 'libProtocols' failed
2
Process terminated
Thread-4: 
java.lang.UnsatisfiedLinkError: Unable to load library 'compileEGMf': Native library (linux-x86/libcompileEGMf.so) not found in resource path ([file:/home/kelvin/enigma-dev/plugins/enigma.jar])
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
	at com.sun.jna.Library$Handler.<init>(Library.java:147)
	at com.sun.jna.Native.loadLibrary(Native.java:412)
	at com.sun.jna.Native.loadLibrary(Native.java:391)
	at org.enigma.EnigmaRunner.attemptLib(EnigmaRunner.java:248)
	at org.enigma.EnigmaRunner.access$1(EnigmaRunner.java:241)
	at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:179)
java.lang.UnsatisfiedLinkError: Unable to load library 'compileEGMf': Native library (linux-x86/libcompileEGMf.so) not found in resource path ([file:/home/kelvin/enigma-dev/plugins/enigma.jar])
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
	at com.sun.jna.Library$Handler.<init>(Library.java:147)
	at com.sun.jna.Native.loadLibrary(Native.java:412)
	at com.sun.jna.Native.loadLibrary(Native.java:391)
	at org.enigma.EnigmaRunner.attemptLib(EnigmaRunner.java:248)
	at org.enigma.EnigmaRunner.access$1(EnigmaRunner.java:241)
	at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:179)
KelvinShadewing  
Tried again under 64bit OpenJDK. This is a fresh install of Enigma. Got this error:

LateralGM Version: 1.8.40

Operating System: Linux
Version: 4.15.0-46-generic
Architecture: amd64

Java Name: Java HotSpot(TM) 64-Bit Server VM
Java Vendor: Oracle Corporation
Version: 1.8.0_201

Available processors (cores): 8
Free memory (bytes): 74653048
Maximum memory (bytes): 1803026432
Total memory available to JVM (bytes): 108003328

File system root: /
Total space (bytes): 483790184448
Free space (bytes): 132257103872
Usable space (bytes): 107658403840

Stack trace:

java.lang.UnsatisfiedLinkError: Unable to load library 'compileEGMf': Native library (linux-x86-64/libcompileEGMf.so) not found in resource path ([file:/home/kelvin/enigma-dev/plugins/enigma.jar])
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
	at com.sun.jna.Library$Handler.<init>(Library.java:147)
	at com.sun.jna.Native.loadLibrary(Native.java:412)
	at com.sun.jna.Native.loadLibrary(Native.java:391)
	at org.enigma.EnigmaRunner.attemptLib(EnigmaRunner.java:248)
	at org.enigma.EnigmaRunner.access$1(EnigmaRunner.java:241)
	at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:179)

RobertBColton  

I'm sorry, please ignore my earlier comments. I see you were using the 64 bit version fine but now want to switch to the 32 bit version. I can say that I don't think this will make much of a difference when it comes to project saving, that is honestly just a LateralGM issue that needs worked on.

Regardless, you can get the 32 bit version working by doing what I did say except using the MinGW32 MSYS2 terminal instead of the MinGW64 MSYS2 terminal. You need to close out LGM, make clean, and then make -j4 all from the correct MinGW32 MSYS2 terminal. It will build a 32 bit version of compileEGMf, which the 32 bit Java will then be able to load. Understand that to build the 32 bit version you may need to install the 32 bit version of the dependencies.
https://enigma-dev.org/docs/Wiki/Install:Windows

Please sign in to post comments, or you can view this issue on GitHub.