[Linux Lobby] AFLobby Beta 3.9.7 - Page 8

[Linux Lobby] AFLobby Beta 3.9.7

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

and does aflobby say that?
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

AFlobby console output names the exact folder it is in, so it's not that.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

yes it does, it outputs the current working directory followed by the library path

Code: Select all

me folder as AFLobby, path: "+ intendedpath+" library path:"+System.getProperty("java.library.path",".")
please post exactly what it says in your console so I can be sure, especially since all I know about mac is "it doesnt work"
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

rather, "it doesn't find the library".

Code: Select all

update!
working directory : /Users/elio/Desktop/aflobbyalpha17

Unsatisfied link error, make sure you have a JNI aware unitsync library in the same folder as AFLobby, path: /Users/elio/Desktop/aflobbyalpha17 library path:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
10053r
Posts: 297
Joined: 28 Feb 2005, 19:19

Post by 10053r »

your script didn't work, AF, but I set the environment variable manually before I launched spring, and I got the same result. See my most recent error message post. I seems like java doesn't care about the environment variable.
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

I've stuck it in each of the paths etc with and without lib prefix with and without jnilib suffix etc, no luck.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

let me make this clear:

Unsatisfied link error, make sure you have a JNI aware unitsync library in the same folder as AFLobby,

path: /home/username/Desktop

library path:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/lib/i386/client/:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/lib/i386:/usrl/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/../lib/i386

the value in path: cannot be found by searching the string library path:. therefore the environment variable does not contain the working directory (path:)

thus is it not logical to try to put the file in one of those java directories?

Also kloot can you verify it works on your PC? Afterall you compiled the linux version..

the same of the mac error:

working directory : /Users/elio/Desktop/aflobbyalpha17

Unsatisfied link error, make sure you have a JNI aware unitsync library in the same folder as AFLobby,
path: /Users/elio/Desktop/aflobbyalpha17
library path:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

This red part confuses me somewhat, I can only think ths could be caused by the way the library was compiled.
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

thus is it not logical to try to put the file in one of those java directories?
I've stuck it in each of the paths etc
...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

AF to linux user wrote:thus is it not logical to try to put the file in one of those java directories?
Mac user wrote:I've stuck it in each of the paths etc
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I'm not a linux/mac user and I've no experience to draw on here. I didnt compile the linux java unitsync, I dont run linux, and I know very little specific to linux. Someone else should compile unitsync with java bindings who cant use kloots version to see if its the library or that specific build. Otherwise I'm grasping at straws here.
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

library path:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

This red part confuses me somewhat, I can only think ths could be caused by the way the library was compiled.

that's nothing to do with the library; it's just how java search path is; . == current dir; : is just the individual path separators. It's either looking for some random name, or it's just not finding what it's after. All I did was a straight compile with the java binding c file included.
User avatar
elio
Posts: 133
Joined: 29 Dec 2006, 06:44

Post by elio »

Someone else should compile unitsync with java bindings who cant use kloots version to see if its the library or that specific build. Otherwise I'm grasping at straws here.
I'm not using kloots' version, just compiling in your .c
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmmz.

Code: Select all

* Loads a code file with the specified filename from the local file
* system as a dynamic library. The filename
* argument must be a complete path name.

System.load()
if you can, try recompiling AFLobby with the exact path to unitsync including extension e.g. /usr/home/libunitsync.so

It may also be worth prepending file:// to the start if that doesnt work.
User avatar
SupaSonic
Posts: 26
Joined: 24 Feb 2007, 14:43

Post by SupaSonic »

Ok, I think I get what's going on here.
I got the same error btw. So I made a new Java file and just tried to load unitsync.so in it. Had no luck with System.loadLibrary, so went for System.load()
Here's the code:

Code: Select all

public class LoadLib {
	public static void main (String args[]) {
		System.load("/home/sonic/eclipse/workspace/Test Project/libunitsync.so");
	}
}
It loads the library, but still gives the following exception:

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/sonic/eclipse/workspace/Test Project/libunitsync.so: Can't load IA 32-bit .so on a IA 32-bit platform
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(Unknown Source)
	at java.lang.ClassLoader.loadLibrary(Unknown Source)
	at java.lang.Runtime.load0(Unknown Source)
	at java.lang.System.load(Unknown Source)
	at LoadLib.main(LoadLib.java:7)
it would seem that unitsync depends on IA 32-bit .so, which Java can't find.
User avatar
SupaSonic
Posts: 26
Joined: 24 Feb 2007, 14:43

Post by SupaSonic »

Okay, after searching for a bit, I found out that this error message is inconclusive. The solution was to either downgrade or upgrade jre. So I downloaded java 1.6, recompiled and re-run my program using java 1.6. This time the error message was much more specific:

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/sonic/eclipse/workspace/Test Project/libunitsync.so: /home/sonic/eclipse/workspace/Test Project/libunitsync.so: undefined symbol: glPushAttrib
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
	at java.lang.Runtime.load0(Runtime.java:770)
	at java.lang.System.load(System.java:1005)
	at LoadLib.main(LoadLib.java:3)
So there's something wrong with the glPushAttrib.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Recompile unitsync using the setup.py script in tools/unitsync, ie.:

Code: Select all

tools/unitsync/setup.py build
In the SConstruct it just links against all libs Spring links to, including GL etc...
User avatar
SupaSonic
Posts: 26
Joined: 24 Feb 2007, 14:43

Post by SupaSonic »

it gives me an error:

Code: Select all

Traceback (most recent call last):
  File "setup.py", line 11, in ?
    import intopts
ImportError: No module named intopts
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It depends on scons configure, run that first.

EDIT: hm, actually that script drags in all libs too..., guess someone has to fix either of them...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmmm, its a relief to see a new lead in this mess, I just tried ubuntu in MSVPC2007 and it hangs when booting into safe graphics mode =(.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

btw there's a checklink() function that takes the library file name (I assume pathname too), I assume it would give the same output as loadlibrary but it may be of use if the scons issue turns out to be a dead end.
Post Reply

Return to “Linux”