Package Details: cocos2d-x-src 3.17.2-1

Git Clone URL: https://aur.archlinux.org/cocos2d-x-src.git (read-only)
Package Base: cocos2d-x-src
Description: Cocos2D-X is a game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X
Upstream URL: https://cocos2d-x.org/
Keywords: 2D 3D crossplatform engine framework game gamedev
Licenses: MIT License
Submitter: Samuelion
Maintainer: None
Last Packager: Shatur
Votes: 12
Popularity: 0.000051
First Submitted: 2015-03-20 07:28
Last Updated: 2019-06-22 22:16

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

Rubonnek commented on 2016-01-31 22:54

I was able to compile and run the js-tests without issue.

Have you tried modifying the CMakeLists.txt as it's stated in http://discuss.cocos2d-x.org/t/cmake-linux-build-with-shared-libraries-prebuilt-not-pic/16671 ?

According to that post, adding

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

to CMakeLists.txt should fix the issue.

sirHermit commented on 2016-01-31 14:07

It doesn't compile on my 64-bit installation of Arch.

[100%] Linking CXX executable ../../../bin/js-tests/js-tests
/usr/bin/ld: ../../../../../external/websockets/prebuilt/linux/64-bit/libwebsockets.a(libwebsockets.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

How can I deal with that?

Nooblazor commented on 2015-12-09 18:02

Perfect it all works now, thanks! A wiki entry will definitely be nice for future reference.

I don't know what the issue was (probably me being tired) but sourcing the profile.d files and using the /usr/local/bin trick worked like a charm this time. I think I messed up something in /usr/local/bin/python last night so I redid it this morning and it started working.

Rubonnek commented on 2015-12-09 14:52

Nooblazor, I'll write a detailed wiki page on how to finish setting up everything after installing this package -- it will build on top of what Samuelion just said. The page should be ready in a couple of days.

Samuelion commented on 2015-12-09 10:47

Edit :
You should try to read README in /opt/cocos2d-x (the one from package build) and see if you'll find answer. I wrote in it all step by step, and it should give you a working install.

For python, the most confortable and working way for me is the /usr/local/bin trick you talked about, specifying correclty the path in the script (/opt/cocos2d-x/* from memory).

For environment script, you should logout / relogin (maybe source /etc/profile.d/ files of cocos2d-x could be enough).

You could try to read setup.py to be sure, but from memory it is only usefull for custom install. Here path are known and PKGBUILD was written in order to do all the setup for you (install glfw and others as dependencies, download all cocos2d tools, and environment variable are set thanks to /etc/profiles.d/ files).
The only required steps are if you want to run it on android, to install the required packages (sdk, ndk) and set the adequat environment variables (all is explained in README).

Don't have anymore a working install on archlinux, but feel free to give details on your problems to see if I give you some help or some info.

Nooblazor commented on 2015-12-09 09:20

Sorry if this is a silly question but I just spent about an hour digging around the wiki and couldn't figure it out.

What steps do I need to take after installing this package? I can't call the cocos console command or anything like that. It looks like the scripts need python2 so I've tried the methods listed on the wiki including the virtualenv and the /usr/local/bin/python method and even tried aliasing python2 for my current session and none of those worked.

Also, do I need to run any extra scripts (e.g. setup.py)? I don't see the environmental variables set after installing the package.

Samuelion commented on 2015-09-05 18:36

Even following cocos2d's blog, I often discover update only by surprise so thanks for the notification !

Update done as described in your comment. Local install ok.
Test in progress =).

Rubonnek commented on 2015-09-05 15:20

Package out of date. So far only have to change:

pkgver=3.7.1
...
sha1sums=('733571706cef78c81f50fd3209f15937697827d0'
...

Samuelion commented on 2015-04-11 14:29

@pie3
I suggested you to go the cocos2d forum, where you can find more help.
Especially as you seem to use cocos2d 3.5, and I have not currently update the PKGBUILD to this new revision.

pie3 commented on 2015-04-11 11:25

$ cocos compile -p linux
on the hello-world test project returns:

CMake Error at cocos2d/CMakeLists.txt:139 (message):
Unsupported architecture, CMake will exit

Checked, seems that CMAKE_SIZEOF_VOID_P is always undefined on my system (same for another archlinux system I'm running).

So I just define it manually via putting:
set(CMAKE_SIZEOF_VOID_P 4)
in my CMakeLists.txt

It then compiles, but fails at linking-stage:

Linking CXX executable bin/MyGame
/usr/bin/ld: skipping incompatible /home/pie3/workspace/coco/test/cocos2d/external/linux-specific/fmod/prebuilt/32- bit/libfmodex.so when searching for -lfmodex
/usr/bin/ld: skipping incompatible /home/pie3/workspace/coco/test/cocos2d/external/linux-specific/fmod/prebuilt/32-bit/libfmodexL.so when searching for -lfmodexL
/usr/bin/ld: ../cocos2d/external/webp/prebuilt/linux/32-bit/libwebp.a(thread.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

if I set CMAKE_SIZEOF_VOID_P to 8 (64bit) linking still fails, but differently:

Linking CXX executable bin/MyGame
/usr/bin/ld: ../cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(chipmunk.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
../cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a: error adding symbols: Bad value