Prebuilt libraries setup the definitive guide and game project kickstart for cocos2d-x 3.13.1

ran this command : cocos gen-libs -m release -c -p ios

got this error

** BUILD FAILED **

The following build commands failed:
CompileC build/cocos2d_libs.build/Release-iphonesimulator/libcocos2d\ iOS.build/Objects-normal/i386/DetourPathQueue.o /Volumes/DATA/cocos2d-x/cocos2d-x/external/recast/DetourCrowd/DetourPathQueue.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error running command, return code: 65.

my system :
Mac OSX 10.13.3
cocos2d-x-3.17
Cocos Console 2.3
xCode 9.2

Any help?

It works for me, using the v3 branch.

It used to work for me as well. I changed my mac and need to reinstall cocos setup.
one thing i observed is that on my new mac i installed python 3 few days ago. Now when i ran library build command it prompted an error that python2 in not install. then i installed python 2.7 as well. Now i have both python3 and python2, i wonder if it has something to do with this error?

It probably does. Which is default when you do python —version?

its Python 2.7.14

I’d double check your setup, something is out of place. Tell me how yo obtained Cocos2d-x. .zip from our website or cloning our GitHub repo? What steps have you done so far?

1 Like

I cloned it.

git clone <our repo>
cd <where ever you cloned the repo>
git submodule update --init
git submodule update
./download-deps.py
./setup.py 
source ~/.bash_profile

i followed these steps

ok, those are my instructions. Everything should work.

Can you try the steps again and post your output for me. Let’s get you up and running.

yup i follow your instructions since i was able to successfully build libs with your instructions :slightly_smiling_face:

I get error on this command

./download-deps.py

try again, sometimes this step gives errors and then works. Let me know if it still fails.

tried it several times
getting errors again and again :frowning:

Aqeels-MacBook-Pro:cocos2d-x aqeeliqbal$ git submodule update --init
Aqeels-MacBook-Pro:cocos2d-x aqeeliqbal$ git submodule update
Aqeels-MacBook-Pro:cocos2d-x aqeeliqbal$ ./download-deps.py
=======================================================
==> Prepare to download external libraries!
==> version file doesn't exist
==> Ready to download 'v3-deps-142.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-142.zip'
Traceback (most recent call last):
  File "./download-deps.py", line 341, in <module>
    main()
  File "./download-deps.py", line 336, in main
    installer.run(workpath, external_path, opts.remove_downloaded, opts.force_update, opts.download_only)
  File "./download-deps.py", line 271, in run
    self.download_zip_file()
  File "./download-deps.py", line 228, in download_zip_file
    self.download_file()
  File "./download-deps.py", line 117, in download_file
    u = urllib2.urlopen(self._url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_sAAqAqAqAAAAAAAqAqAqAAAAAAAAAAAqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqAAAAAAAAAAAAAAAAAAqeels-MacBook-Pro:cocos2d-x aqeeliqbal$ ./download-deps.py
=======================================================
==> Prepare to download external libraries!
==> version file doesn't exist
==> Ready to download 'v3-deps-142.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-142.zip'
Traceback (most recent call last):
  File "./download-deps.py", line 341, in <module>
    main()
  File "./download-deps.py", line 336, in main
    installer.run(workpath, external_path, opts.remove_downloaded, opts.force_update, opts.download_only)
  File "./download-deps.py", line 271, in run
    self.download_zip_file()
  File "./download-deps.py", line 228, in download_zip_file
    self.download_file()
  File "./download-deps.py", line 117, in download_file
    u = urllib2.urlopen(self._url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)>
Aqeels-MacBook-Pro:cocos2d-x aqeeliqbal$ ./download-deps.py
=======================================================
==> Prepare to download external libraries!
==> version file doesn't exist
==> Ready to download 'v3-deps-142.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-142.zip'
Traceback (most recent call last):
  File "./download-deps.py", line 341, in <module>
    main()
  File "./download-deps.py", line 336, in main
    installer.run(workpath, external_path, opts.remove_downloaded, opts.force_update, opts.download_only)
  File "./download-deps.py", line 271, in run
    self.download_zip_file()
  File "./download-deps.py", line 228, in download_zip_file
    self.download_file()
  File "./download-deps.py", line 117, in download_file
    u = urllib2.urlopen(self._url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)>

You can wget this URL. When extracting be careful because the directory name is different. The contents of the .zip must do in the external directory.

1 Like

its working now.
Successfully built lib-cpp iOS

Thank you very much

1 Like

@aqeeliqbal You are welcome. I hope you enjoy writing your games. Please share with us when you have something playable.

1 Like

yes i love games therefore i love making game :slight_smile:
most of the game i create are cocosd2d-x based.
i love my app for kids : https://itunes.apple.com/us/app/kindergarten-prep/id985078379?mt=8 done in cocos2d-x and upcoming version include tensorflow for Nural networks and artificial intelligence.
these are my stores links :
https://play.google.com/store/apps/developer?id=Play+Gameba&hl=en
https://play.google.com/store/apps/developer?id=Free+birds

Can you share technical details about how you are using NN and AI in your app? How did you train? Are you using GPU’s to train?

No, we train the model on laptop using python and tensorflow. Then we used that model in our app. currently its working on iOS only. we were able to successfully integrate everything using c++ and ios wrappers for iOS, but haven’t been able to run it on android yet.

1 Like