Results 1 to 4 of 4

Thread: The RTPhysics sample doesn't compile for Android (sdk android-17, android-ndk-r9d)

  1. #1

    Default The RTPhysics sample doesn't compile for Android (sdk android-17, android-ndk-r9d)

    The RTPhysics sample doesn't compile for Android (sdk android-17, android-ndk-r9d)

    Hi.

    I have downloaded the lastest proton-sdk from svn://rtsoft.com/rtsvn/proton and try to compile for Android.
    The RTSimpleApp sample compiles fine for Android.

    The RTPhysics sample doesn't compile for Android.
    It gives me these errors:
    1)
    [armeabi] Compile++ arm : RTPhysics <= CRandom.cpp
    jni/../../../shared/android/AndroidUtils.cpp: In function 'char* GetAndroidMainC
    lassName()':
    jni/../../../shared/android/AndroidUtils.cpp:142:32: error: format not a string
    literal and no format arguments [-Werror=format-security]
    [armeabi] Compile++ arm : RTPhysics <= GLESUtils.cpp
    cc1plus.exe: some warnings being treated as errors
    make.exe: *** [obj/local/armeabi/objs/RTPhysics/__/__/__/shared/android/AndroidU
    tils.o] Error 1

    I resolve it changing:
    sprintf(name, package.c_str());
    with:
    strcpy(name, package.c_str());
    in shared/android/AndroidUtils.cpp

    2)
    make (e=87): the parameter is incorrect.
    make.exe: *** [obj/local/armeabi/libRTPhysics.so] Error 87
    make.exe: *** Waiting for unfinished jobs....

    I resolve it changing:
    $(BULLET)/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btDbvt.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btDispatcher.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp \
    $(BULLET)/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btCollisionObject.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btCollisionWorld.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btGhostObject.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btManifoldResult.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/btUnionFind.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btBoxShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btBox2dShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btCapsuleShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btCollisionShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btCompoundShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConcaveShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConeShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConvexHullShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConvexInternalShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConvexShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConvex2dShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btCylinderShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btEmptyShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btMultiSphereShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btOptimizedBvh.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btShapeHull.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btSphereShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTetrahedronShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTriangleBuffer.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTriangleCallback.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTriangleMesh.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/btUniformScalingShape.cpp \
    with:
    $(BULLET)/BulletCollision/BroadphaseCollision/UnityBuild_BroadphaseCollision.cpp \
    $(BULLET)/BulletCollision/CollisionDispatch/UnityBuild_CollisionDispatch.cpp \
    $(BULLET)/BulletCollision/CollisionShapes/UnityBuild_CollisionShapes.cpp \
    in Android.mk putting together those .cpps

    3)
    c:/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-pp:1330: error: undefined reference to 'RenderScissorComponent::RenderScissorComponent()'
    collect2: ld returned 1 exit status
    make.exe: *** [obj/local/armeabi/libRTPhysics.so] Error 1

    I resolve it adding
    $(COMPPATH)/RenderScissorComponent.cpp\
    in Android.mk

    Finally I get libRTPhysics.so:
    [armeabi] Install : libRTPhysics.so => libs/armeabi/libRTPhysics.so
    [armeabi-v7a] Install : libRTPhysics.so => libs/armeabi-v7a/libRTPhysics.so

    4)
    [aapt] proton\RTPhysics\android\bin\AndroidManifest.xml:2 : error: No resource identifier found for attribute 'installLocation' in package 'android'
    BUILD FAILED
    c:\android-sdk\tools\ant\build.xml:653: The following error occurred while executing this line:
    c:\android-sdk\tools\ant\build.xml:698: null returned: 1

    I can't resolve it. Some ideas?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Sorry for the hassle, I haven't compiled that one in a while.

    I think I did some small changes to most of the examples to fix issue with the latest Ant/Android NDK but didn't apply those to the RTPhysics example.

    To fix, maybe copy the build.xml from another project (RTSimpleApp/android) to RTPhysics/android and then edit the top of it?

    If you want to look at the exact changes that were made, check commit 1227 and 1228.

    I'm stopping short of promising to fix it soon (or maybe I'll remove that example.. I ended up not using Bullet in anything afterall) but that is my general plan...
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Ok, it actually required a lot more work to convert everything to the latest build system that Proton uses.

    The good news is I went and updated it, I got it to build and run on my device!

    I did sort of a wacked out Unity build for Bullet but .. I blame bullet, they use the same var names for different data structures making unity builds trickier to do all in one file, however you did it was probably cleaner...

    So update from SVN to get the changes, hopefully it will run for you.
    Seth A. Robinson
    Robinson Technologies

  4. #4

    Thumbs up It works fine now

    Quote Originally Posted by Seth View Post
    Ok, it actually required a lot more work to convert everything to the latest build system that Proton uses.

    The good news is I went and updated it, I got it to build and run on my device!

    I did sort of a wacked out Unity build for Bullet but .. I blame bullet, they use the same var names for different data structures making unity builds trickier to do all in one file, however you did it was probably cleaner...

    So update from SVN to get the changes, hopefully it will run for you.
    Hi Seth, now it works fine.


    Thank u and, please, do not remove RTPhysics sample

Similar Threads

  1. error compile for android build.xml
    By nabouill in forum Proton SDK
    Replies: 1
    Last Post: 11-20-2013, 09:19 PM
  2. Error compiling rtphysics for android
    By darkchazz in forum Proton SDK
    Replies: 4
    Last Post: 08-03-2013, 12:05 AM
  3. RTPhysics android compile problem
    By youngvleo in forum Proton SDK
    Replies: 2
    Last Post: 11-20-2012, 02:56 AM
  4. Need help on windows android compile
    By youngvleo in forum Proton SDK
    Replies: 1
    Last Post: 10-07-2012, 10:07 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •