Hi Folks,
I'm working with jME 1.0 and jME Physics 2 for jME 1.0 and now its finally time to port my projects to jME 2.0 and jME Physics 2 for jME 2.0.
My working platform:
Mac OS X 10.4.11 (8S165) ppc
Kernel-Version: Darwin 8.11.0
Eclipse SDK
Version: 3.4.1
Build id: M20080911-1700
Well I checked out all files for:
jME 2.0
http://jmonkeyengine.googlecode.com/svn/
jME Physics 2 for jME 2.0
http://jmephysics.googlecode.com/svn/trunk/
After the checkout I compiled jME 2.0 with no errors and all tests and demos worked fine. So I checked out jME Physics 2 and referenced the jME 2.0 project to it, to get all necessary classes and libs from the mother ship.
jME Physics 2 compiled fine after I changed the basedir entries in the build.xml and build.properties.default to my actual jME 2.0 folder/project name. (i.e. it was jme and mine is jme2)
Then I compiled jME Physics 2 and tried to run some tests from the tutorial folder.
Right after the default config screen, where you can set the window resolutions etc., remains the application window black and after some seconds the window gets closed with no error message to the console but with an OS dialog error box - that the application caused an error and was closed …
This happens with all tutorial or test files.
After some further tryouts I decided to get the odejava sources from:
cvs.dev.java.net:/cvs
to check if I've got an older or incompatible version to my system with the jME Physics 2 package.
I compiled the odejava-jni.jar from the sources and replaced the old lib in my jME Physics 2 project with this new one.
All test start now without an OS crash but with an runtime exception:
14.10.2008 00:26:35 org.odejava.Odejava <clinit>
SCHWERWIEGEND: Wrong native version! Expected 0.3.2, but found 0.3.1
14.10.2008 00:26:36 com.jmex.physics.PhysicsSpace scanAvailableImplementations
WARNUNG: Failed to use physics implementation 'com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory' due to Exception/Error: java.lang.UnsupportedOperationException: Failed to load natives
java.lang.UnsupportedOperationException: Failed to load natives
at org.odejava.Odejava.init(Odejava.java:125)
at com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory.getImplementationVersion(OdePhysicsSpace.java:188)
at com.jmex.physics.PhysicsSpace.scanAvailableImplementations(PhysicsSpace.java:373)
at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:340)
at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:91)
at com.jme.app.BaseGame.start(BaseGame.java:67)
at com.jmetest.physicstut.Lesson1.main(Lesson1.java:106)
Caused by: java.lang.UnsatisfiedLinkError: Wrong native version! Expected 0.3.2, but found 0.3.1
at org.odejava.Odejava.<clinit>(Odejava.java:105)
... 6 more
So the new compiled version of odejava-jni.jar is 0.3.2 and the native from the jME Physics 2 still is 0.3.1. Thats no wonder cause I didnt changed it. My next step was to get the 0.3.2 version of this natives for my system from the repositories or from some other source in the www - but I was unlucky.
The next thing I sad to me: "Hey I probably could compile it from the odejava sources!" ;) So i gave it a shot. Fortunately the sources included a build script build-odejava-jni-osx.sh.
Some words in front: I never ever compiled C++ libs for my OS or any other ;)
After I figured out what tools I needed and after 2 days of installation and configuration I've finally got the build script running ... untill:
====script fail ending===
Now you are ready to run ./configure
./build-odejava-jni-osx.sh: line 23: export: `-Wl,-syslibroot': not a valid identifier
./build-odejava-jni-osx.sh: line 23: export: `/Developer/SDKs/MacOSX10.4u.sdk': not a valid identifier
Running ./configure
checking build system type... powerpc-apple-darwin8.11.0
checking host system type... powerpc-apple-darwin8.11.0
checking target system type... powerpc-apple-darwin8.11.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
opende configure failed!
====config.log====
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ODE configure 0.9.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --disable-dependency-tracking --without-tests
##
##
## Platform. ##
##
##
hostname = Kobalt-2.local
uname -m = Power Macintosh
uname -r = 8.11.0
uname -s = Darwin
uname -v = Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC
/usr/bin/uname -p = powerpc
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = Mach kernel version:
Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 1.00 gigabytes
Default processor set: 85 tasks, 280 threads, 1 processors
Load average: 3.09, Mach factor: 0.20
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /sw/bin
PATH: /opt/local/bin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
##
##
## Core tests. ##
##
##
configure:1389: checking build system type
configure:1407: result: powerpc-apple-darwin8.11.0
configure:1415: checking host system type
configure:1429: result: powerpc-apple-darwin8.11.0
configure:1437: checking target system type
configure:1451: result: powerpc-apple-darwin8.11.0
configure:1480: checking for a BSD-compatible install
configure:1535: result: /usr/bin/install -c
configure:1546: checking whether build environment is sane
configure:1589: result: yes
configure:1654: checking for gawk
configure:1683: result: no
configure:1654: checking for mawk
configure:1683: result: no
configure:1654: checking for nawk
configure:1683: result: no
configure:1654: checking for awk
configure:1670: found /usr/bin/awk
configure:1680: result: awk
configure:1690: checking whether make sets $(MAKE)
configure:1710: result: yes
configure:1892: checking for style of include used by make
configure:1920: result: GNU
configure:1991: checking for gcc
configure:2007: found /usr/bin/gcc
configure:2017: result: gcc
configure:2261: checking for C compiler version
configure:2264: gcc --version </dev/null >&5
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2267: $? = 0
configure:2269: gcc -v </dev/null >&5
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5026.obj~19/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 (Apple Computer, Inc. build 5026)
configure:2272: $? = 0
configure:2274: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:2277: $? = 1
configure:2300: checking for C compiler default output file name
configure:2303: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 conftest.c >&5
/usr/bin/ld: for architecture i386
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.0/../../../libmx.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.0/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
___keymgr_dwarf2_register_sections
__cthread_init_routine
_atexit
_errno
_exit
_mach_init_routine
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cc0B5MSd.out (No such file or directory)
configure:2306: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "ODE"
| #define PACKAGE_TARNAME "ode"
| #define PACKAGE_VERSION "0.9.0"
| #define PACKAGE_STRING "ODE 0.9.0"
| #define PACKAGE_BUGREPORT "ode@ode.org"
| #define PACKAGE "ODE"
| #define VERSION "0.9.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2345: error: C compiler cannot create executables
See `config.log' for more details.
##
##
## Cache variables. ##
##
##
ac_cv_build=powerpc-apple-darwin8.11.0
ac_cv_build_alias=powerpc-apple-darwin8.11.0
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-arch ppc -arch i386'
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-arch ppc -arch i386'
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=powerpc-apple-darwin8.11.0
ac_cv_host_alias=powerpc-apple-darwin8.11.0
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=powerpc-apple-darwin8.11.0
ac_cv_target_alias=powerpc-apple-darwin8.11.0
##
##
## Output variables. ##
##
##
ACLOCAL='${SHELL} /Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/missing --run aclocal-1.9'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE='#'
AMTAR='${SHELL} /Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/missing --run tar'
ARCHFLAGS=''
AUTOCONF='${SHELL} /Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/missing --run autoconf'
AUTOHEADER='${SHELL} /Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/missing --run autoheader'
AUTOMAKE='${SHELL} /Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/missing --run automake-1.9'
AWK='awk'
CC='gcc'
CCDEPMODE=''
CFLAGS='-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
CPP=''
CPPFLAGS=''
CXX=''
CXXDEPMODE=''
CXXFLAGS='-arch ppc -arch i386'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DRAWSTUFF=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_DEMOS_FALSE=''
ENABLE_DEMOS_TRUE=''
EXEEXT=''
GIMPACT_FALSE=''
GIMPACT_TRUE=''
GL_LIBS=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS='-arch ppc -arch i386'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/missing --run makeinfo'
OBJEXT=''
ODE_AGE='0'
ODE_CURRENT='0'
ODE_RELEASE='0.9.0'
ODE_REVISION='9'
ODE_SONAME=''
OPCODE_FALSE=''
OPCODE_TRUE=''
OSX_FALSE=''
OSX_TRUE=''
PACKAGE='ODE'
PACKAGE_BUGREPORT='ode@ode.org'
PACKAGE_NAME='ODE'
PACKAGE_STRING='ODE 0.9.0'
PACKAGE_TARNAME='ode'
PACKAGE_VERSION='0.9.0'
PATH_SEPARATOR=':'
RANLIB=''
SET_MAKE=''
SHARED_LDFLAGS=''
SHELL='/bin/sh'
STRIP=''
TOPDIR=''
TRIMESH_FALSE=''
TRIMESH_TRUE=''
USE_SONAME_FALSE=''
USE_SONAME_TRUE=''
VERSION='0.9.0'
WIN32_FALSE=''
WIN32_TRUE=''
WINDRES=''
X11_FALSE=''
X11_TRUE=''
X86_64_SYSTEM_FALSE=''
X86_64_SYSTEM_TRUE=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
ac_ct_WINDRES=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='powerpc-apple-darwin8.11.0'
build_alias=''
build_cpu='powerpc'
build_os='darwin8.11.0'
build_vendor='apple'
datadir='${prefix}/share'
exec_prefix='NONE'
host='powerpc-apple-darwin8.11.0'
host_alias=''
host_cpu='powerpc'
host_os='darwin8.11.0'
host_vendor='apple'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/Users/henningreich/Documents/workspace/odejava_/odejava-jni/build/odejava/odejava-jni/opende/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='$(install_sh) -d'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
so_ext=''
sysconfdir='${prefix}/etc'
target='powerpc-apple-darwin8.11.0'
target_alias=''
target_cpu='powerpc'
target_os='darwin8.11.0'
target_vendor='apple'
##
##
## confdefs.h. ##
##
##
#define PACKAGE "ODE"
#define PACKAGE_BUGREPORT "ode@ode.org"
#define PACKAGE_NAME "ODE"
#define PACKAGE_STRING "ODE 0.9.0"
#define PACKAGE_TARNAME "ode"
#define PACKAGE_VERSION "0.9.0"
#define VERSION "0.9.0"
configure: exit 77
===============
At this point I decided that I reached my compiling limits and here I am! :D
A little desperate, a little frustrated ...
Long story short:
What did I do wrong in the first place?
Did I missed something with the installation?
What went wrong with the compiling of the natives for odejava-jni.jar?
Where can I get the right libodejava.jnilib native 0.3.2?
Thank you for your time!
All solutions to this problem are welcome!
H.a.n.d