ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: edsquare on January 19, 2015, 02:18:46 pm

Title: Linux Unable to load library 'compileEGMf' (SOLVED!)
Post by: edsquare on January 19, 2015, 02:18:46 pm
Hi and happy new year!

Not so happy for me since I did a fresh install just a few minutes ago, everything according to the instructions (downloaded from git)
Code: [Select]
http://enigma-dev.org/docs/Wiki/Install:Linux
The only way I can launch LGM is in a terminal from the enigma-dev folder (Before I could launch it without the terminal if  I remember correctly),
it launches and in it's progress console starts doing its mojo but then it stops.

And I get this:

Code: [Select]
Error

ENIGMA: Can't communicate with the library
Either because it can't find it or because it uses other methods than expected.


The exact error is:

Unable to load library 'compileEGMf': Native library (linux-x86/libcompileEGMf.so) not found in resource path ([file:/home/eduardo/enigma-dev/plugins/enigma.jar])

There's only a windows related post from 2010 so I'm at a loss about how to fix this.

Help me please?

Edit:

Just ran python install.py and I get this:

Code: [Select]
Enigma package manager
Installing main please wait...
INFO: no dependencies for jnaJar
INFO: jnaJar already up-to-date (same hash)
INFO: no dependencies for lgm
INFO: lgm already up-to-date (same hash)
INFO: no dependencies for infolist
INFO: infolist hash did not match (probably needs updated) localhash:c3d39dd9c08ed430d137e72b9e823d2c remotehash:22bee0144dc32015e424bb88a4eac356
INFO: no dependencies for icns
INFO: icns hash did not match (probably needs updated) localhash:89343464f0330b22cbd50f31e200ad7c remotehash:35fc725e522a2d26a36ea99b0e13b4cf
INFO: no dependencies for alure
INFO: alure already up-to-date (same hash)
INFO: mac already up-to-date (same hash)
INFO: main already up-to-date (same hash)
Finished updating main

EDIT2

If I run make from the enigma-dev folder I get this:

Code: [Select]
eduardo@eduardo-Aspire-M1100 ~/enigma-dev $ make
make -j 3 -C CompilerSource
make[1]: se ingresa al directorio «/home/eduardo/enigma-dev/CompilerSource»
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./JDI/src/General/parse_basics.o JDI/src/General/parse_basics.cpp
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./parser/object_storage.o parser/object_storage.cpp
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./backend/ideprint.o backend/ideprint.cpp
In file included from backend/ideprint.cpp:19:0:
backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
JDI/src/General/parse_basics.cpp: In function ‘std::string parse_bacics::visible::toString(unsigned int)’:
JDI/src/General/parse_basics.cpp:60:12: error: redefinition of ‘std::string parse_bacics::visible::toString(unsigned int)’
     string toString(unsigned n) { char buf[12]; return string(buf,sprintf(buf,"%u", n)); }
            ^
JDI/src/General/parse_basics.cpp:56:12: error: ‘std::string parse_bacics::visible::toString(size_t)’ previously defined here
     string toString(size_t n) { char buf[12]; return string(buf,printf(buf,"%zd", n)); }
            ^
backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
backend/ideprint.cpp:39:11: error: redefinition of ‘ideprint& ideprint::operator<<(unsigned int)’
 ideprint &ideprint::operator<< (unsigned x) {
           ^
backend/ideprint.cpp:30:11: error: ‘ideprint& ideprint::operator<<(size_t)’ previously defined here
 ideprint &ideprint::operator<< (size_t x) {
           ^
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/module_write_backgrounds.o compiler/components/module_write_backgrounds.cpp
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/write_defragged_events.o compiler/components/write_defragged_events.cpp
In file included from parser/object_storage.cpp:186:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/handle_templates.o compiler/components/handle_templates.cpp
In file included from compiler/components/write_defragged_events.cpp:26:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
In file included from compiler/components/module_write_backgrounds.cpp:41:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
In file included from compiler/components/handle_templates.cpp:34:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/parse_secondary.o compiler/components/parse_secondary.cpp
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/module_write_sprites.o compiler/components/module_write_sprites.cpp
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/module_write_sounds.o compiler/components/module_write_sounds.cpp
In file included from compiler/components/parse_secondary.cpp:31:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/parse_and_link.o compiler/components/parse_and_link.cpp
In file included from compiler/components/module_write_sprites.cpp:42:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/module_write_fonts.o compiler/components/module_write_fonts.cpp
In file included from compiler/components/parse_and_link.cpp:31:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
In file included from compiler/components/module_write_sounds.cpp:41:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/components/module_write_paths.o compiler/components/module_write_paths.cpp
g++ -fPIC -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/compile.o compiler/compile.cpp
In file included from compiler/components/module_write_fonts.cpp:34:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
In file included from compiler/compile.cpp:50:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
In file included from compiler/components/module_write_paths.cpp:43:0:
./backend/ideprint.h:41:13: error: ‘ideprint& ideprint::operator<<(unsigned int)’ cannot be overloaded
   ideprint &operator<< (unsigned x);
             ^
./backend/ideprint.h:38:13: error: with ‘ideprint& ideprint::operator<<(size_t)’
   ideprint &operator<< (size_t x);
             ^
make[1]: se sale del directorio «/home/eduardo/enigma-dev/CompilerSource»
make: *** [ENIGMA] Error 2

EDIT3

This is the backtrace on the progress console:

Code: [Select]
Operating System: Linux
Version: 3.13.0-24-generic
Architecture: i386

Java Vendor: Oracle Corporation
Version: 1.7.0_65

Available processors (cores): 2
Free memory (bytes): 8135192
Maximum memory (bytes): 518979584
Total memory available to JVM (bytes): 27832320

File system root: /
Total space (bytes): 64165449728
Free space (bytes): 47711252480
Usable space (bytes): 44428214272

Stack trace:

java.lang.UnsatisfiedLinkError: Unable to load library 'compileEGMf': Native library (linux-x86/libcompileEGMf.so) not found in resource path ([file:/home/eduardo/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:247)
at org.enigma.EnigmaRunner.access$1(EnigmaRunner.java:240)
at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:178)
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: Goombert on January 19, 2015, 03:20:18 pm
Well this is just great, it looks like size_t is defined as unsigned on your system, can you gcc --version for me?

It would be working if not for my changes over in the other topic to make MinGW64 able to build the compiler.
http://enigma-dev.org/forums/index.php?topic=2415

I have to talk to Josh.
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: edsquare on January 19, 2015, 03:29:20 pm
Well this is just great, it looks like size_t is defined as unsigned on your system, can you gcc --version for me?

It would be working if not for my changes over in the other topic to make MinGW64 able to build the compiler.
http://enigma-dev.org/forums/index.php?topic=2415

I have to talk to Josh.

Thanks for the quick response, this is the gcc version I have:

Code: [Select]
eduardo@eduardo-Aspire-M1100 ~ $ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm planning on installing a 64bit linux in addition to the current 32bit and the two windowzes I have in this machine, would this allow me to use lgm/ENIGMA?

If not, does it work correctly on XP?

Thanks a bunch again.

EDIT:

Not that I know what I'm talking about or anything but, wouldn't some ifdefs or whatever they are called on C++ solve it?

You know you define to check for the OS type, if it's 32 then you define size_t as unsigned else you don't.

Also would I be able to build 32bits games from a 64bit OS?

As far as I know it is possible but I tought to check before comminting to use LGM/ENIGMA from it.
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: Goombert on January 19, 2015, 03:32:01 pm
The reason is because size_t is not unsigned on a 64bit system, though it really has nothing to do with your OS, but your compiler, and you're on the same GCC as the portable and myself.

To get around this right now just undo the changes I made in the other topic.
http://enigma-dev.org/forums/index.php?topic=2415

Look at the git commit links and just do the opposite of what I did in those changes and it should build and work fine. Or just wait for me to ask Josh and fix it the correct way.
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: edsquare on January 19, 2015, 03:35:40 pm
The reason is because size_t is not unsigned on a 64bit system, though it really has nothing to do with your OS, but your compiler, and you're on the same GCC as the portable and myself.

To get around this right now just undo the changes I made in the other topic.
http://enigma-dev.org/forums/index.php?topic=2415

Look at the git commit links and just do the opposite of what I did in those changes and it should build and work fine. Or just wait for me to ask Josh and fix it the correct way.

Defining if it's linux32 or 64?

Once fixed I can just run install.py again right?
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: edsquare on January 19, 2015, 03:39:18 pm
The reason is because size_t is not unsigned on a 64bit system, though it really has nothing to do with your OS, but your compiler, and you're on the same GCC as the portable and myself.

To get around this right now just undo the changes I made in the other topic.
http://enigma-dev.org/forums/index.php?topic=2415

Look at the git commit links and just do the opposite of what I did in those changes and it should build and work fine. Or just wait for me to ask Josh and fix it the correct way.

Readding the commits but, how do I know what to put where?  :ohdear: :ohdear: :ohdear:
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: edsquare on January 19, 2015, 03:49:30 pm
The reason is because size_t is not unsigned on a 64bit system, though it really has nothing to do with your OS, but your compiler, and you're on the same GCC as the portable and myself.

To get around this right now just undo the changes I made in the other topic.
http://enigma-dev.org/forums/index.php?topic=2415

Look at the git commit links and just do the opposite of what I did in those changes and it should build and work fine. Or just wait for me to ask Josh and fix it the correct way.

Again not that I know shit but I found this:

Quote
With gcc on linux, std::size_t is usually unsigned long (8 bytes on 64 bits systems) rather than unisgned int (4 bytes)

Here:

Code: [Select]
http://stackoverflow.com/questions/1951519/when-to-use-stdsize-t
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: Goombert on January 19, 2015, 05:33:06 pm
Don't worry I fixed it and this time made sure to build for both Mingw64 and 32.
https://github.com/enigma-dev/enigma-dev/commit/5b99151173b1dad9acb059f9e99a75974801d42b

Just undo all your changes, cd to enigma-dev git reset --hard and then git fetch and git pull. Then it should build, you don't need to run python install.py
Title: Re: Linux Unable to load library 'compileEGMf'
Post by: edsquare on January 19, 2015, 06:24:11 pm
Don't worry I fixed it and this time made sure to build for both Mingw64 and 32.
https://github.com/enigma-dev/enigma-dev/commit/5b99151173b1dad9acb059f9e99a75974801d42b

Just undo all your changes, cd to enigma-dev git reset --hard and then git fetch and git pull. Then it should build, you don't need to run python install.py

Okey but, i erased the folder, if I download as usual will I get the fixed version?


EDIT:

Forget I asked that will you?  :-\

It works our of the box now!  :D

Thank you so mucho Robert!  (Y)
Title: Re: Linux Unable to load library 'compileEGMf' (SOLVED!)
Post by: Goombert on January 19, 2015, 06:49:41 pm
No problem, I had to fix it because it was actually me that just broke it lol. And because now I accomplished what I wanted, 32bit and 64bit support for JDI and the compiler. As usual let us know if you have any more problems!
Title: Re: Linux Unable to load library 'compileEGMf' (SOLVED!)
Post by: edsquare on January 19, 2015, 06:56:04 pm
As usual let us know if you have any more problems!

Thanks will do so!  (Y)