Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Compiling odejava natives  (Read 2049 times)
0 Members and 1 Guest are viewing this topic.
Offline irrisor

Junior Member





« Posted 2005-03-14 07:58:04 »

Hi there,

I'm trying to compile the odejava natives but stuck with the following problem:
After running swig it leaves me with incomplete sources - especially OdeJNI.java has only half of the methods! If I take the Java sources from CVS it discovers that these methods are missing in the native part, too.

I'm using the CVS Version of odejava and the CVS Version of ode - are they incompatible? Or do I use a wrong swig Version (1.3.24)?
Perhaps someone can send me/check in the generated odejava_wrap.cxx?

Unfortunaltely the odejava.org page is down (some strange mysql error) so I can't look there for info...

Any help appreciated.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2005-03-14 09:08:31 »

Quote

Unfortunaltely the odejava.org page is down (some strange mysql error) so I can't look there for info...


Looks like one of the MySQL tables was corrupt.  Lucky it wasn't an important one.  It's now fixed.  Thanks for telling me about it.

Check out: http://odejava.org/OdejavaCompileNative

Those notes were made in a bit of a hurry.  I plan on recompiling the natives soon and will update that documentation.

May I ask why you are trying to compile the natives?  Most people should use the ones we provide.

Will.

Offline irrisor

Junior Member





« Reply #2 - Posted 2005-03-14 09:25:54 »

Ah, thanks, now I can read the doc - but where to get a "odejava-certified" ode source?
Which patches?! How to apply the patches? Guess I don't need the Makefile patch when using VC? (I already managed to compile with that)

I want to compile the native stuff myself to have a look at that many crashes I get while using odejava, as they are pretty strange:
Some time everything seems to work properly, then I change some java file (nothing to do with the physics) then my app always crashes while starting, using java debug mode. Using non-debug mode everything is fine again - till the time I recompile my project; now default mode won't start, but debug does! The errors all have an access violation in odejava.dll+xxxx. (using JDK1.5)
I already managed to track one of them down to a line in the ode sources - but with the incomplete lib...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2005-03-14 11:26:08 »

https://odejava.dev.java.net/servlets/ProjectDocumentList?folderID=2191&expandFolder=2191&folderID=0

See:  "ODE Sources"

I believe that contains pre-patched sources.  If you plonk that into the odejava/compile directory, it should just work.

Some of those instructions are for updating the underlying ODE code which involves downloading the latest ODE sources, applying the patches and recompiling.  Although if the ODE API changes, then more work is needed.

Will.

Offline irrisor

Junior Member





« Reply #4 - Posted 2005-03-14 11:51:20 »

Ah, figured out the problem: It's the SWIG Version: 1.3.24/23 does not work (even with the ode sources you specifed) - 1.3.20 does! It even works fine with the CVS source of ODE.

Why would one need the cylinder2 patch? Anything missing/not working if I don't have it?

/Irrisor

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #5 - Posted 2005-03-14 21:13:03 »

actually no, you don't need the cylinder2 patch currently.

re: swig -- that is bad.  Any idea why the newer versions didn't work?  I know that the really old SWIG versions (that some RedHat distros still sihpped with last October) do not work.

Quote
It even works fine with the CVS source of ODE.


And do the tests still run?  If so -- great!

Cheers,

Will.

Offline irrisor

Junior Member





« Reply #6 - Posted 2005-03-15 07:15:04 »

Quote
Any idea why the newer versions didn't work?

Sorry - no idea Sad

Quote
And do the tests still run?

Tests?! I could not find any Unit tests in the sources.  Huh

If you mean the Stuff in the org.odejava.test package - it can be run and does not complain about anything; they print some coordinates to System.out (except MultiGeomTest) ... no real test result though.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #7 - Posted 2005-03-15 23:13:04 »

no unit tests, but there are demos

You can launch them from the odejava-xith3d directory (you will need to add xith3d and its dependancies to your class path first).

