Cannot compile project version 3.11.1 ubuntu 16.04

You said you tested on 32bit.

slackmoehrleCommunity EvangelistJun '16
so, I am fine on 16.04 32-bit and 16.04 64-bit using the latest from GitHub."

Another problem from the doc is:
cd cocos2d-x-root #where your cocos2d-x directory is located.
cd build
mkdir linux-build
cd linux-build
cmake …/…

when run cmake …/… there’s error - SPIDERMONKEY_LIBRARY: SPIDERMONKEY_LIBRARY-NOTFOUND. How can i fix this?

What version of cocos2d-x are you using?

If I said that in June 2016 it was probably 3.11.1 and Ubuntu 16.04 with gcc 4.9 or 4.8.

3.15.1
Would you like to check by teamviewer?
3.11.1 is same, i also tested it yesterday. I think all versions are same on ubuntu 32bit

Why are you posting in a 3.11.1 thread then? You aren’t using the same criteria as the thread to ask your questions.

We haven’t tested on 32-bit in the last few releases. I’d suggest either going back to 3.11.1 if you want to use 32-bit or switch to 64-bit and use 3.16. It is possible 3.12 or 3.13 could work too.

3.11.1 is same, i also tested it yesterday. I think all versions got same problem on ubuntu 32bit. Can you help me by teamviewer?

I’d suggest starting a new thread. Outline your commands and show some screenshots. Ensure gcc version, python version, etc. Ensure your VM is using an OpenGL video driver. We don’t test using mesa-drivers.

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.