Running A Physics Game On Other Computers

I have made a Physics game and now want to share it. But from the two friends I sent it to I get two different error codes. The errors are:

SEVERE: Native code library (32 and 64 bit library) failed to load:

java.lang.UnsatisfiedLinkError:

/Users/Merlin/temp/brooks/Gameb/lib/libodejava.jnilib:

And

INFO: PhysicsNode (null) has been created

Segmentation fault



I am using this the following command to start the program.

java -cp ./bin:./bin/jme-physics.jar:bin/lwjgl.jar:bin/jinput.jar:bin/jme.jar:bin/jme-terrain.jar:bin/jogg-0.0.7.jar:bin/jorbis-0.0.15.jar:bin/jme-awt.jar:bin/lwjgl_util_applet.jar:bin/jme-audio.jar:bin/odejava-jni.jar -Djava.library.path=./lib Run



Both friends use the ATI Radeon X1600 OpenGL Engine - 2.0 ATI-1.4.56 with Mac Os 10

I can run the program on my computer with no errors. I am using the NVIDIA GeForce4 MX OpenGL Engine - 1.1 NVIDIA-1.4.18 with Mac Os 10.4

If you want the full output from the game or the game it self just ask.

Thanks In Advance,

            Cyber_Knight

Segfaults can be caused by ODE with lots of contacts and low stack size. Try setting e.g. -Xss8m and run your game in a new thread (see other topics on this board for details on stack size).



The failure to load native libraries is usually caused by missing dependencies (if the native library itself is found). There should be tools to list the dependencies of a jnilib so your friends could check what's missing (no idea what program that would be on a mac, though).

There is also the potential issue that one of them has a PPC MAC and the other one has an Intel MAC… I think the ODE library for MAC is still compiled only for Intel based MACs… Is that the case?

Both of the friends are on Intel Mac and I am on a PPC. But then wouldn't my friends get the same error. I tried it on my brothers computer and it worked. His computer is a windows xp. Could you point me to a Segfaults topic. I tried seaching.

What jME Physics 2 version are you talking about? Probably your mac natives are simply broken…

Irrisor, is there a new version of that script for compiling the mac binaries?



I tried yesterday with the old one I have and it didn't work.

I had problems with the new ones. So I think I have old ones.

@perick: The one in cvs should be fine (the link in this topic is automatically updated, as well).

I got this:


_dWorldGetCFM
_dWorldGetContactMaxCorrectingVel
_dWorldGetContactSurfaceLayer
_dWorldGetERP
_dWorldGetGravity
_dWorldGetQuickStepNumIterations
_dWorldImpulseToForce
_dWorldQuickStep
_dWorldSetAutoDisableAngularThreshold
_dWorldSetAutoDisableFlag
_dWorldSetAutoDisableLinearThreshold
_dWorldSetAutoDisableSteps
_dWorldSetAutoDisableTime
_dWorldSetAutoEnableDepthSF1
_dWorldSetCFM
_dWorldSetContactMaxCorrectingVel
_dWorldSetContactSurfaceLayer
_dWorldSetERP
_dWorldSetGravity
_dWorldSetQuickStepNumIterations
_dWorldStep
_dWorldStepFast1
_dSpaceCollide2
/usr/bin/libtool: internal link edit command failed
lipo: can't figure out the architecture type of: /var/tmp//ccS5D2pI.out
linking library failed!

uhu, no idea what that means… what is /var/tmp//ccS5D2pI.out :?

I think is the temporary object file (output of the compiler)

Irrisor,



The problem resides when linking the compiled binaries to make the final universal one (intel + ppc). When I remove the "-arch ppc" from the script, leaving only "-arch i386" it compiles and links like a charm, generating the expected 1Mb file containing only the intel version of the library. When I leave the two -arch options in CFLAGS it doesn't work. Any clues?

seems we need somebody who knows about the magic of linking two-arch binaries for macOS :expressionless:

Sorry, I don’t have any clue about this… I will try to have a look at it later, when I reinstall fink… (apparently it dies in my Mac :’( )