Cannot build my GLES game

g++ can’t link to X11 or GLESv2

Installing supertuxkart yeilds: command not found.

Nothing seems to work.

Supertux use libsdl2 and expects opengl not opengl es - this is actually not supported out of the box. Graphics API support on the VisionFive 2 - #8 by mzs

Maybe there are some hacks somewhere to use vulkan or a wrapper to use opengl es

Gentoo paket depgraph:

  • dependency graph for games-arcade/supertux-0.6.3-r2
    – games-arcade/supertux-0.6.3-r2
    – dev-games/physfs-3.0.2-r1 (>=dev-games/physfs-3.0) ~riscv
    – dev-libs/boost-1.81.0-r1 (dev-libs/boost) ~riscv [nls]
    – media-libs/freetype-2.12.1-r2 (media-libs/freetype) ~riscv
    – media-libs/glew-2.2.0 (media-libs/glew) ~riscv
    – media-libs/libpng-1.6.39 (media-libs/libpng) ~riscv
    – media-libs/libsdl2-2.26.2 (>=media-libs/libsdl2-2.0.1) ~riscv [joystick video]
    – media-libs/libvorbis-1.3.7-r1 (media-libs/libvorbis) ~riscv
    – media-libs/openal-1.22.2-r1 (media-libs/openal) ~riscv
    – media-libs/sdl2-image-2.0.5_p20210328-r1 (>=media-libs/sdl2-image-2.0.0) ~riscv [png jpeg]
    – net-misc/curl-7.87.0-r2 (>=net-misc/curl-7.21.7) ~riscv
    **virtual/opengl-7.0-r2 (virtual/opengl) ~riscv **
    – media-libs/glm- (media-libs/glm) ~riscv
    – virtual/pkgconfig-2-r1 (virtual/pkgconfig) ~riscv
    – dev-util/ninja-1.11.1-r2 (>=dev-util/ninja-1.8.2) ~riscv
    – dev-util/cmake-3.25.2 (>=dev-util/cmake-3.20.5) ~riscv

Aha, just figured since this: Playing SuperTuxKart on VisionFive 2 - YouTube

But then now I tried to download JDK and the kernel said the CPU locks up during wget download…

Thinking 69 must be mandatory even if it only was release one week after 55?!

You gotta install the gpu drivers from GitHub - starfive-tech/soft_3rdpart manually I think

hey @tinspin
i’m using image #69

in /opt there’s a deb file for libsdl2 without opengl support and its installed into the system

you should be able to launch supertuxkart by compiling it
follow the steps below

Install Dependencies

$ apt install build-essential cmake libbluetooth-dev libsdl2-dev libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev libjpeg-dev libogg-dev libopenal-dev libvorbis-dev libmbedtls-dev pkg-config zlib1g-dev subversion git


These two repositories should be downloaded in the same folder, so that folders stk-code and stk-assets are next to each other.

git clone stk-code
svn co stk-assets

go into the stk-code directory

$ cd stk-code

create and enter the cmake_build directory

$ mkdir cmake_build

$ cd cmake_build

turn off Shaderc for Vulkan support since there’s no vulkan support
$ cmake -DNO_SHADERC=on …


make -j$(nproc)

reference: stk-code/ at master · supertuxkart/stk-code · GitHub


Thanks for the instructions. I think one typo. It should be two dots, instead of three (see above)?
And one thing in general, the audio mixer can’t connect to PulseAudio. Is it just me, or is there a way to get audio working with Debian image 69?

Update: There is audio on the headphone jack.

oops, my bad
yes its a typo, supposed to have 2 dots only

i think pulseaudio won’t be able to run automatically by root, you’ll need to manually start it if you are as root

pulseaudio --start &

maybe create a user and give sudo access to a user account,
i’m using a non-root account and audio mixer is working with the headphone jack

Ok, where am I supposed to copy these files?

Do they work with 55?

So I guess just copy the target/usr/lib into /usr/lib?

But what about target/lib/firmware?


Newer driver needs newer kernel version, if you are still using 55, you should move to a newer version.

1 Like

So will img-gpu-powervr-bin-1.15.6052913.tar.gz work on 55?

I don’t want to brick the device… also what do I have to do to be able to compile my game? Copy the lib stuff? What about the firmware files? How do I get g++ to detect X11 headers?

The time stamp on that file is ~4 months ago and Image 55 I think was December so ~6 months ago. My guess would be no.

1 Like

With 202306 it builds and runs… but at 0.2 FPS.

A game that pulls 6% CPU at 60 FPS on Raspberry 4 pulls 100% at 0.2 FPS on VF2.

So something is completely broken… but I’m in awe of the progress.

I mean EVERYTHING works, nothing is missing… just perf is completely off, I’m guessing there is a for loop in some OpenGL call or something…

I made a zip of the game if you wanna test:

Edit: does 202306 have the GPU drivers or do you still need to install them manually?

So I see there is a new archive here:

Where is the tutorial to get this installed?

4 months and still crickets… how is anyone supposed to know how to extract those files correctly without help/tutorial?

Edit: Getting the builtin img gpu working from scratch

So is this it?

Ok, so it is the files in target you should copy. Here goes nothing…

The files in 202306 are the same as in that zip… so the driver is the problem still…

Patience… reply to this thread if you make a working driver?

Actually, I have succeeded in running opengl app with gnome on xorg (at login screen choose xorg), the Wayland Gnome run it so slowly. This may be a setup of xWayland, or something like that. I have linked with gl4es.

1 Like

Forgot to add that you might have to run these in order to test run the game:

sudo apt-get install libx11-dev libgles2-mesa-dev libopenal-dev libtbb-dev