Newton on Android NDK (ARM-NEON)

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Newton on Android NDK (ARM-NEON)

Postby Krystian » Mon Sep 19, 2011 11:58 am

What NDK version are you using? I've tested it with r5c and r6b (you can - and IMO you should - use always latest NDK, even when building for older API, but of course you cannot use new libraries which are available on newer APIs).

Only one reason would be inconsistent "#ifdef ANDROID" vs. "#ifdef __ANDROID__" (coreLibrary_200/source/core/dgTypes.cpp) - readmore
So try to find #ifdef ANDROID (in dgTypes.cpp after patching) and change it to #ifdef __ANDROID__

It this will help, I'll change that #ifdef in patch to #if (defined(ANDROID) || defined(__ANDROID__). Waiting for your reply (also with info what version of NDK you are using).

Edit: It looks like __ANDOIRD__ should be used. readmore
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: Newton on Android NDK (ARM-NEON)

Postby syl » Mon Sep 19, 2011 12:19 pm

I think you should wipe this
Code: Select all
-D_LINUX_VER -D_LINUX_VER_64

i use
Code: Select all
LOCAL_CFLAGS := -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -D_SCALAR_ARITHMETIC_ONLY
LOCAL_CFLAGS += -DANDROID_NDK

see http://newtondynamics.com/wiki/index.ph ... 0_Tutorial
syl
 
Posts: 7
Joined: Sat Sep 03, 2011 9:45 am

Re: Newton on Android NDK (ARM-NEON)

Postby Krystian » Mon Sep 19, 2011 1:25 pm

I've updated patch http://code.google.com/p/newton-dynamic ... tail?id=16 (you should be of course using latest sources of NGD from SVN)
Definition of _LINUX_VER_64 is not needed if you patched dgTypes.cpp.
Also you should use latest NDK (for now it's r6b).
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: Newton on Android NDK (ARM-NEON)

Postby pHySiQuE » Mon Sep 19, 2011 2:25 pm

I am using Newton 2.33, found here:
http://code.google.com/p/newton-dynamics/downloads/list

I would rather not deviate from the official source code. I do not want to add unofficial patches. dgTypes.cpp doesn't even have any mention of ANDROID in it, so I don't know where your patch is supposed to go.

I tried adding _LINUX_VER and _LINUX_VER_64 to LOCAL_CFLAGS, and it's still complaining about the _m128 thing.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Newton on Android NDK (ARM-NEON)

Postby syl » Mon Sep 19, 2011 3:05 pm

Hey, of course that dgTypes.cpp doesn't even have any mention of ANDROID in it, because Newton never had any official support for Android (and will never i think, so it's up to you to make some effort).
Please read about how to use patch.exe with cygwin, or with tortoise. That's the deal with opensource, you have to make :roll:
syl
 
Posts: 7
Joined: Sat Sep 03, 2011 9:45 am

Re: Newton on Android NDK (ARM-NEON)

Postby pHySiQuE » Mon Sep 19, 2011 3:15 pm

Any idea when it will be officially supported for Android? I don't want to branch off with my own version of the source and then have to redo all my changes when the official source gets updated.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Newton on Android NDK (ARM-NEON)

Postby Krystian » Mon Sep 19, 2011 5:15 pm

If you use version from SVN and apply this you will be able to revet changes from this patch with just 3-4 mouse clicks (in case of W.) ;)
And if this patch will be applied by Julio to NGD, then after you make 'SVN Update' that changes will be merged pain-less.

"I don't know where your patch is supposed to go."
If you want I can make a screencast.
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: Newton on Android NDK (ARM-NEON)

Postby pHySiQuE » Mon Sep 19, 2011 6:19 pm

Thank you. I will make sure I can get it working on iOS and Mac first, and then use this patch for Android if those work also.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Newton on Android NDK (ARM-NEON)

Postby pHySiQuE » Tue Sep 20, 2011 11:42 am

Now my project all compiles, but at the very last step, after about 300 files compile for 20 minutes, I get this error:
Argument list too long

WTH? :evil:
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Newton on Android NDK (ARM-NEON)

Postby Julio Jerez » Wed Sep 21, 2011 5:55 pm

300 hundred files? the engine is only 68 files.
Julio Jerez
Moderator
Moderator
 
Posts: 12480
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton on Android NDK (ARM-NEON)

Postby pHySiQuE » Wed Sep 21, 2011 9:07 pm

I am trying to compile Newton into my game, not build it as a static library.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron