All of the samples in ubuntu12.04 get crash

All of the cocos2dx samples cannot be invoked success, just got a crash info like:
hi@ubuntu:~/cocos2d-x-2.1.5/samples/Cpp/SimpleGame/proj.linux$ bin/release/SimpleGame
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 61
Current serial number in output stream: 61

OS: ubuntu12.04 in the parallels desktop mac.

Does the bug of cocos2dx or parallels desktop?

I’m having a similar issue when compiling and running a brand new project running on Ubuntu under the Parallels VM. Though, my error code is a bit different.

X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 157 (GLX)
  Minor opcode of failed request: 5 (X_GLXMakeCurrent)
  Serial number of failed request: 122
  Current serial number in output stream: 122

Also, the following showed up in /var/log/Xorg.0.log:

[  6542.327] (II) XKB: reuse xkmfile /var/lib/xkb/server-34CEB476A3CB596DA76FD7010A029F76732EF824.xkm
[  6542.351] (II) PRLCONTROL: GL PBuffer(this=0x7fa6acdab620, host_pbuf=57153A74, glxId=5000006, drawId=5000005, GLXDrawablePtr=0x7fa6a93a42e0, DrawablePtr=0x7fa6abd493a0, tex_fmt=20DA, tex_tgt=20DC) created
[  6542.357] (II) PRLCONTROL: GL PBuffer(this=0x7fa6acdab620, host_pbuf=57153A74 tex_tgt=20DC) destroyed

I ran glxgears to see if there was an issue, but that ran fine. As I understand, a BadMatch error will occur if a GLX drawable wasn’t created on the same X screen and visual as a specified GLX rendering context. It can also occur if the drawable is None and the context is not NULL.

So you are both running in a VM. I tested these instructions in a 12.04 VM not to long ago and cpp-tests did not crash for me. I am using VMWare Fusion, however.

One thing I noticed was that I ran the script to install the deps automatically and I am getting a lot of 404: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu9.1_amd64.deb 404 Not Found [IP: 91.189.92.200 80] I’ll try a manual install. Perhaps some deps are missing and nobody noticed.

Yes, the issue appears to be unique to Parallels. I’m posting this in the Parallels forum now to see if they can think of any reason as to why this is occurring.

I’m trying in a new VMWare instance right now.

it seems part of the problem is that I am running 14.10 and a number of mirrors don’t seem to have packages available anymore and it keeps telling me to upgrade to 15.04. I can’t sudo apt-get any of the dependencies we list and the script we provide fails in exactly the same way as trying to install manually.

Let me grab 15.10 and see what things works and if the script works.

Are you talking about the “install-deps-linux.sh” script? If so, this was the following output which I received from that script. I haven’t noticed any 404s.

Toolchain test builds; see 
https://wiki.ubuntu.com/ToolChain

 More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpq4ajdutz/secring.gpg' created
gpg: keyring `/tmp/tmpq4ajdutz/pubring.gpg' created
gpg: requesting key BA9EF27F from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpq4ajdutz/trustdb.gpg: trustdb created
gpg: key BA9EF27F: public key "Launchpad Toolchain builds" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
Ign http://us.archive.ubuntu.com trusty InRelease
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
Get:2 http://us.archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Hit http://ppa.launchpad.net trusty InRelease
Ign http://extras.ubuntu.com trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://extras.ubuntu.com trusty Release.gpg
Hit http://extras.ubuntu.com trusty Release
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:3 http://security.ubuntu.com trusty-security/main Sources [112 kB]
Hit http://extras.ubuntu.com trusty/main Sources
Hit http://ppa.launchpad.net trusty/main i386 Packages
Get:4 http://us.archive.ubuntu.com trusty-backports InRelease [65.9 kB]
Hit http://extras.ubuntu.com trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://extras.ubuntu.com trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:5 http://security.ubuntu.com trusty-security/restricted Sources [4,035 B]
Hit http://ppa.launchpad.net trusty/main i386 Packages
Get:6 http://security.ubuntu.com trusty-security/universe Sources [35.5 kB]
Hit http://ppa.launchpad.net trusty/main Translation-en
Get:7 http://security.ubuntu.com trusty-security/multiverse Sources [2,764 B]
Get:8 http://us.archive.ubuntu.com trusty Release.gpg [933 B]
Get:9 http://us.archive.ubuntu.com trusty-updates/main Sources [273 kB]
Get:10 http://security.ubuntu.com trusty-security/main amd64 Packages [457 kB]
Ign http://extras.ubuntu.com trusty/main Translation-en_US
Ign http://extras.ubuntu.com trusty/main Translation-en
Get:11 http://security.ubuntu.com trusty-security/restricted amd64 Packages [13.0 kB]
Get:12 http://us.archive.ubuntu.com trusty-updates/restricted Sources [5,352 B]
Get:13 http://us.archive.ubuntu.com trusty-updates/universe Sources [154 kB]
Get:14 http://us.archive.ubuntu.com trusty-updates/multiverse Sources [5,928 B]
Get:15 http://us.archive.ubuntu.com trusty-updates/main amd64 Packages [755 kB]
Get:16 http://security.ubuntu.com trusty-security/universe amd64 Packages [126 kB]
Get:17 http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Get:18 http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages [358 kB]
Get:19 http://security.ubuntu.com trusty-security/multiverse amd64 Packages [4,982 B]
Get:20 http://security.ubuntu.com trusty-security/main i386 Packages [431 kB]
Get:21 http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [13.2 kB]
Get:22 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [722 kB]
Get:23 http://security.ubuntu.com trusty-security/restricted i386 Packages [12.7 kB]
Get:24 http://security.ubuntu.com trusty-security/universe i386 Packages [127 kB]
Get:25 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]
Get:26 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [360 kB]
Get:27 http://security.ubuntu.com trusty-security/multiverse i386 Packages [5,172 B]
Get:28 http://security.ubuntu.com trusty-security/main Translation-en [251 kB]
Get:29 http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.6 kB]
Get:30 http://security.ubuntu.com trusty-security/multiverse Translation-en [2,570 B]
Get:31 http://us.archive.ubuntu.com trusty-updates/main Translation-en [377 kB]
Get:32 http://security.ubuntu.com trusty-security/restricted Translation-en [3,206 B]
Get:33 http://security.ubuntu.com trusty-security/universe Translation-en [74.7 kB]
Get:34 http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en [7,227 B]
Get:35 http://us.archive.ubuntu.com trusty-updates/restricted Translation-en [3,699 B]
Get:36 http://us.archive.ubuntu.com trusty-updates/universe Translation-en [188 kB]
Get:37 http://us.archive.ubuntu.com trusty-backports/main Sources [8,948 B]
Get:38 http://us.archive.ubuntu.com trusty-backports/restricted Sources [28 B]
Get:39 http://us.archive.ubuntu.com trusty-backports/universe Sources [34.5 kB]
Get:40 http://us.archive.ubuntu.com trusty-backports/multiverse Sources [1,898 B]
Get:41 http://us.archive.ubuntu.com trusty-backports/main amd64 Packages [9,998 B]
Get:42 http://us.archive.ubuntu.com trusty-backports/restricted amd64 Packages [28 B]
Get:43 http://us.archive.ubuntu.com trusty-backports/universe amd64 Packages [41.5 kB]
Get:44 http://us.archive.ubuntu.com trusty-backports/multiverse amd64 Packages [1,571 B]
Get:45 http://us.archive.ubuntu.com trusty-backports/main i386 Packages [9,974 B]
Get:46 http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages [28 B]
Get:47 http://us.archive.ubuntu.com trusty-backports/universe i386 Packages [41.5 kB]
Get:48 http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages [1,552 B]
Get:49 http://us.archive.ubuntu.com trusty-backports/main Translation-en [5,986 B]
Get:50 http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en [1,215 B]
Get:51 http://us.archive.ubuntu.com trusty-backports/restricted Translation-en [28 B]
Get:52 http://us.archive.ubuntu.com trusty-backports/universe Translation-en [36.0 kB]
Hit http://us.archive.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty/main Translation-en
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty/universe Translation-en
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 5,324 kB in 2min 9s (41.2 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package 'libglfw2' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
Checking for missing packages ...
remove old g++
glw_version 3.0.4
glfw_download_size https://codeload.github.com/glfw/glfw/tar.gz/3.0.4
glfw_zip_file glfw3.0.4.tar.gz
Reading package lists...
Building dependency tree...
Reading state information...
xorg-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
libglu1-mesa-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
cmake is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 12  320k   12 41248    0     0  49856      0  0:00:06 --:--:--  0:00:06 49816
 97  320k   97  311k    0     0   168k      0  0:00:01  0:00:01 --:--:--  167k
100  320k  100  320k    0     0   172k      0  0:00:01  0:00:01 --:--:--  172k
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Using X11 for window creation
-- Using GLX for context creation
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Looking for glXGetProcAddress
-- Looking for glXGetProcAddress - found
-- Looking for glXGetProcAddressARB
-- Looking for glXGetProcAddressARB - found
-- Looking for glXGetProcAddressEXT
-- Looking for glXGetProcAddressEXT - not found
-- Configuring done
CMake Warning (dev) in src/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "glfw" has an INTERFACE_LINK_LIBRARIES property which differs from
  its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    /usr/lib/x86_64-linux-gnu/libX11.so;-lpthread;/usr/lib/x86_64-linux-gnu/libXrandr.so;/usr/lib/x86_64-linux-gnu/libXi.so;/usr/lib/x86_64-linux-gnu/libXxf86vm.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libGL.so

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /media/psf/Home/Library/Cocos2D/build/glfw_install/glfw_dest
make: Warning: File `Makefile' has modification time 0.64 s in the future
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Using X11 for window creation
-- Using GLX for context creation
-- Configuring done
CMake Warning (dev) in src/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "glfw" has an INTERFACE_LINK_LIBRARIES property which differs from
  its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    /usr/lib/x86_64-linux-gnu/libX11.so;-lpthread;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libXrandr.so;/usr/lib/x86_64-linux-gnu/libXi.so;/usr/lib/x86_64-linux-gnu/libXxf86vm.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libGL.so

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /media/psf/Home/Library/Cocos2D/build/glfw_install/glfw_dest
make[2]: Warning: File `src/CMakeFiles/glfw.dir/flags.make' has modification time 0.26 s in the future
Scanning dependencies of target glfw
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
make[2]: Warning: File `src/CMakeFiles/glfw.dir/flags.make' has modification time 0.082 s in the future
[  2%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o
[  4%] Building C object src/CMakeFiles/glfw.dir/context.c.o
[  6%] Building C object src/CMakeFiles/glfw.dir/gamma.c.o
[  8%] Building C object src/CMakeFiles/glfw.dir/init.c.o
[ 10%] Building C object src/CMakeFiles/glfw.dir/input.c.o
[ 12%] Building C object src/CMakeFiles/glfw.dir/joystick.c.o
[ 14%] Building C object src/CMakeFiles/glfw.dir/monitor.c.o
[ 16%] Building C object src/CMakeFiles/glfw.dir/time.c.o
[ 18%] Building C object src/CMakeFiles/glfw.dir/window.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/x11_clipboard.c.o
[ 22%] Building C object src/CMakeFiles/glfw.dir/x11_gamma.c.o
[ 24%] Building C object src/CMakeFiles/glfw.dir/x11_init.c.o
[ 26%] Building C object src/CMakeFiles/glfw.dir/x11_joystick.c.o
[ 28%] Building C object src/CMakeFiles/glfw.dir/x11_monitor.c.o
[ 30%] Building C object src/CMakeFiles/glfw.dir/x11_time.c.o
[ 32%] Building C object src/CMakeFiles/glfw.dir/x11_window.c.o
[ 34%] Building C object src/CMakeFiles/glfw.dir/x11_unicode.c.o
[ 36%] Building C object src/CMakeFiles/glfw.dir/glx_context.c.o
Linking C shared library libglfw.so
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 36%] Built target glfw
Scanning dependencies of target boing
make[2]: Warning: File `examples/CMakeFiles/boing.dir/depend.make' has modification time 0.98 s in the future
[ 38%] Building C object examples/CMakeFiles/boing.dir/boing.c.o
Linking C executable boing
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 38%] Built target boing
Scanning dependencies of target gears
[ 40%] Building C object examples/CMakeFiles/gears.dir/gears.c.o
Linking C executable gears
[ 40%] Built target gears
Scanning dependencies of target heightmap
[ 42%] Building C object examples/CMakeFiles/heightmap.dir/heightmap.c.o
[ 44%] Building C object examples/CMakeFiles/heightmap.dir/__/deps/getopt.c.o
Linking C executable heightmap
[ 44%] Built target heightmap
Scanning dependencies of target simple
[ 46%] Building C object examples/CMakeFiles/simple.dir/simple.c.o
Linking C executable simple
[ 46%] Built target simple
Scanning dependencies of target splitview
[ 48%] Building C object examples/CMakeFiles/splitview.dir/splitview.c.o
Linking C executable splitview
[ 48%] Built target splitview
Scanning dependencies of target wave
make[2]: Warning: File `examples/CMakeFiles/wave.dir/depend.make' has modification time 0.98 s in the future
[ 50%] Building C object examples/CMakeFiles/wave.dir/wave.c.o
Linking C executable wave
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 50%] Built target wave
Scanning dependencies of target accuracy
[ 52%] Building C object tests/CMakeFiles/accuracy.dir/accuracy.c.o
Linking C executable accuracy
[ 52%] Built target accuracy
Scanning dependencies of target clipboard
[ 54%] Building C object tests/CMakeFiles/clipboard.dir/clipboard.c.o
[ 56%] Building C object tests/CMakeFiles/clipboard.dir/__/deps/getopt.c.o
Linking C executable clipboard
[ 56%] Built target clipboard
Scanning dependencies of target defaults
[ 58%] Building C object tests/CMakeFiles/defaults.dir/defaults.c.o
Linking C executable defaults
[ 58%] Built target defaults
Scanning dependencies of target events
[ 60%] Building C object tests/CMakeFiles/events.dir/events.c.o
[ 62%] Building C object tests/CMakeFiles/events.dir/__/deps/getopt.c.o
Linking C executable events
[ 62%] Built target events
Scanning dependencies of target fsaa
make[2]: Warning: File `tests/CMakeFiles/fsaa.dir/depend.make' has modification time 0.98 s in the future
[ 64%] Building C object tests/CMakeFiles/fsaa.dir/fsaa.c.o
[ 66%] Building C object tests/CMakeFiles/fsaa.dir/__/deps/getopt.c.o
Linking C executable fsaa
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 66%] Built target fsaa
Scanning dependencies of target gamma
[ 68%] Building C object tests/CMakeFiles/gamma.dir/gamma.c.o
[ 70%] Building C object tests/CMakeFiles/gamma.dir/__/deps/getopt.c.o
Linking C executable gamma
[ 70%] Built target gamma
Scanning dependencies of target glfwinfo
[ 72%] Building C object tests/CMakeFiles/glfwinfo.dir/glfwinfo.c.o
[ 74%] Building C object tests/CMakeFiles/glfwinfo.dir/__/deps/getopt.c.o
Linking C executable glfwinfo
[ 74%] Built target glfwinfo
Scanning dependencies of target iconify
[ 76%] Building C object tests/CMakeFiles/iconify.dir/iconify.c.o
[ 78%] Building C object tests/CMakeFiles/iconify.dir/__/deps/getopt.c.o
Linking C executable iconify
[ 78%] Built target iconify
Scanning dependencies of target joysticks
[ 80%] Building C object tests/CMakeFiles/joysticks.dir/joysticks.c.o
Linking C executable joysticks
[ 80%] Built target joysticks
Scanning dependencies of target modes
make[2]: Warning: File `tests/CMakeFiles/modes.dir/depend.make' has modification time 0.98 s in the future
[ 82%] Building C object tests/CMakeFiles/modes.dir/modes.c.o
[ 84%] Building C object tests/CMakeFiles/modes.dir/__/deps/getopt.c.o
Linking C executable modes
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 84%] Built target modes
Scanning dependencies of target peter
[ 86%] Building C object tests/CMakeFiles/peter.dir/peter.c.o
Linking C executable peter
[ 86%] Built target peter
Scanning dependencies of target reopen
[ 88%] Building C object tests/CMakeFiles/reopen.dir/reopen.c.o
Linking C executable reopen
[ 88%] Built target reopen
Scanning dependencies of target sharing
[ 90%] Building C object tests/CMakeFiles/sharing.dir/sharing.c.o
Linking C executable sharing
[ 90%] Built target sharing
Scanning dependencies of target tearing
[ 92%] Building C object tests/CMakeFiles/tearing.dir/tearing.c.o
Linking C executable tearing
[ 92%] Built target tearing
Scanning dependencies of target threads
[ 94%] Building C object tests/CMakeFiles/threads.dir/threads.c.o
[ 96%] Building C object tests/CMakeFiles/threads.dir/__/deps/tinycthread.c.o
Linking C executable threads
[ 96%] Built target threads
Scanning dependencies of target title
[ 98%] Building C object tests/CMakeFiles/title.dir/title.c.o
Linking C executable title
[ 98%] Built target title
Scanning dependencies of target windows
[100%] Building C object tests/CMakeFiles/windows.dir/windows.c.o
Linking C executable windows
[100%] Built target windows
make: warning:  Clock skew detected.  Your build may be incomplete.
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Using X11 for window creation
-- Using GLX for context creation
-- Configuring done
CMake Warning (dev) in src/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "glfw" has an INTERFACE_LINK_LIBRARIES property which differs from
  its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    /usr/lib/x86_64-linux-gnu/libX11.so;-lpthread;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libXrandr.so;/usr/lib/x86_64-linux-gnu/libXi.so;/usr/lib/x86_64-linux-gnu/libXxf86vm.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libGL.so

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /media/psf/Home/Library/Cocos2D/build/glfw_install/glfw_dest
Scanning dependencies of target glfw
Linking C shared library libglfw.so
[ 36%] Built target glfw
Linking C executable boing
[ 38%] Built target boing
Linking C executable gears
[ 40%] Built target gears
Linking C executable heightmap
[ 44%] Built target heightmap
Linking C executable simple
[ 46%] Built target simple
Linking C executable splitview
[ 48%] Built target splitview
Linking C executable wave
[ 50%] Built target wave
Linking C executable accuracy
[ 52%] Built target accuracy
Linking C executable clipboard
[ 56%] Built target clipboard
Linking C executable defaults
[ 58%] Built target defaults
Linking C executable events
[ 62%] Built target events
Linking C executable fsaa
[ 66%] Built target fsaa
Linking C executable gamma
[ 70%] Built target gamma
Linking C executable glfwinfo
[ 74%] Built target glfwinfo
Linking C executable iconify
[ 78%] Built target iconify
Linking C executable joysticks
[ 80%] Built target joysticks
Linking C executable modes
[ 84%] Built target modes
Linking C executable peter
[ 86%] Built target peter
Linking C executable reopen
[ 88%] Built target reopen
Linking C executable sharing
[ 90%] Built target sharing
Linking C executable tearing
[ 92%] Built target tearing
Linking C executable threads
[ 96%] Built target threads
Linking C executable title
[ 98%] Built target title
Linking C executable windows
[100%] Built target windows
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/include/GLFW
-- Up-to-date: /usr/local/include/GLFW/glfw3.h
-- Up-to-date: /usr/local/include/GLFW/glfw3native.h
-- Installing: /usr/local/lib/cmake/glfw/glfwConfig.cmake
-- Installing: /usr/local/lib/cmake/glfw/glfwConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/glfw/glfwTargets.cmake
-- Installing: /usr/local/lib/cmake/glfw/glfwTargets-noconfig.cmake
-- Installing: /usr/local/lib/pkgconfig/glfw3.pc
-- Installing: /usr/local/lib/libglfw.so.3.0
-- Up-to-date: /usr/local/lib/libglfw.so.3
-- Up-to-date: /usr/local/lib/libglfw.so

The script seems to have updated some things; so just to be sure the error was still occurring, I ran the cocos project build again.

Building mode: debug
running: 'cmake -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MODE=ON ..'

-- OpenGL include dirs: /usr/include
-- GLEW include dirs: /usr/include
-- PkgConfig found
-- GLFW3 include dirs: /usr/local/include/GLFW
-- FMOD include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/linux-specific/fmod/include
-- Fontconfig include dirs: /usr/include/freetype2
-- GTK3 include dirs: /usr/include/gtk-3.0;/usr/include/atk-1.0;/usr/include/at-spi2-atk/2.0;/usr/include/pango-1.0;/usr/include/gio-unix-2.0/;/usr/include/cairo;/usr/include/gdk-pixbuf-2.0;/usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/include/harfbuzz;/usr/include/freetype2;/usr/include/pixman-1;/usr/include/libpng12
-- Freetype include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/freetype2/include/linux;/media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/freetype2/include/linux
-- WebP include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/webp/include/linux
-- Chipmunk include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/chipmunk/include
-- Bullet include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/bullet
-- Recast include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/recast
-- TinyXML2 include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/tinyxml2
-- JPEG include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/jpeg/include/linux
-- ZLIB include dirs: /usr/include
-- MINIZIP include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/unzip;/usr/include
-- PNG include dirs: /usr/include;/usr/include
-- TIFF include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/tiff/include/linux
-- WEBSOCKETS include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/websockets/include/linux
-- CURL include dirs: 
-- Flatbuffers include dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external
-- OPENGL add to include_dirs: /usr/include
-- OPENGL libs added to 'cocos2dInternal': /usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so
-- GLEW add to include_dirs: /usr/include
-- GLEW libs added to 'cocos2dInternal': /usr/lib/x86_64-linux-gnu/libGLEW.so
-- GLFW3 add to include_dirs: /usr/local/include/GLFW
-- GLFW3 add to link_dirs: /usr/local/lib
-- GLFW3 libs added to 'cocos2dInternal': glfw
-- GLFW3 add definitions: -DGLFW_DLL
-- FMOD add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/linux-specific/fmod/include
-- FMOD libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so;/media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so
-- FONTCONFIG add to include_dirs: /usr/include/freetype2
-- FONTCONFIG libs added to 'cocos2dInternal': fontconfig;freetype
-- THREADS libs added to 'cocos2dInternal': -lpthread
-- GTK3 add to include_dirs: /usr/include/gtk-3.0;/usr/include/atk-1.0;/usr/include/at-spi2-atk/2.0;/usr/include/pango-1.0;/usr/include/gio-unix-2.0/;/usr/include/cairo;/usr/include/gdk-pixbuf-2.0;/usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/include/harfbuzz;/usr/include/freetype2;/usr/include/pixman-1;/usr/include/libpng12
-- GTK3 libs added to 'cocos2dInternal': gtk-3;gdk-3;atk-1.0;gio-2.0;pangocairo-1.0;gdk_pixbuf-2.0;cairo-gobject;pango-1.0;cairo;gobject-2.0;glib-2.0
-- GTK3 add definitions: -pthread
-- ZLIB add to include_dirs: /usr/include
-- ZLIB libs added to 'cocos2dInternal': /usr/lib/x86_64-linux-gnu/libz.so
-- MINIZIP add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/unzip;/usr/include
-- MINIZIP libs added to 'cocos2dInternal': unzip;/usr/lib/x86_64-linux-gnu/libz.so
-- JPEG add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/jpeg/include/linux
-- JPEG libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/jpeg/prebuilt/linux/64-bit/libjpeg.a
-- PNG add to include_dirs: /usr/include;/usr/include
-- PNG libs added to 'cocos2dInternal': /usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so
-- TIFF add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/tiff/include/linux
-- TIFF libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/tiff/prebuilt/linux/64-bit/libtiff.a
-- TinyXML2 add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/tinyxml2
-- TinyXML2 libs added to 'cocos2dInternal': tinyxml2
-- FREETYPE add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/freetype2/include/linux;/media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/freetype2/include/linux
-- FREETYPE libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a
-- WEBSOCKETS add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/websockets/include/linux
-- WEBSOCKETS libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/websockets/prebuilt/linux/64-bit/libwebsockets.a
-- CURL libs added to 'cocos2dInternal': curl
-- FLATBUFFERS add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external
-- XXHASH add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/xxhash
-- XXHASH libs added to 'cocos2dInternal': xxhash
-- WEBP add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/webp/include/linux
-- WEBP libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/webp/prebuilt/linux/64-bit/libwebp.a
-- CHIPMUNK add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/chipmunk/include
-- CHIPMUNK libs added to 'cocos2dInternal': /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a
-- BULLET add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/bullet
-- BULLET libs added to 'cocos2dInternal': bullet
-- RECAST add to include_dirs: /media/psf/Home/Documents/CocosProjects/MyGame/cocos2d/external/recast
-- RECAST libs added to 'cocos2dInternal': recast
-- Configuring done
-- Generating done
-- Build files have been written to: /media/psf/Home/Documents/CocosProjects/MyGame/linux-build
running: 'make -j2'

[  1%] Built target xxhash
[  1%] Built target unzip
[  3%] Built target recast
[  3%] Built target tinyxml2
[  3%] Built target MyGame_CORE_PRE_BUILD
[  4%] Built target flatbuffers
[ 24%] Built target bullet
MyGame_PRE_BUILD ...
[ 24%] Built target MyGame_PRE_BUILD
[100%] Built target cocos2dInternal
[100%] Built target cocos2d
[100%] Built target MyGame
Build succeed.
Deploying mode: debug
Starting application.
running: '/media/psf/Home/Documents/CocosProjects/MyGame/bin/debug/linux/MyGame'

Error running command, return code: 1.

I am testing this. on 15.10, everything works for me, except I get an error executing cpp-tests.

jtsm@ubuntu:~/cocos2d-x/build/linux-build/bin/cpp_tests$ ./cpp_tests 
./cpp_tests: error while loading shared libraries: libfmod.so.6: cannot open shared object file: No such file or directory

When I try on 12.04 or 12.10, our install-deps-lunix.sh script fails with a ton of 404’s. I have not tried on 14.04 or 14.10 yet.

This error has to do with the install-deps-linux.sh script not installing the fmod AudioEngine on some distros. The fix is fairly easy though:

sudo cp <cocos2d-x folder>/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so /usr/local/lib/
sudo cp <cocos2d-x folder>/external/linux-specific/fmod/prebuilt/64-bit/libfmodL.so /usr/local/lib/
sudo ln -s /usr/local/lib/libfmod.so /usr/local/lib/libfmod.so.6

