Skip to content

Instantly share code, notes, and snippets.

@on-three
Created December 22, 2018 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save on-three/1ac17a69f601bb4a5399a4a1e301820f to your computer and use it in GitHub Desktop.
Save on-three/1ac17a69f601bb4a5399a4a1e301820f to your computer and use it in GitHub Desktop.
build cocos2dx on linuxmint 18
cat /proc/version
Linux version 4.4.0-138-generic (buildd@lcy01-amd64-006) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018
# typical install fails
git clone ....
cd to-the-repo
git submodule update --init
./download-deps.py
./build/install-deps-linux.sh
cd build
mkdir linux-build; cd linux-build
cmake ../../
# fix one: install latest cmake
sudo apt remove cmake
# download installer script from cmake: cmake-3.13.2-Linux-x86_64.sh
# https://github-production-release-asset-2e65be.s3.amazonaws.com/537699/1aae5080-feb4-11e8-9ade-a39a6c6c7217?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181222%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181222T185627Z&X-Amz-Expires=300&X-Amz-Signature=4a1f392e1ef7db54673ebe535654242bb407dc682ac1954d658e25607768e873&X-Amz-SignedHeaders=host&actor_id=6415511&response-content-disposition=attachment%3B%20filename%3Dcmake-3.13.2-Linux-x86_64.sh&response-content-type=application%2Foctet-stream
# run script in /opt
sudo ln -s /opt/cmake-3.13.2-Linux-x86_64/bin/* /usr/local/bin/
cmake --version
cmake version 3.13.2
# install at least glfw 3.2
sudo apt remove libglfw3-dev
#download glfw-3.2.1.zip
# https://github-production-release-asset-2e65be.s3.amazonaws.com/9524997/04e92b64-655d-11e6-8464-cce951a4885e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181222%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181222T192212Z&X-Amz-Expires=300&X-Amz-Signature=3a6c00e6cd8a643ebf940df22ee64fc2f6a1ace30283a20376832ebd40a0921d&X-Amz-SignedHeaders=host&actor_id=6415511&response-content-disposition=attachment%3B%20filename%3Dglfw-3.2.1.zip&response-content-type=application%2Foctet-stream
unzip glfw-3.2.1.zip
cd glfw-3.2.1; mkdir build; cd build; cmake ..; make -j 4 ; sudo make install
# cocos2d should now build cleanly
# from root
mkdir build/linux-build; cd build/linux-build
cmake ../..
make -j 4
# success!(?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment