Cannot compile project version 3.11.1 ubuntu 16.04

starting a new thread means creating another post?
I’m think cocos2d doesn’t use mesa-drivers, hence it is installed, cocos2d uses opengl.
I also run - sudo apt-get update, sudo apt-get upgrade so gcc and python etc are updated.

what is the output of:

python --version

gcc -v

which cocos

uname -a

please follow the doc exactly. you don’t need ./install-linux-deps anymore if you do. Perhaps try a clean virtual machine too.

You tested cocos2d 3.11.1 on ubuntu 32 bit, right?
Which version of cocos should i try? 3.11.1 or git clone latest cocos?

3.11.1 I did but I don’t know after that.

Why can’t you use 64-bit Linux? Not many OS developers are supporting 32 but much anymore. Apple is even dropping support for 32-not apps now.

Because my real aim is to run cocos on armbian os ( for orangi pi h3 zero plus 2). the cpu is armv7, 32bit. Armbian has same error with ubuntu 32bit too.

I started with clean vm - ubuntu16.04 32bit, cocos2d-x-3.11.1.zip
followed exactly doc.

sudo apt-get install chipmunk-dev

cmake …/…


make -j 4 occurs error.

To fix error of call isnan(), add line - using namespace std; to the cpp files
project/cocos2d/cocos/2d/CCActionCamera.cpp
project/cocos2d/cocos/2d/CCSpriteFrame.cpp
project/cocos2d/extensions/GUI/CCControlExtension/CCControlUtils.cpp

Then this error is shown.

What can i do?

What is your need for chipmunk? I’ll try myself too.

It’s needed for cmake …/… I will wait your result. Thanks.

Which I don’t understand because our install doc doesn’t make mention of this and I wrote it. So I should surely try and see. I just went through this doc about 8 times to make sure it worked. However, not on 32-bit.

All is correct, except chipmunk_dev, please try to help me. I also tried 3.12, 3.13, 3.14, 3.15, 3.16 on ubuntu 32, never works while ubuntu 64 works with your doc

I guess it is possible that we don’t support 32-bit anymore. I can say we don’t test on 32-bit at all and haven’t for a few years. I’ll see what my results are.

Ok, I’m waiting your result.

I found solution. need to build libchipmunk.a for 32bit from cocos2d-x-3rd-party-libs-src and copy to cocos2d library

platform - ubuntu 16.04 i386, cocos2d-x-3.12


plus linux installation doc, these are steps to fix compile error

  1. $ git clone https://github.com/cocos2d/cocos2d-x-3rd-party-libs-src.git
  2. sudo apt-get install autoconf automake cmake libtool git
  3. cd cocos2d-x-3rd-party-libs-src/build
  4. ./build.sh -p=linux --libs=chipmunk --arch=i386 --mode=release
  5. mkdir /external/chipmunk/prebuilt/linux/32bit
  6. cp build/linux/chipmunk/prebuilt/i386/libchipmunk.a /external/chipmunk/prebuilt/linux/32bit

then make command will work

Interesting step. Thanks. However, we don’t support 32-bit anymore.