v3.12 gen-libs error

Hi.

Just try to checkout branch v3.12 and generate libs gen-libs but i got error

Android NDK: WARNING: Unsupported source file extensions in /Volumes/hdd/dev/cocos2d-x-repo/tools/simulator/frameworks/runtime-src/proj.android/../../../../../cocos//scripting/js-bindings/proj.android/Android.mk for module cocos2d_js_static 
...
[armeabi] Compile++ arm  : cocos2d_lua_static <= CCLuaEngine.cpp
jni/../../Classes/ide-support/RuntimeJsImpl.cpp:222:52: error: no viable conversion from 'unordered_map<[...], JS::PersistentRootedScript *>' to 'unordered_map<[...], JSScript *>'
        std::unordered_map<std::string, JSScript*> filenameScript = ScriptingCore::getInstance()->getFileScript();
                                                   ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/hdd/opt/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/unordered_map.h:169:7: note: candidate constructor not viable: no known conversion from
      'std::unordered_map<std::string, JS::PersistentRootedScript *>' (aka 'unordered_map<basic_string<char>, PersistentRooted<JSScript *> *>') to 'const std::unordered_map<std::basic_string<char>, JSScript
      *, std::hash<string>, std::equal_to<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, JSScript *> > > &' for 1st argument
      unordered_map(const unordered_map&) = default;
      ^
/Volumes/hdd/opt/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/unordered_map.h:172:7: note: candidate constructor not viable: no known conversion from
      'std::unordered_map<std::string, JS::PersistentRootedScript *>' (aka 'unordered_map<basic_string<char>, PersistentRooted<JSScript *> *>') to 'std::unordered_map<std::basic_string<char>, JSScript *,
      std::hash<string>, std::equal_to<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, JSScript *> > > &&' for 1st argument
      unordered_map(unordered_map&&) = default;
      ^
/Volumes/hdd/opt/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/unordered_map.h:214:7: note: candidate constructor not viable: no known conversion from
      'std::unordered_map<std::string, JS::PersistentRootedScript *>' (aka 'unordered_map<basic_string<char>, PersistentRooted<JSScript *> *>') to 'initializer_list<value_type>' (aka
      'initializer_list<std::pair<const std::basic_string<char>, JSScript *> >') for 1st argument
      unordered_map(initializer_list<value_type> __l,
      ^
[armeabi] Compile++ arm  : cocos2d_lua_static <= CCLuaStack.cpp
1 error generated.
make: *** [obj/local/armeabi/objs/cocos2dlua_shared/__/__/Classes/ide-support/RuntimeJsImpl.o] Error 1
make: *** Waiting for unfinished jobs....

what should i do?

i try with ndk 10e and 12b error is the same
used commit 8b6a07feacb7252fefb97fdb432192fe636cbf0a

1 Like

I think 12b for sure not compatible, ndk10 or ndk11.

@energyy i test it also with 10e (this was works for v.3.11)

i take latest commit 233f2111b9b54954980f2f2e61d2a79198c57fa3 and looks like it is woks fine.

:question: team does it possible to modify files somewhere to disable build unnecessary modules like js / lua etc ?

@camkadev my recommendation would be don’t use right now Cocos2d-x 3.12 you will loose your time fixing all litle glitches - it’s little buggy and if you planning to use SDKBOX it doesn’t work well with it.

But off course someone should discover this bugs:) to fix them in future…

@energyy i like to use fresh things, so i ready to discover bugs :smile:

I know we also like ;D new stuff - as always hoping it fix previous bugs;) But in this case if it sproduction project with dealdine:) skip it - otherwise you are welcome to experiment:) and make our all life easier in future;)

same here.
would using 3.11.1 solve this for now ?
(I will try to check)
Nicolas

Any updates on this? Running into the same issue with Cocos2d-x 3.12 and CrystaX (10.3.2)

@Jgod i just used commit cc14a06800033d1fe7ddd46264c9dc2b58a57de4 and it is compile like before

What kind of advantages you get with CrystaX NDK? Is there any performance improvements and how save it is ti use it?

I’m still experimenting with it. Check out their site, they say it better than I can.

It’s supposed to be a drop-in replacement (meaning it “just works”) for the NDK, that takes away some of the pain that the NDK normally has. There are some limitations (doesn’t target latest Android yet, but that won’t matter unless you need those APIs).
It should make writing cross-platform C++ much easier, since so much is broken in NDK, as is.

You can do a lot of weirder stuff like running Python, Objective-C, etc. It has Boost libraries support built-in. Check out their feature list.

You use it by downloading it and changing your NDK path to point to that folder (same way you would setup NDK path to begin with).

Ok, thanks for explanation. Which archive I can use for Mac? I see there linux and debian archives not sure if one of them valid for Mac, optionally I can try install thru brew, but I would like to have archive with files instead. If you have download url for mac please point to it;)

You want the Darwin one.

32bit Mac
64bit Mac