Package Details: cocos2d-x-src 3.15.1-2

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: http://cdn.cocos2d-x.org/
Keywords: 2D 3D crossplatform engine framework game gamedev
Licenses: MIT License
Submitter: Samuelion
Maintainer: Rubonnek
Last Packager: Rubonnek
Votes: 10
Popularity: 0.506702
First Submitted: 2015-03-20 07:28
Last Updated: 2017-08-01 18:25

Required by (0)

Sources (49)

Latest Comments

Rubonnek commented on 2017-07-29 16:05

I can't reproduce that issue. Make sure to update all of the python2 packages and/or reinstall python2.

mrbowtie commented on 2017-07-29 15:59

when makpkg:

==> Prepare to download external libraries!
Traceback (most recent call last):
File "download-deps.py", line 341, in <module>
main()
File "download-deps.py", line 335, in main
installer = CocosZipInstaller(workpath, os.path.join(workpath, 'external', 'config.json'), os.path.join(workpath, 'external', 'version.json'), "prebuilt_libs_version")
File "download-deps.py", line 97, in __init__
self._extracted_folder_name = os.path.join(self._workpath, self._repo_name + '-' + self._current_version[1:])
File "/usr/lib/python2.7/posixpath.py", line 73, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)

Rubonnek commented on 2017-06-02 11:22

Thanks for pointing that out -- I forgot to run mksrcinfo again after modifying the PKGBUILD. It works now.

maiwald commented on 2017-06-02 09:40

Hey there, I cannot install the package. Installation using pacaur fails with:

cocos2d-x-src package(s) failed to install. Check .SRCINFO for mismatching data with PKGBUILD.

Having only little experience with Linux and packages in general, might the problem be that pgkrel in .SRCINFO was not properly updated in the latest release?

Cheers

HerbertFlunder commented on 2017-05-15 22:14

Yes, it's already installed.

Rubonnek commented on 2017-05-14 22:28

Have you tried installing glfw-wayland and then running 'cocos run -p linux'?

HerbertFlunder commented on 2017-05-14 21:09

After creating a new game and running:
cocos run -p linux
it compiles fine, but when the application starts I get:

GLFWError #65544 Happen, Wayland: Failed to connect to display
GLFWError #65537 Happen, The GLFW library is not initialized
Error launch application: Can't create window

Is there any way to fix this? Thank you.

ps.: I don't really need it to use wayland, x11 would be fine too.

Rubonnek commented on 2016-07-05 20:42

The substitution of the hard-written paths has been removed from the PKGBUILD.

The previous workaround has been updated in the wiki:
https://wiki.archlinux.org/index.php/Cocos2D-X#Python_Scripts_Workaround

Rubonnek commented on 2016-05-14 03:00

Thanks for the suggestion. It's now implemented in the latest PKGBUILD for Cocos2D-X v3.11.

DasFranck commented on 2016-05-07 15:32

I used the command below to have cocos working with python2 for the hard-writed paths:

sudo find /opt/cocos2d-x -exec sed -i "s/\/usr\/bin\/python$/\/usr\/bin\/python2/g" {} \;

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

Samuelion commented on 2015-03-22 07:33

Very first run. Comments welcomed.
Please read README ! and warning : 450Mb download, 200Mb package, 700Mb install !
All src included (allow compiling for linux, android, ios and win!), and use 'cocos' wrapper to create, compile, deploy and run project on all platforms.
Cmake file added to correct cmake 3.2.1 deprecation (libX11 no more automagically added to linker when adding libGl)

Samuelion commented on 2015-03-20 21:55

Just added little patch to correct linker issu with cmake 3.2.1
https://github.com/cocos2d/cocos2d-x/issues/11020

Samuelion commented on 2015-03-20 19:30

Very first run. Comments welcomed.
Please read README ! and warning : 450Mb download and 700Mb package !
All src included (allow compiling for linux, android, ios and win!).

Samuelion commented on 2015-03-20 07:29

Very first run. Comments welcomed.
Please read README ! and warning : 450Mb download and 700Mb package !
All src included (allow compiling for linux, android, ios and win!).