How to speed up cocos2d-x build with prebuilt lib

Have you managed to solve this? I have the same problem …

ld: warning: ignoring file /path/cocos2d-x-3.14/prebuilt/ios/libcocos2d iOS.a, missing required architecture arm64 in file /path/cocos2d-x-3.14/prebuilt/ios/libcocos2d iOS.a (2 slices)

using prebuild libs “spine” is not working. it was working fine before that.

what version of Cocos2d-x? From .zip on our website or GitHub repo?

coco2d-x 3.14.1. From Website

ok, I think if you use the v3 branch from GitHub this is fixed.

You would need to clone, submodule update, download-deps, re-compile pre-builts. I am in the process of writing docs to help with using pre-builts better and working through issues like what you are having. So let us work together to solve.

sure, i will do this.
make sure you document Android part very detailed as iOS is simple and easy to setup. But i am stuck in android studio setup :frowning:
i am following this Guide but having some issues that i mentioned in comments there.

Yup, the new doc is a lot better. Running Android on OS Xis done. It is currently sitting in a PR waiting for me to finish the Windows OS. I should be able to get to it this week and push changes to production. I have been trying to move our docs to a new platform.

1 Like

i cloned, download-deps, submodule. but when i tried to build libs i got this strange error i never encountered before.

I Get it. Its a known Bug and under working.
So i think reverting back to android SDK tools to version 25.2.3 will fix this for now. Right?

@slackmoehrle

i did all this, and used this command to build libs : cocos gen-libs -p ios --app-abi armeabi:x86_64 -m debug
is solved the sipn file not found. but giving me these 201 errors

on iOS, I am not sure you need the –app-abi switch. My understanding is that is an Android only thing. Perhaps I am wrong, but I have never used it and I deploy to the App Store all the time.

@slackmoehrle
I re compiled libs using cocos gen-libs -p ios -m debug.
and still geting “missing required architecture arm64” warning as above mentioned. on iPhone6+. On iphone 5 simulator when i try to build it says “missing required architecture i386”

sorry, I am confused. I am reading your posts where you talk about Android and then iOS. Let’s back up.

So you are on 3.14.1, OS X, XCode and trying to compile the pre-built libraries. This should work. I just did this earlier this morning.

git clone <our repo>
cd where-ever-you-cloned-the-repo
git submodule update --init
git submodule update
./download-deps.py
./setup.py (skip Android pieces by hitting return if you don't need it)
source ~/.bash_profile
which cocos (to verify you get something back)
cocos -v (to verify versions, in case you have more than one on the system)
cocos gen-libs -m release -p ios

i was doing both android and ios.

i did ios step just as you wrote above. only thing i did different i download-deps.py before submodule.
other than that everything is same.
cocos gen-libs -p ios -m debug
this is the command i used for libs

you need to submodule before download-debs is my understanding.

Can you show me how cocos gen-libs ... ends? When you compile from your terminal it should give a result at the end or an error.

Also, does -m release produce the same error?

In xcode, if you try to run emulator toolchain (x86) while you compiled librarirs only for devices (arm) you’ll get “missing required architecture i386”. And vice versa.
You didn’t followed my tutorial right, did you? :wink:
You run too fast. It can take up to a week to set up all environmenst correctly…

yes did submodule before download-debs
and used -m relased.
solved the problem
Thanks you for that :slight_smile:

@crittergorge
i am following your tutorial. i am stuck in setep 18-24.
so i decided to do iOS part first which is working now.
i will continue on android and will aks you guys if i encounter any issue.

Thanks :slight_smile:

@aqeeliqbal a good rule of thumb. When developing, go slow and understand each step involved. If you don’t ask. This is what we are here for! Errors in understanding mean you spend more time debugging and taking stabs in the dark. Then your game gets delayed or you never finish it. :slight_smile:

1 Like

-m debug should work also. I’d try it again to see what happens. I’ll test it too later today when I can afford a hour of compile time.

yes, it’s better to start with ios, android is worse.
to be more clear, if you are building in debug mode, point 7 of the guide solves the issue, that is, you have to open cocos2dx xcode master project and set build only for active architecture to no in debug mode. Then check the library as in point 8 for good.
hope it helps.

1 Like