Games in Progress: 1 | Players logged in: 3 | Players Registered: 29722 | Games Played Total: 41637
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: UnsatisfiedLinkError - liblpsolve55j.so - Linux 64bit  (Read 2881 times)
puzzud
Mule Forum Newbie
*
Posts: 2



View Profile WWW
« on: April 24, 2010, 23:23 »

Well, it appears as though version 1.2.4 does not work out of the box for Linux users running a 64bit kernel.

Upon running the new version I got this error:

UnsatisfiedLinkError
...mule/data/lib/liblpsolve55j.so: ...mule/datalib/liblpsolve55j.so: wrong ELF class ELFCLASS32 (Possible cause: architecture word width mismatch)

liblpsolve is most likely the product of the new AI system introduced in this version. 64bit Linux users were fortunate that the developers used a very 32/64 bit friendly cross platform game engine to remake this game. However, they overlooked such when they packaged the lpsolve library, only including a Linux 32bit binary.

I believe I have gotten it to work, requiring an additional download and some file deletion/replacement.

First, download the liblpsolve55 java package:
http://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.0.15/lp_solve_5.5.0.15_java.zip/download

Extract it and navigate to the lp_solve_5.5_java/lib/ux64 directory. Copy the liblpsolve55j.so file and put it into your copy of planetmule under the mule/data/lib directory. In doing this, you will be replacing the file of the same name which is a 32bit version Java lpsolve library.

Next make sure you have lp-solve installed on your computer. I run Kubuntu and it was already installed for me at one point, but you should be able to issue a sudo apt-get install lp-solve to download/install it (assuming you are running Ubuntu or some Debian derivative with lp-solve available in its repositories).

Regardless of which Linux distribution, if you don't know where it is installed, perform a locate lp_solve to find where your native binary is located.

Lastly, go to the mule/data/lib directory and delete the liblpsolve55.so file. This file is the main 32bit lpsolve library that is packaged with planetmule. Simply create a link to your appropriately installed version of lpsolve (the one found from the locate command before) in this directory, easily done by ln -s /usr/lib/lp_solve/liblpsolve55.so . for me.

The cross platform game engine the developers used made the appropriate 32/64 bit linking at runtime, however, it doesn't look as though lpsolve is as sophisticated. Either you manually make sure you are using the correct lpsolve files, as directed above, or wait for the developers to either package two versions of Linux planetmule or what I think would be better, utilize the runtime upgrade system to download the appropriate files for you.
« Last Edit: April 24, 2010, 23:26 by puzzud » Logged
earthpig
Mule Forum Newbie
*
Posts: 7


View Profile
« Reply #1 on: April 25, 2010, 23:17 »

hi,

Using Arch 64 here.

I installed the lpsolve package, and replaced /opt/mule/data/lib/liblpsolve55j.so with the 64 bit version, as you directed.

I skipped the part about creating a link, things seem to be working fine.

I use sudo. if you don't, then you probably already know how to translate to/from sudo and # directions. don't forget to do so.

So, the Arch 64 version of this:

0. Install planetmule via the AUR. http://aur.archlinux.org/packages.php?ID=33457
Code:
$ sudo yaourt -Sy planetmule

1. Run planetmule as root, to allow it to update on it's own.
Code:
$ sudo planetmule

2. Verify that it no longer works by trying to play it.

3. Download the lpsolve .zip.
Code:
$ wget http://downloads.sourceforge.net/project/lpsolve/lpsolve/5.5.0.15/lp_solve_5.5.0.15_java.zip

3. unzip it
Code:
$ unzip lp_solve_5.5.0.15_java.zip

4. back up the 32-bit liblpsolve55j.so
Code:
$ sudo mv /opt/mule/data/lib/liblpsolve55j.so /opt/mule/data/lib/liblpsolve55j.so-backup

5. replace that one with the version you just downloaded, the 64 bit one.
Code:
$ sudo cp ~/lp_solve_5.5_java/lib/ux64/liblpsolve55j.so /opt/mule/data/lib/liblpsolve55j.so

6. verify that planetmule now works.

if it doesn't, i suppose try installing the lpsolve package from the repos and creating a link as puzzud suggested. package name is "lpsolve", in the "extras" repo.
« Last Edit: April 26, 2010, 01:14 by earthpig » Logged
C64
Mule Regular
***
Posts: 37


View Profile
« Reply #2 on: April 26, 2010, 06:09 »

Yeah I ran into the same thing, downloaded source from sourceforge, rebuilt it, found the lib...j.so file and moved it into the mule/data directory.  Worked fine then.  Usual life-in-linux jazz....
Logged
Peter
Turborilla
Administrator
Mule Expert
*****
Posts: 378


Planet M.U.L.E. Team


View Profile WWW
« Reply #3 on: April 26, 2010, 06:49 »

We will deal with this when we add support for Mac as well.

You actually only need to replace the files found in:

data/lib/liblpsolve55j.so
data/liblpsolve55.so

With the files I have attached, and it should work for Linux 64 bit.
Logged

davey_lloyd
Mule Forum Newbie
*
Posts: 4


View Profile
« Reply #4 on: September 05, 2010, 18:42 »

I'm having a similar problem.  Actually it started out exactly the same so I followed the instructions.
now I get an error that says
"/mule/data/lib/liblpsolve55j.so :liblpsove55.so :wrong ELF class: ELFCLASS32"

I even tried downloading the files from the previous post directly all to no avail.

I'm new to Linux so please be kind in your responses  Smiley

davey
Logged
Peter
Turborilla
Administrator
Mule Expert
*****
Posts: 378


Planet M.U.L.E. Team


View Profile WWW
« Reply #5 on: September 07, 2010, 06:40 »

...I followed the instructions.
now I get an error that says
"/mule/data/lib/liblpsolve55j.so :liblpsove55.so :wrong ELF class: ELFCLASS32"

Hello davey,

Did you try what I wrote in my post above? If not, please download a new, unaltered, copy of the game and then replace the two .so files and see if that helps.
Logged

Pages: [1]
  Print  
 
Jump to: