JSB android compilation failure: unrecognized argument in option '-mtune=atom'

Hello everyone,

Trying to build for android on my Windows 10 laptop. SDK, NDK, ANT, python downloaded as per instructions. VC2013 Community is used for the win32 builds.
Win 32 compiles ok, have few griefs on how this looks and how i can change a few things, but will discuss these in another post as they are not so important …
HTML5 compiles just fine.
Android doesn’t want to compile. Always get the same error as detailed below.
does anyone have any idea why this is happening ?

C:\Users\JohnL\Documents\Cocos\CocosProjects\ANASA_final>cocos compile -m release -p android
Running command: compile
Building mode: release
Using Eclipse project : C:\Users\JohnL\Documents\Cocos\CocosProjects\ANASA_final\frameworks\runtime-src\proj.android
Android platform not specified, searching a default one...
running: '"C:\Users\JohnL\AndroidSDK\tools\android" update project -t android-10 -p C:\Users\JohnL\Documents\Cocos\CocosProjects\ANASA_final\frameworks\runtime-src\proj.android'

Updated project.properties
Updated local.properties
Updated file C:\Users\JohnL\Documents\Cocos\CocosProjects\ANASA_final\frameworks\runtime-src\proj.android\proguard-project.txt
Building native...
NDK build mode: release
NDK_TOOLCHAIN_VERSION: 4.9
running: '"C:\Users\JohnL\AndroidNDK\ndk-build" -C C:\Users\JohnL\Documents\Cocos\CocosProjects\ANASA_final\frameworks\runtime-src\proj.android -j4 NDK_MODULE_PATH=C:\CocosFrameWork\frameworks/cocos2d-x-3.8;C:\CocosFrameWork\frameworks/cocos2d-x-3.8/cocos;C:\CocosFrameWork\frameworks/cocos2d-x-3.8/external NDK_TOOLCHAIN_VERSION=4.9'

make.exe: Entering directory `C:/Users/JohnL/Documents/Cocos/CocosProjects/ANASA_final/frameworks/runtime-src/proj.android'
[armeabi] Compile++ arm  : cocos2djs_shared <= AppDelegate.cpp
[armeabi] Compile++ arm  : cocos2djs_shared <= SimpleConfigParser.cpp
[armeabi] Compile++ arm  : cocos2djs_shared <= RuntimeJsImpl.cpp
[armeabi] Compile++ arm  : cocos2djs_shared <= main.cpp
arm-linux-androideabi-g++: error: unrecognized argument in option '-mtune=atom'
arm-linux-androideabi-g++: note: valid arguments to '-mtune=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a8 cortex-a9 cortex-m0 cortex-m0plus cortex-m1 cortex-m3 cortex-m4 cortex-r4 cortex-r4f cortex-r5 cortex-r7 ep9312 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xscale
arm-linux-androideabi-g++: error: unrecognized command line option '-msse3'
arm-linux-androideabi-g++: error: unrecognized command line option '-mfpmath=sse'
arm-linux-androideabi-g++: error: unrecognized argument in option '-mtune=atom'
arm-linux-androideabi-g++: note: valid arguments to '-mtune=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a8 cortex-a9 cortex-m0 cortex-m0plus cortex-m1 cortex-m3 cortex-m4 cortex-r4 cortex-r4f cortex-r5 cortex-r7 ep9312 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xscale
arm-linux-androideabi-g++: error: unrecognized argument in option '-mtune=atom'
arm-linux-androideabi-g++: note: valid arguments to '-mtune=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a8 cortex-a9 cortex-m0 cortex-m0plus cortex-m1 cortex-m3 cortex-m4 cortex-r4 cortex-r4f cortex-r5 cortex-r7 ep9312 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xscale
make.exe: *** [obj/arm-linux-androideabi-g++: error: unrecognized argument in option '-mtune=atom'
loarm-linux-androideabi-g++: note: valid arguments to '-mtune=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a8 cortex-a9 cortex-m0 cortex-m0plus cortex-m1 cortex-m3 cortex-m4 cortex-r4 cortex-r4f cortex-r5 cortex-r7 ep9312 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xscale
cal/armeabi/objs/cocarm-linux-androideabi-g++: error: unrecognized command line option '-msse3'
osarm-linux-androideabi-g++: error: unrecognized command line option '-mfpmath=sse'
2djs_shared/__/__/Classes/ide-support/SimpleConfigParser.o] Error 1
make.exe: *** Waiting for unfinished jobs....
make.exe: *** [obj/local/armeabi/objs/cocos2djs_shared/hellojavascript/main.o] Error 1
arm-linux-androideabi-g++: error: unrecognized command line option '-msse3'
arm-linux-androideabi-g++: error: unrecognized command line option '-msse3'
arm-linux-androideabi-g++: error: unrecognized command line option '-mfpmath=sse'
arm-linux-androideabi-g++: error: unrecognized command line option '-mfpmath=sse'
make.exe: *** [obj/local/armeabi/objs/cocos2djs_shared/__/__/Classes/AppDelegate.o] Error 1
make.exe: *** [obj/local/armeabi/objs/cocos2djs_shared/__/__/Classes/ide-support/RuntimeJsImpl.o] Error 1
make.exe: Leaving directory `C:/Users/JohnL/Documents/Cocos/CocosProjects/ANASA_final/frameworks/runtime-src/proj.android'
Error running command, return code: 2.

I tried to compile with every SDK from 10 to 22 and i always get exactly the same result.
I tried to build gen-libs and i see only win32 and armeabi being generated. Does this have something to do with the issue at hand ?

Any help is much appreciated as i am at a loss on what is going on and i have to deliver the package ASAP …

Thank you,

John

@slackmoehrle Any ideas ? I am really stuck here …
I am seeng errors all over the place…
while trying to
cocos gen-libs -m release -p android --app-abi armeabi:x86
i get:

Running command: gen-libs
running: 'C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools/cocos2d-console/bin\cocos.bat compile -s C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools/simulator -p android --ndk-mode release --app-abi armeabi:x86'

Running command: compile
Building mode: debug
Using Eclipse project : C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android
Android platform not specified, searching a default one...
running: '"C:\Users\JohnL\AndroidSDK\tools\android" update project -t android-10 -p C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android'

Updated project.properties
Updated local.properties
Updated file C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\proguard-project.txt
Android platform not specified, searching a default one...
running: '"C:\Users\JohnL\AndroidSDK\tools\android" update lib-project -p C:\CocosFrameWork\frameworks\cocos2d-x-3.8\cocos\platform\android\java -t android-10'

Updated project.properties
Updated local.properties
Updated file C:\CocosFrameWork\frameworks\cocos2d-x-3.8\cocos\platform\android\java\proguard-project.txt
Building native...
NDK build mode: release
NDK_TOOLCHAIN_VERSION: 4.9
running: '"C:\Users\JohnL\AndroidNDK\ndk-build" -C C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android -j4 APP_ABI="armeabi x86" NDK_MODULE_PATH=C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\../../../../../;C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\../../../../../cocos/;C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\../../../../../external;C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\../../../../../cocos/scripting NDK_TOOLCHAIN_VERSION=4.9'