After that, run the install-deps-linux.sh script again and then try to compile/run your cpp-tests again. It shouldn’t have this error anymore. It should now load fmod properly, but on Parallels 11 you’ll run into my original error.

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  157 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  122
  Current serial number in output stream:  122

Yes, of course.

and it runs on Ubuntu for me, 15.10 and 16.04. But fails on 12 and 14 for me, but it fails with the install-linux-deps script.

I tried installing Ubuntu 16 on another VM to see if there’s any difference, but the tests won’t even build for me on this system. I also had to increase the video memory to 512MB for Ubuntu 16 to work without flickering.

[ 17%] Linking CXX static library ../../lib/libbullet.a
[ 17%] Built target bullet
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Error running command, return code: 2.

weird, let me fire up the v16 vm and see if I can repo on a clean pull

Tried out Cub Linux on Parallels 11, which is based on Ubuntu 14.04 LTS, for the heck of it. Everything compiled as expected after the fmod fix. Again, there’s the familiar BadMatch error. Although, the numbers are slightly different.

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  156 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  123
  Current serial number in output stream:  123

So, I’m beginning to think that this is at least an Ubuntu 14.04 and under on Parallels 11 issue. I might try out VMware Fusion 8 later. Although, I’ve heard that product has a low FPS when it comes to OpenGL.

I am on VMWare and I don’t see any of this.

So, I got VMWare Fusion 8. First I imported Cub Linux from my Parallels VM, but this turned out to be a bad idea. If you import, your mouse won’t be able to click (on a 2015 MBP at least). Then I tried creating one from scratch, this time it worked out nicely. However, I was having issues with open-vm-tools not being able to mount. In the end, I went with the legacy vmware tools. Only issue I have is the resizing to fit the retina display. Most things will resize, but the dock at the bottom of the screen (the one in Cub Linux) kind of floats in the middle of the screen for a while.

As for Cocos2D itself, I ran into a few snags.

  1. CMakeLists.txt was reporting a different location due to the previous Parallels setup. I ended up git cloning the whole Cocos2D repo again, downloading the dependencies, and initializing the submodules. I did this from my host system, since git on the guest system wouldn’t clone for some odd reason.
  2. The CMake version installed was 2.x whereas Cocos2D requires Cocos 3.x. The solution is to add the ppa repo containing cmake 3.x, apt-get update, apt-get dist-upgrade (a simple upgrade will not work).
  3. The fmod library was missing, did my usual fix.
  4. Once compiled, the cpp_tests wouldn’t run because the script calls cpp-tests. You just go to the directory containing cpp_tests and run it yourself.

All of the tests ran just fine. Unfortunately, I think this means I may have to switch to VMWare, but I’m scared of migrating my Windows 10 VM. It would take forever to start from scratch and everything is as I’d like it to be.

One caveat with Cub Linux is that Unity mode is unavailable. Although, it was also technically unavailable with Parallels 11. It wasn’t greyed out like VMWare Fusion 8, but it complained about visual effects needing to be turned off (an option which doesn’t exist). Coherence mode (in Parallels) just didn’t look nice on Ubuntu anyway. I’m not sure how Unity (in Fusion) looks because I haven’t tested it out, but I have a feeling it won’t be too hot. I’m also scared that Unity mode will suck for Windows 10 since Parallels does it so well, even including the notification panel on the Mac (if you want to that is), and I’ve become accustomed to it. Fusion has an ugly application menu in the task bar too that doesn’t work for Cub Linux anyway.

UPDATE 04/24/2015 3:08pm:
I’ve decided that I’ll work with both Parallels and Fusion. Parallels for my Windows machine and Fusion for my Linux machine. It’s not the nicest setup, but it will have to do for now until Parallels gets their act together. Their software is nicer in my opinion, but it’s useless if I can’t do what I need to do on it.