[Cs-dev] Android and LuaJit
Date | 2013-06-12 23:07 |
From | Steven Yi |
Subject | [Cs-dev] Android and LuaJit |
Hi Michael and All, I tried following the build instructions for LuaJit and I'm getting problems. Using the environment variable from the instructions, I get this if building from luajit head: Steven-Yis-MacBook-Pro:libluajit stevenyi$ source ~/.profile Steven-Yis-MacBook-Pro:libluajit stevenyi$ make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF $NDKARCH" TARGET_SYS=linux ==== Building LuaJIT 2.0.2 ==== make -C src cc1: error: unrecognized command line option "-mfloat-abi=softfp" lj_arch.h:0: error: bad value (armv7-a) for -march= switch lj_arch.h:0: error: bad value (armv7-a) for -mtune= switch cc1: error: unrecognized command line option "-mfloat-abi=softfp" lj_arch.h:0: error: bad value (armv7-a) for -march= switch lj_arch.h:0: error: bad value (armv7-a) for -mtune= switch cc1: error: unrecognized command line option "-mfloat-abi=softfp" lj_arch.h:0: error: bad value (armv7-a) for -march= switch lj_arch.h:0: error: bad value (armv7-a) for -mtune= switch cc1: error: unrecognized command line option "-mfloat-abi=softfp" lj_arch.h:0: error: bad value (armv7-a) for -march= switch lj_arch.h:0: error: bad value (armv7-a) for -mtune= switch cc1: error: unrecognized command line option "-mfloat-abi=softfp" lj_arch.h:0: error: bad value (armv7-a) for -march= switch lj_arch.h:0: error: bad value (armv7-a) for -mtune= switch cc1: error: unrecognized command line option "-mfloat-abi=softfp" lj_arch.h:0: error: bad value (armv7-a) for -march= switch lj_arch.h:0: error: bad value (armv7-a) for -mtune= switch Makefile:230: *** Unsupported target architecture. Stop. make: *** [default] Error 2 Steven-Yis-MacBook-Pro:libluajit stevenyi$ If I comment out NDKARCH in my environment variables, I get compilation errors. Also, luajit does not seem to have a jni folder, and LuaCsound refers to ../../../luajit-2.0, while the shared lib reference is for just "libluajit". I don't see any jni folder for Android related files for building the library. Any advice? Thanks, steven ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-12 23:35 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android and LuaJit |
Attachments | None None |
Hi, sorry to hear of more problems. I'm not sure what the problem is, so all I can do is detail my setup. I'm using the NDK for Windows 32 bit, version r8e.
NDK -- new@sorabji /d/android/android-ndk-r8e/platforms $ ls -ll total 0 drwxr-xr-x 5 new Administrators 0 May 18 06:45 android-14
drwxr-xr-x 3 new Administrators 0 May 18 06:45 android-3 drwxr-xr-x 3 new Administrators 0 May 18 06:45 android-4 drwxr-xr-x 3 new Administrators 0 May 18 06:45 android-5 drwxr-xr-x 3 new Administrators 0 May 18 06:45 android-8
drwxr-xr-x 5 new Administrators 0 May 18 06:45 android-9 In your build shell, check that the environment variables are correct for your NDK setup. I have: export NDKABI=9 export NDKVER=$NDK/toolchains/arm-linux-androideabi-4.7 export NDKP=$NDKVER/prebuilt/windows/bin/arm-linux-androideabi- export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
export NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8" Obviously, the ndk-build command uses these build up the actual correct make commands for the architecture, abi, and chosen toolchain (gcc 4.7 in my case, perhaps you are using an earlier one).
SDK -- new@sorabji /d/android/adt-bundle-windows-x86-20130514/sdk/platforms $ ls -ll total 12 drwxr-xr-x 6 new Administrators 4096 May 26 13:08 android-10
drwxr-xr-x 7 new Administrators 4096 May 31 18:58 android-11 drwxr-xr-x 5 new Administrators 4096 May 17 20:52 android-17 The luajit library is not built with the NDK but just with gcc and GNU make. This is according to Mike Pall's specific instructions. That is why there is no jni dir. I thought that was clear from my instructions, so I'll make them clearer.
In Eclipse, I have: project-properties -- # Project target. target=android-10
I think this is supposed to match one of the ADT bundle platform directories. And also: CSDPlayer's AndroidManifest.mf -- <uses-sdk android:minSdkVersion="10"/> If these all match your environment and you're still having problems, then look for a typo... if there is no typo, perhaps we can do a remote desktop connection or desktop sharing and see what the problem is.
Hope this helps, Mike Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Jun 12, 2013 at 6:07 PM, Steven Yi <stevenyi@gmail.com> wrote: Hi Michael and All, |
Date | 2013-06-12 23:46 |
From | Steven Yi |
Subject | Re: [Cs-dev] Android and LuaJit |
Hi Michael, The building part I'll keep looking at, but the LuaCsound/jni/Android.mk is still suspect. It has: $(LOCAL_PATH)../../../luajit-2.0/src $(LOCAL_PATH)../../../luajit-2.0/src/libluajit.a LOCAL_STATIC_LIBRARIES += libluajit Could you modify these paths to reference NDK_MODULE_PATH, to match the other plugins' builds? I'll be back on looking at android in a moment, about to upload a universal binary for OSX. Thanks! steven On Wed, Jun 12, 2013 at 6:35 PM, Michael Gogins |
Date | 2013-06-12 23:50 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android and LuaJit |
Attachments | None None |
I'll try your suggestion. I had to change to static linkage because the LuaJIT build system, which I DON'T want to mess with, embeds a versioned soname that Android won't handle.
Best, Mike Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Jun 12, 2013 at 6:46 PM, Steven Yi <stevenyi@gmail.com> wrote: Hi Michael, |
Date | 2013-06-12 23:55 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android and LuaJit |
Attachments | None None |
OK, I fixed that and pushed it. Best Mike Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Jun 12, 2013 at 6:50 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-13 02:52 |
From | Steven Yi |
Subject | Re: [Cs-dev] Android and LuaJit |
Thanks Michael, I saw one place that needed updating (about to commit that). I just managed to get luajit compiled (yay! turned out one of the variables wasn't set correctly). LuaCsound also just built. I think everything is now set. I'm going to work on the release script now. Hope to have RC3 for Android up soon. Thanks! steven On Wed, Jun 12, 2013 at 6:55 PM, Michael Gogins |
Date | 2013-06-13 02:55 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android and LuaJit |
Attachments | None None |
Glad to hear it, On Jun 12, 2013 9:53 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Thanks Michael, |