Page 21 of 49

Posted: 05 Jun 2007, 18:29
by Agon
Okay, I instaleld JDK and JRE version 1.6.
And than I enter "scons configure" and java was not found.
Checking for Java... not found
Guessing Java include path... /usr/include/java
Can you tell me that I must include here /usr/include/java ?
I tryed jdk and jre to copy into. But same output!

Posted: 05 Jun 2007, 22:01
by AF
You'd have to ask tobi, I dont know very much about building spring and its dependencies on linux.

Posted: 06 Jun 2007, 03:27
by Lippy
Agon wrote:Okay, I instaleld JDK and JRE version 1.6.
And than I enter "scons configure" and java was not found.
Checking for Java... not found
Guessing Java include path... /usr/include/java
Can you tell me that I must include here /usr/include/java ?
I tryed jdk and jre to copy into. But same output!
Install free-java-sdk.. worked for me as far as I can remember

EDIT: This guy had the same problem (I think) http://spring.clan-sy.com/phpbb/viewtop ... reejavasdk , I updated the wiki, to include free-java-sdk, but I'm not sure it's the correct way of doing it.

Posted: 06 Jun 2007, 14:48
by Agon
Install free-java-sdk.. worked for me as far as I can remember
Thx. I will try it.
Do you mean this: http://openjdk.java.net/ ?

Okay I finish here, sry af. But I have no time for trying to install a open jdk with big requires.
Maybe Lippy can do this. But I don´t want to install 100 of packages to install one package to compile one library.

Posted: 06 Jun 2007, 16:18
by Lippy
Agon wrote:
Install free-java-sdk.. worked for me as far as I can remember
Thx. I will try it.
Do you mean this: http://openjdk.java.net/ ?

Okay I finish here, sry af. But I have no time for trying to install a open jdk with big requires.
Maybe Lippy can do this. But I don´t want to install 100 of packages to install one package to compile one library.
Agon, is it not on yast (you're using suse right?)? I just used "apt-get install free-java-sdk" on ubuntu.

I could try to do "this" but I'm not really sure what "this" is. From what I can figure out AF wants someone to compile the latest SVN and then give him the unitsync.so file? (whats the directory?)

Posted: 06 Jun 2007, 16:48
by Agon
I think he needs the javaunitsync.so not the unitsync.so.
cd ~/src/taspring_0.73b1
scons omni
cd omni
cp unitsync.so $HOME/.spring/spring-gui-3.12
For the normal unitsync.so.

Posted: 06 Jun 2007, 17:16
by AF
If you have a jdk and jre correctly installed and its not taking the hint then I suggest you contact tobi as there must be something wrong with the java check.

Posted: 06 Jun 2007, 18:52
by Lippy
Agon wrote:I think he needs the javaunitsync.so not the unitsync.so.
cd ~/src/taspring_0.73b1
scons omni
cd omni
cp unitsync.so $HOME/.spring/spring-gui-3.12
For the normal unitsync.so.
kk, I'll do it tomorrow morning, as I can't now.

Posted: 06 Jun 2007, 19:38
by Relative
Tried to reload the map list after downloading a new map:

Code: Select all

[Loaded com.sun.imageio.plugins.jpeg.JPEGImageWriterSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded com.sun.imageio.spi.FileImageInputStreamSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded com.sun.imageio.spi.FileImageOutputStreamSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded com.sun.imageio.spi.InputStreamImageInputStreamSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded com.sun.imageio.spi.OutputStreamImageOutputStreamSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded com.sun.imageio.spi.RAFImageInputStreamSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded com.sun.imageio.spi.RAFImageOutputStreamSpi from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded javax.imageio.spi.IIORegistry$1 from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded javax.imageio.ImageReader from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded javax.imageio.metadata.IIOMetadataFormat from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded javax.imageio.ImageTranscoder from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded javax.imageio.ImageWriter from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded javax.imageio.IIOException from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
javax.imageio.IIOException: Can't read input file!
[Loaded aflobby.CBattleWindow$2 from file:/usr/share/games/spring/aflobby.jar]
javax.imageio.IIOException: Can't read input file!
javax.imageio.IIOException: Can't read input file!
[Loaded aflobby.CBattleWindow$57 from file:/usr/share/games/spring/aflobby.jar]
[Loaded javax.swing.BufferStrategyPaintManager$BufferInfo from shared objects file]
[Loaded java.awt.Component$BltBufferStrategy from shared objects file]
[Loaded sun.awt.SubRegionShowable from shared objects file]
[Loaded java.awt.Component$BltSubRegionBufferStrategy from shared objects file]
javax.imageio.IIOException: Can't read input file!
javax.imageio.IIOException: Can't read input file!
[Loaded sun.reflect.GeneratedConstructorAccessor4 from __JVM_DefineClass__]
[Loaded sun.misc.Signal$1 from /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar]
[Loaded java.io.DeleteOnExitHook from shared objects file]

Posted: 06 Jun 2007, 20:52
by AF
Itll need tor egenerate that minimap for the new map then.

Posted: 07 Jun 2007, 13:53
by Lippy
Ok, I've compiled the latest SVN (3811), and I've got a unitsync.so in my /usr/local/lib/spring. Is this what you want? (I have no idea if it has the JNI bindings; it is a lot smaller than own3d's too at 0.5mb)

Posted: 07 Jun 2007, 19:48
by Tobi
Latest SVN has the Java/JNI bindings.

Posted: 07 Jun 2007, 20:31
by Lippy

Posted: 07 Jun 2007, 23:11
by AF
Test it with this (after renaming to libjavaunitsync.so)

http://www.darkstars.co.uk/randomfiles/ ... /AFLB1.zip

That build may nto be usable as a lobby but itll tell you if it works or not when you try to login.

Posted: 08 Jun 2007, 12:03
by Relative
Sorry, this one doesn't work either

Code: Select all

Exception in thread "Timer-4" java.lang.UnsatisfiedLinkError: aflobby.CUnitSyncJNIBindings.Init(ZI)I
        at aflobby.CUnitSyncJNIBindings.Init(Native Method)
        at aflobby.CSync.Setup(CSync.java:76)
        at aflobby.LoginTask.run(JLoginPanel.java:20)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

Posted: 08 Jun 2007, 15:14
by Lippy
Bah, I spent absolutely ages trying unitsync to work; but failed; getting the same error as relative every single time; with or without the noexception build.

However I think I may have found the problem; using my trusty ctrl-f skills i found this in SConstruct;

Code: Select all

# Somehow unitsync fails to build with mingw:
#  "build\tools\unitsync\pybind.o(.text+0x129d): In function `initunitsync':
#   pybind.cpp:663: undefined reference to `_imp__Py_InitModule4TraceRefs'"
# Figured this out: this means we're attempting to build unitsync with debugging
# enabled against a python version with debugging disabled.
if env['platform'] != 'windows':
	Default(unitsync)
Now I haven't the slightest idea about python, but I'm assuming that as soon as scons finds it's buidling on an non-ms system, it uses the default unitsync. (which may be one without java bindings). What's even more irritating is that everytime I recompiled I sd5summed the unitsync.so file and every time it was different.

When I commented this out, unitsync did not build at all, so I'm assuming this has not been fixed yet, and was just a quick hack. Could any of the devs shed any light on this?

But then again, I might be completely wrong :P

EDIT: Indeed I was wrong :( ; it means that unitsync is compiled by default on linux

Posted: 08 Jun 2007, 16:10
by AF
Your best asking tobi. As far as I'm aware there isnt an ms system scons actually works on.

Posted: 09 Jun 2007, 21:08
by AF
Tobi hs just amde a commit that changes th java bindings that might fix things.

Code: Select all

Author: tvo
Date: 2007-06-09 20:43:17 +0200 (Sat, 09 Jun 2007)
New Revision: 3813

Modified:
  trunk/tools/unitsync/javabind.cpp
Log:
* Fix java bindings on Linux (hopefully they still work on Windows)



Modified: trunk/tools/unitsync/javabind.cpp
===================================================================
--- trunk/tools/unitsync/javabind.cpp   2007-06-09 14:33:33 UTC (rev 3812)
+++ trunk/tools/unitsync/javabind.cpp   2007-06-09 18:43:17 UTC (rev 3813)
@@ -22,7 +22,7 @@

 // JNIEXPORT doesn't define default visibility
 #ifdef __GNUC__
-#pragma visibility(default)
+#pragma GCC visibility push(default)
 #endif

 DLL_EXPORT const char* __stdcall GetSpringVersion();
I'll be testing this in windows soon.

Posted: 10 Jun 2007, 03:09
by Lippy
Goddamn i love Tobi; this is only a few hours after I spoke to him!

Posted: 10 Jun 2007, 03:38
by AF
I've just made a rather big restructuring of the connection code that ment code changes in almost every single class, and first full working build I managed to test, it all worked as good as before if not better. w00t for bugless coding!

The restructuring was in order to support multiple protocols.