make.exe: Entering directory `C:/CocosFrameWork/frameworks/cocos2d-x-3.8/tools/simulator/frameworks/runtime-src/proj.android'
C:/Users/JohnL/AndroidNDK/build/core/build-binary.mk:466: warning: overriding commands for target `obj/local/armeabi/objs/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
C:/Users/JohnL/AndroidNDK/build/core/build-binary.mk:466: warning: ignoring old commands for target `obj/local/armeabi/objs/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
Android NDK: WARNING: Unsupported source file extensions in C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\../../../../../cocos//scripting/js-bindings/proj.android/Android.mk for module cocos2d_js_static
Android NDK:   \
C:/Users/JohnL/AndroidNDK/build/core/build-binary.mk:466: warning: overriding commands for target `obj/local/x86/objs/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
C:/Users/JohnL/AndroidNDK/build/core/build-binary.mk:466: warning: ignoring old commands for target `obj/local/x86/objs/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
Android NDK: WARNING: Unsupported source file extensions in C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\../../../../../cocos//scripting/js-bindings/proj.android/Android.mk for module cocos2d_js_static
Android NDK:   \
[armeabi] StaticLibrary  : libluacocos2d.a
[armeabi] StaticLibrary  : libsimulator.a
[armeabi] StaticLibrary  : libjscocos2d.a
[armeabi] StaticLibrary  : libcocos2d.a
[armeabi] StaticLibrary  : liblocalstorage.a
[armeabi] StaticLibrary  : libcocostudio.a
[armeabi] StaticLibrary  : libcocosbuilder.a
[armeabi] StaticLibrary  : libcocos3d.a
[armeabi] StaticLibrary  : libspine.a
[armeabi] StaticLibrary  : libui.a
[armeabi] StaticLibrary  : libcocosdenshion.a
[armeabi] StaticLibrary  : flatbuffers.a
[armeabi] StaticLibrary  : libextension.a
[armeabi] StaticLibrary  : libaudioengine.a
[armeabi] StaticLibrary  : libbox2d.a
[armeabi] StaticLibrary  : libnetwork.a
[armeabi] StaticLibrary  : libcocos2dxinternal.a
[armeabi] StaticLibrary  : librecast.a
[armeabi] StaticLibrary  : libbullet.a
[armeabi] StaticLibrary  : libluacocos2dandroid.a
[armeabi] StaticLibrary  : libjscocos2dandroid.a
[armeabi] StaticLibrary  : libcocos2dandroid.a
[armeabi] StaticLibrary  : libcpufeatures.a
[x86] StaticLibrary  : libluacocos2d.a
[x86] StaticLibrary  : libsimulator.a
[x86] StaticLibrary  : libjscocos2d.a
[x86] StaticLibrary  : libcocos2d.a
[x86] StaticLibrary  : liblocalstorage.a
[x86] StaticLibrary  : libcocostudio.a
[x86] StaticLibrary  : libcocosbuilder.a
[x86] StaticLibrary  : libcocos3d.a
[x86] StaticLibrary  : libspine.a
[x86] StaticLibrary  : libui.a
[x86] StaticLibrary  : libcocosdenshion.a
[x86] StaticLibrary  : flatbuffers.a
[x86] StaticLibrary  : libextension.a
[x86] StaticLibrary  : libaudioengine.a
[x86] StaticLibrary  : libbox2d.a
[x86] StaticLibrary  : libnetwork.a
[x86] StaticLibrary  : libcocos2dxinternal.a
[x86] StaticLibrary  : librecast.a
[x86] StaticLibrary  : libbullet.a
[x86] StaticLibrary  : libluacocos2dandroid.a
[x86] StaticLibrary  : libjscocos2dandroid.a
[x86] StaticLibrary  : libcocos2dandroid.a
[x86] StaticLibrary  : libcpufeatures.a
[x86] SharedLibrary  : libcocos2dlua.so
[armeabi] SharedLibrary  : libcocos2dlua.so
[x86] Install        : libcocos2dlua.so => libs/x86/libcocos2dlua.so
[armeabi] Install        : libcocos2dlua.so => libs/armeabi/libcocos2dlua.so
make.exe: Leaving directory `C:/CocosFrameWork/frameworks/cocos2d-x-3.8/tools/simulator/frameworks/runtime-src/proj.android'
Building apk...
running: '"C:\CocosFrameWork\tools\ant\bin\ant" clean debug -f C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir="C:\Users\JohnL\AndroidSDK\"'

Buildfile: C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\build.xml

BUILD FAILED
C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\build.xml:81: Cannot find C:\Users\JohnL\AndroidSDK"\tools\ant\build.xml imported from C:\CocosFrameWork\frameworks\cocos2d-x-3.8\tools\simulator\frameworks\runtime-src\proj.android\build.xml

Total time: 0 seconds
Error running command, return code: 1.
Error running command, return code: 14.

when trying to build an apk with only x86 code with the command:

