Native Bullet building on ARMV6

I have downloaded JMonkey source code. Code builds successfuly on my Ubuntu machine.

I used the target ant build-bullet-natives - to build bullet natively - I have tested the native bullet both by using the ant target as well as my application, it is working well.

I noticed that this file was created after the build (as they have the time of the build )

engine/lib/bullet/jME3-bullet-natives.jar
engine/lib/bullet/jarcontent/native/linux/libbulletjme.so

I wanted to build the bullet natively on a Raspberry Pi running Raspian Wheezy.

I copied the source folder to raspberry Pi. D

After ant clean

When I run ant build-bullet-natives I get the error

cc1plus: error: unrecognized command line option “-m32”

I tried commenting out the compiler attribute in
inside /nbproject/build-bullet-natives.xml

but it gives a different error. Can some one help me out with the correct compiler flags to get this built.

However

I compiled bullet inside the bullet-2.80-rev2531 just to check whether it compiles - it compiles with our error.

The command used are these

cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC"
-DBUILD_EXTRAS=off -DBUILD_DEMOS=off -DCMAKE_BUILD_TYPE=Release
make

After commenting the -m32 attribute and clearing the cache file inside bullet-2.80 source folder, I was able to compile.

New libbulletjme.so and jME3-bullet-natives.jar were created.

With these jars, when executing my JMonkey code, I get the following exception thrown.

Exception in thread “main” java.lang.UnsatisfiedLinkError: /home/pi/jogamp/libbulletjme.so: /home/pi/jogamp/libbulletjme.so: cannot open shared object file: No such file or directory (Possible cause: can’t load IA 32-bit .so on a ARM-bit platform)

However this file is present in the folder.

Edit: Commented out all the reference to -m32 in jmonkeyengine/engine/nbproject/build-bullet-natives.xml

And did a clean build. This time it produced the arm binary.