Will.

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #8 - Posted 2005-03-17 00:54:22 »

OK, I have redone that documentation, it was terrible previously.  Now it's a bit more useful, although I would like to expand on it more.

http://odejava.org/OdejavaCompileNative

Please feel free to add your $0.02, if you join the Wiki, you can make changes to that page directly.

Cheers,

Will.

Offline Ole Friis

Senior Newbie




Java rocks! Games are fun!


« Reply #9 - Posted 2005-04-02 16:44:18 »

Hi William!

Today I tried my luck at compiling the Odejava natives, but without success. To stay clear of trouble, I downloaded the latest certified ODE source files referenced from the Odejava Wiki page, since those sources must have worked for somebody before me :-)

I'm trying to compile the Odejava natives for Linux.

The new Wiki page looks a lot better than the old one, so thumbs up! I'll make a brief summary of what I did in order to make the sources compile:

1: I downloaded the latest certified ODE sources, as described on the Wiki page.
2: I copied user-settings.examples into both user-settings and user.settings (just to make sure I got the right file there - are you sure it should be user.settings, as the Wiki page says?), setting these variables:
PLATFORM=unix-gcc
PRECISION=SINGLE
BUILD=debug
WINDOWS16=0
OPCODE_DIRECTORY=OPCODE
3: I ran make-gcc.sh.

This gives the following error when make-gcc.sh is doing "make ode-lib" from the ode directory:

make: *** [ode/src/collision_trimesh_trimesh.o] Error 1

Later, when make-gcc.sh is making libodejava.so, these errors (or are they strictly speaking just warnings?) occur, and no libodejava.so file is generated:

g++: OPCODE/*.o: No such file or directory
g++: OPCODE/Ice/*.o: No such file or directory

I guess the problem is that make-gcc.sh makes no attempt at compiling OPCODE, although the user-settings.example file states that the ODE build files will not do this for us. Has make-gcc really ever worked, or should I just find out how to compile OPCODE before I start compiling the Odejava natives?

Thanks in advance - any help greatly appreciated :-)

Ole
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ole Friis

Senior Newbie




Java rocks! Games are fun!


« Reply #10 - Posted 2005-04-09 08:21:27 »

Oh well, I just read on the ODE mailing list that the ODE makefile actually _does_ compile OPCODE, despite what is said in various ODE documentation.

So, my problems are probably not related to the Odejava makefile, but compiling ODE in general. Therefore, there's no idea in me bugging this list with my problems in this regard. Sorry ;-)

Ole
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #11 - Posted 2005-04-14 06:26:19 »

One used to have to compile OPCODE seperatally hence the inconsistancy in the docs (they are just out of date).

Any luck?

What linux distro are you using?  I last compiled this on Fedora2.


Will.

Offline irrisor

Junior Member





« Reply #12 - Posted 2005-04-30 20:46:42 »

Hi again

when I compile odejava and ode myself everything works except a car demo (from jmephysics).  The cars tires (cylinders) stick a little bit in the ground and the car does not move.
With the natives from Will (2004-10-30) it works fine.
What's the difference? I used the CVS from ode and odejava and compiled with MS VS C++ .NET
Any ideas?
Offline irrisor

Junior Member





« Reply #13 - Posted 2005-04-30 21:58:42 »

I figured out that it is caused by this call:

Ode.dGeomTriMeshDataBuildSingle1(data, tmpVertices, 12,
                             vertices.length, tmpIndices, indices.length, 12, tmpNormals);

when changing this to

Ode.dGeomTriMeshDataBuildSingle1(data, tmpVertices, 3,
                             vertices.length, tmpIndices, indices.length, 3, tmpNormals);

it works with the current CVS Version. What is correct? Why are 12 and 3 used, no named constants?
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #14 - Posted 2005-04-30 22:09:42 »

please see this thread (near the end)

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=physics;action=display;num=1098477412;start=45#45


DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!