cocos compile -m release -p android --app-abi x86

i get a long list of compilation messages which seem to be normal but end up to the question

Please input the absolute/relative path of '.keystore' file:

At which point i don’t know what to do …
Shouldn’t the tools know the location of .keysotre ?

Just to be sure, you are using the pre-built libraries or from source? Or were you using the cocos gen-libs to test the Android compilation out?

I created this project with cocos studio
and am running as per the documentation these commands inside my project directory.

I thought that maybe for some reason the standard libraries where not pre built so i run the gen-libs command.
that didn’t go ok though as you have seen …

What about downloading the Cocos Framework directly?

http://cocos2d-x.org/download

You mean the cocos2d-x-3.8.1.zip from the downloads ?

I mean this: http://www.cocos2d-x.org/filedown/CocosForMacWithFramework-v2.3.2.3.dmg

or this: http://www.cocos2d-x.org/filedown/CocosForWinWithFramework-v2.3.2.3.exe

this is what i have downloaded in the first place
in my C: harddrive i have

C:\CocosFrameWork

Ok this seems to be a Cocos Studio issue.

I spent the past 10 hours recreating the whole game without using Cocos Studio, a daunting task at such a late stage of the project, and apparently it seems that there is no issue compiling it.

I have not downloaded anything new, nor changed any version or anything in my code. I merely created a new project via command line and started porting everything from the old to the new project.

Haven’t finished yet, It will take a LOT of time, but so far it compiles without a problem …

I must stress that this is NOT GOOD.

If cocos studio has issues / is not yet ready for prime time DO NOT advertise it / offer it for download. This is definitelly not production ready / stable software. Put it aside and relaunch when it is ready / stable / debugged etc.

These things can cost dearly. I just lost a deadline over this and neither me or my customer is happy…

I hear what you are saying. Thank you for the feedback. CocosStudio is definitely under active development.

But I have to ask, so I understand the workflow. So you made a project in Cocos Studio and never compiled it before you needed to submit to your customer? Otherwise, wouldn’t you have know long before the deadline of the issues? Or was it working and something broke after an update?

The project was created with Cocos Studio. I created several scenes inside there.
I made all my tests in the simulator and exported to web and to win32.
Everything was working there with no issues and since the simulator has a device mode that targets specific devices and that showed absolutely no problems, i only exported to android once in the very beginning of the project.
At that point the compilation was successful and everything worked as expected.

Now that i finished the whole project i went on to compile everything native (iOS and Android) and it didn’t work.
The Android had the above stated issues that were overcome only when i created a new project and ditched all Cocos Studio made things and iOS would complain that it couldn’t find the cocos static libraries that were expected in a wrong directory. That was trivial to correct, i only had to remove and reattach them to the project. And another option (bitcode?) was also wrong and had to change it…

The whole experience using the JSB is frustrating. I had used Cocos2D-iphone when it was first created and up to the early 1.x versions and was very happy with it. I decided to use Cocos in this project so as to re familiarize my self in preparation for upcoming projects.

The problems i see:

  • The documentation is not very helpful. There are many articles about every topic most of which are outdated and the rest cover only the extremely basics.
  • There is no usable visual editor.
  • Creating a multiple assets project that will use them according to the native resolution is a pain. This should be automated.

Cocos is a very mature and strong engine, but compared to other engines that “just work” and have plenty of support, tutorials and documentation it is lacking. Since it is mostly feature complete why not concentrating in improving the documentation and creating and maintaining advanced tutorials that illustrate solutions to the issues we face every time? I would happily pay a reasonable fee for them and some support even in the form of skype or teamviewer sessions. I would happily pay a reasonable fee for Cocos Studio IF it was extensive, finished and well maintained. And i wouldn’t mind if it was per project or yearly as long as it was reasonable.

This engine is used by thousands but my belief is that all these issues pose a significant barrier to entry of newer / inexperienced game developers …

Just my two cents and only in the spirit of honest feedback, never ment to be hostile or anything.

Thank you for the honesty. Let me read this again tomorrow and provide more thoughts. @slackmoehrle