Cube 2: Sauerbraten port for EmuELEC?

I noticed EmuELEC has a port of SuperTuxKart, which looks to be an aarch64 native game.

Since I have SuperTuxKart on my PC, I was wondering if there could also be a port of Cube 2 Sauerbraten, a first person shooter game that I also have on my PC.

The game itself is quite old so I suspect my Amlogic processor could run it reasonably well.

There are prebuilt binaries (for client and server) for linux on x86 and x86_64 architectures but not aarch64, so I went and built them using qemu and a debian stable chroot environment.

Would it be enough to copy over the game, the newly built aarch64 binaries, and game data over to a fresh EmuELEC install?

There are several dependency libraries which I’m not sure if EmuELEC has them, perhaps I can just copy over the required libraries as well? I do see there’s a folder inside the storage partition that contains ‘put_user_libs_here’.

I can also include how I built the aarch64 binaries if necessary.

Here is the output of file on the generated client binary to confirm that it was built for aarch64:

$ file linux_aarch64_client

linux_aarch64_client: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=c12084bca365641af6cc13942c077fef74f4229e, for GNU/Linux 3.7.0, stripped

And here is ldd to show what libraries it would need:

$ ldd linux_aarch64_client

	libX11.so.6 => /usr/lib/aarch64-linux-gnu/libX11.so.6 (0x0000005502bb7000)
	libSDL2-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libSDL2-2.0.so.0 (0x0000005502d06000)
	libSDL2_image-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libSDL2_image-2.0.so.0 (0x0000005502e98000)
	libSDL2_mixer-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libSDL2_mixer-2.0.so.0 (0x0000005502ec7000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000005502efb000)
	libGL.so.1 => /usr/lib/aarch64-linux-gnu/libGL.so.1 (0x0000005502f25000)
	librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x000000550301c000)
	libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000005503036000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x000000550320e000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x00000055032b9000)
	libxcb.so.1 => /usr/lib/aarch64-linux-gnu/libxcb.so.1 (0x000000550342e000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000005503466000)
	/lib/ld-linux-aarch64.so.1 (0x0000005500000000)
	libasound.so.2 => /usr/lib/aarch64-linux-gnu/libasound.so.2 (0x000000550347a000)
	libpulse.so.0 => /usr/lib/aarch64-linux-gnu/libpulse.so.0 (0x0000005503589000)
	libXext.so.6 => /usr/lib/aarch64-linux-gnu/libXext.so.6 (0x00000055035e6000)
	libXcursor.so.1 => /usr/lib/aarch64-linux-gnu/libXcursor.so.1 (0x000000550360a000)
	libXinerama.so.1 => /usr/lib/aarch64-linux-gnu/libXinerama.so.1 (0x0000005503625000)
	libXi.so.6 => /usr/lib/aarch64-linux-gnu/libXi.so.6 (0x0000005503638000)
	libXrandr.so.2 => /usr/lib/aarch64-linux-gnu/libXrandr.so.2 (0x0000005503658000)
	libXss.so.1 => /usr/lib/aarch64-linux-gnu/libXss.so.1 (0x0000005503674000)
	libXxf86vm.so.1 => /usr/lib/aarch64-linux-gnu/libXxf86vm.so.1 (0x0000005503688000)
	libdrm.so.2 => /usr/lib/aarch64-linux-gnu/libdrm.so.2 (0x000000550369d000)
	libgbm.so.1 => /usr/lib/aarch64-linux-gnu/libgbm.so.1 (0x00000055036c0000)
	libwayland-egl.so.1 => /usr/lib/aarch64-linux-gnu/libwayland-egl.so.1 (0x00000055036de000)
	libwayland-client.so.0 => /usr/lib/aarch64-linux-gnu/libwayland-client.so.0 (0x00000055036f0000)
	libwayland-cursor.so.0 => /usr/lib/aarch64-linux-gnu/libwayland-cursor.so.0 (0x0000005503711000)
	libxkbcommon.so.0 => /usr/lib/aarch64-linux-gnu/libxkbcommon.so.0 (0x0000005503729000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x000000550377a000)
	libpng16.so.16 => /usr/lib/aarch64-linux-gnu/libpng16.so.16 (0x00000055037ab000)
	libjpeg.so.62 => /usr/lib/aarch64-linux-gnu/libjpeg.so.62 (0x00000055037f2000)
	libtiff.so.5 => /usr/lib/aarch64-linux-gnu/libtiff.so.5 (0x0000005503844000)
	libwebp.so.6 => /usr/lib/aarch64-linux-gnu/libwebp.so.6 (0x00000055038d3000)
	libmodplug.so.1 => /usr/lib/aarch64-linux-gnu/libmodplug.so.1 (0x0000005503935000)
	libfluidsynth.so.2 => /usr/lib/aarch64-linux-gnu/libfluidsynth.so.2 (0x0000005503acf000)
	libvorbisfile.so.3 => /usr/lib/aarch64-linux-gnu/libvorbisfile.so.3 (0x0000005503baf000)
	libFLAC.so.8 => /usr/lib/aarch64-linux-gnu/libFLAC.so.8 (0x0000005503bc8000)
	libmpg123.so.0 => /usr/lib/aarch64-linux-gnu/libmpg123.so.0 (0x0000005503c0e000)
	libopusfile.so.0 => /usr/lib/libopusfile.so.0 (0x0000005503c6f000)
	libGLdispatch.so.0 => /usr/lib/aarch64-linux-gnu/libGLdispatch.so.0 (0x0000005503c8b000)
	libGLX.so.0 => /usr/lib/aarch64-linux-gnu/libGLX.so.0 (0x0000005503e16000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000005503e59000)
	libXau.so.6 => /usr/lib/aarch64-linux-gnu/libXau.so.6 (0x0000005503e7f000)
	libXdmcp.so.6 => /usr/lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000005503e93000)
	libpulsecommon-14.2.so => /usr/lib/aarch64-linux-gnu/pulseaudio/libpulsecommon-14.2.so (0x0000005503ea9000)
	libdbus-1.so.3 => /lib/aarch64-linux-gnu/libdbus-1.so.3 (0x0000005503f34000)
	libXrender.so.1 => /usr/lib/aarch64-linux-gnu/libXrender.so.1 (0x0000005503f9a000)
	libXfixes.so.3 => /usr/lib/aarch64-linux-gnu/libXfixes.so.3 (0x0000005503fb5000)
	libwayland-server.so.0 => /usr/lib/aarch64-linux-gnu/libwayland-server.so.0 (0x0000005503fcb000)
	libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000005503fef000)
	libffi.so.7 => /usr/lib/aarch64-linux-gnu/libffi.so.7 (0x0000005504027000)
	libzstd.so.1 => /usr/lib/aarch64-linux-gnu/libzstd.so.1 (0x0000005504040000)
	liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x000000550410e000)
	libjbig.so.0 => /usr/lib/aarch64-linux-gnu/libjbig.so.0 (0x0000005504144000)
	libdeflate.so.0 => /usr/lib/aarch64-linux-gnu/libdeflate.so.0 (0x0000005504161000)
	libglib-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000005504185000)
	libgmodule-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgmodule-2.0.so.0 (0x00000055042c8000)
	libjack.so.0 => /usr/lib/aarch64-linux-gnu/libjack.so.0 (0x00000055042de000)
	libpulse-simple.so.0 => /usr/lib/aarch64-linux-gnu/libpulse-simple.so.0 (0x0000005504342000)
	libsndfile.so.1 => /usr/lib/aarch64-linux-gnu/libsndfile.so.1 (0x0000005504357000)
	libreadline.so.8 => /lib/aarch64-linux-gnu/libreadline.so.8 (0x00000055043e8000)
	libinstpatch-1.0.so.2 => /usr/lib/aarch64-linux-gnu/libinstpatch-1.0.so.2 (0x0000005504451000)
	libgobject-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0 (0x000000550452a000)
	libvorbis.so.0 => /usr/lib/aarch64-linux-gnu/libvorbis.so.0 (0x0000005504599000)
	libogg.so.0 => /usr/lib/aarch64-linux-gnu/libogg.so.0 (0x00000055045d2000)
	libopus.so.0 => /usr/lib/aarch64-linux-gnu/libopus.so.0 (0x00000055045ec000)
	libbsd.so.0 => /usr/lib/aarch64-linux-gnu/libbsd.so.0 (0x000000550464a000)
	libsystemd.so.0 => /usr/lib/aarch64-linux-gnu/libsystemd.so.0 (0x000000550466f000)
	libwrap.so.0 => /usr/lib/aarch64-linux-gnu/libwrap.so.0 (0x0000005504737000)
	libasyncns.so.0 => /usr/lib/aarch64-linux-gnu/libasyncns.so.0 (0x0000005504751000)
	libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000005504767000)
	libvorbisenc.so.2 => /usr/lib/aarch64-linux-gnu/libvorbisenc.so.2 (0x00000055047d9000)
	libtinfo.so.6 => /lib/aarch64-linux-gnu/libtinfo.so.6 (0x000000550488b000)
	libmd.so.0 => /usr/lib/aarch64-linux-gnu/libmd.so.0 (0x00000055048c9000)
	liblz4.so.1 => /usr/lib/aarch64-linux-gnu/liblz4.so.1 (0x00000055048e5000)
	libgcrypt.so.20 => /usr/lib/aarch64-linux-gnu/libgcrypt.so.20 (0x0000005504914000)
	libnsl.so.2 => /usr/lib/aarch64-linux-gnu/libnsl.so.2 (0x00000055049e4000)
	libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000005504a0e000)
	libgpg-error.so.0 => /lib/aarch64-linux-gnu/libgpg-error.so.0 (0x0000005504a35000)
	libtirpc.so.3 => /lib/aarch64-linux-gnu/libtirpc.so.3 (0x0000005504a68000)
	libgssapi_krb5.so.2 => /usr/lib/aarch64-linux-gnu/libgssapi_krb5.so.2 (0x0000005504aa7000)
	libkrb5.so.3 => /usr/lib/aarch64-linux-gnu/libkrb5.so.3 (0x0000005504b05000)
	libk5crypto.so.3 => /usr/lib/aarch64-linux-gnu/libk5crypto.so.3 (0x0000005504bf0000)
	libcom_err.so.2 => /lib/aarch64-linux-gnu/libcom_err.so.2 (0x0000005504c2e000)
	libkrb5support.so.0 => /usr/lib/aarch64-linux-gnu/libkrb5support.so.0 (0x0000005504c42000)
	libkeyutils.so.1 => /lib/aarch64-linux-gnu/libkeyutils.so.1 (0x0000005504c5f000)

My apologies, the above two commands were run inside of the debian chroot I used to build for aarch64, you can disregard that.

This time I tried running both the client and server from within EmuELEC 4.5 via a terminal, server seems to work, client was missing only 1 (!) library.

Here are the commands from within EmuELEC this time:

linux_aarch64_client: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=c12084bca365641af6cc13942c077fef74f4229e, for GNU/Linux 3.7.0, stripped
	linux-vdso.so.1 (0x0000007f9820f000)
	libX11.so.6 => not found
	libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x0000007f97d0c000)
	libSDL2_image-2.0.so.0 => /usr/lib/libSDL2_image-2.0.so.0 (0x0000007f97c93000)
	libSDL2_mixer-2.0.so.0 => /usr/lib/libSDL2_mixer-2.0.so.0 (0x0000007f97add000)
	libz.so.1 => /usr/lib/libz.so.1 (0x0000007f97aac000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0x0000007f97905000)
	librt.so.1 => /usr/lib/librt.so.1 (0x0000007f978ee000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000007f97716000)
	libm.so.6 => /usr/lib/libm.so.6 (0x0000007f9766d000)
	libc.so.6 => /usr/lib/libc.so.6 (0x0000007f97510000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x0000007f974fc000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x0000007f974cf000)
	/lib/ld-linux-aarch64.so.1 => /usr/lib/ld-linux-aarch64.so.1 (0x0000007f981e1000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x0000007f974ab000)

It appears that the only missing library is libX11.

Now for the server:

linux_aarch64_server: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=bdc9c7672b7cb49a438c267d0d214a72fe921a28, for GNU/Linux 3.7.0, stripped
	linux-vdso.so.1 (0x0000007f8c807000)
	libz.so.1 => /usr/lib/libz.so.1 (0x0000007f8c71a000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000007f8c542000)
	libm.so.6 => /usr/lib/libm.so.6 (0x0000007f8c499000)
	libc.so.6 => /usr/lib/libc.so.6 (0x0000007f8c33c000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x0000007f8c318000)
	/lib/ld-linux-aarch64.so.1 => /usr/lib/ld-linux-aarch64.so.1 (0x0000007f8c7d9000)

Any tips from here to get the client to run? Can I just copy the libX11 library into the user libs directory? Or maybe the newest EmuELEC release has the library?

Also one crucial detail I forgot here, this game wants working mouse functionality for navigation, not sure if mouse is functional on EmuELEC? The wireless keyboard I use with my box comes with a touchpad which doesn’t seem to do anything.

One more detail, this game does seem to depend on X11 in some way as seen by the above missing library, but EmuELEC does not appear to run X11, how is that? I assumed SuperTuxKart also needed X11 at least when I ran it on my PC.

EmuELEC does not use X11, it uses SDL2/FBDEV

You could try following these steps to download a working toolchain that you could use to compile the program: DEV: How to compile toolchain only · EmuELEC/EmuELEC Wiki (github.com)

If the program requires X11 it won’t work.

If you have a link to the source I can give it a go.

I built the toolchain as per those instructions inside of a debian bullseye container made with debootstrap. I also had to install the gawk zstd packages for the toolchain to build and I used “Amlogic-ce” instead of “Amlogic-ng” for the project name since the latter was invalid.

The game shouldn’t require X11 since it can run inside a tty framebuffer, and the build instructions don’t have X11 as a dependency.

Now that I familiarized myself a bit with EmuELEC packaging, I wrote a package.mk script for building the game from source.

packages/sx05re/emuelec-ports/sauerbraten/package.mk
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="sauerbraten"
PKG_VERSION="2020_12_29"
PKG_SHA256="cdba7c4a47cefd30d0afdd6a912199a1384319cf1619923cb7189e72e468be70"
PKG_ARCH="aarch64"
PKG_LICENSE="ZLIB"
PKG_SITE="http://sauerbraten.org"
PKG_URL="https://downloads.sourceforge.net/$PKG_NAME/${PKG_NAME}_${PKG_VERSION}_linux.tar.bz2"
PKG_MAINTAINER="s10mini"
PKG_DEPENDS_TARGET="toolchain SDL2 SDL2_image SDL2_mixer libpng libjpeg-turbo zlib" # libGL (OpenGL) is also needed
PKG_SHORTDESC="3D first-person shooter game - EmuELEC port"
PKG_LONGDESC="Sauerbraten is a networked 3D first-person shooter game. It supports modern graphic effects and conveys a sense of fast-paced oldschool gameplay."
PKG_TOOLCHAIN="make"

# A simple make install builds the game client and server

make_target() {
	cd src
	make install
}

makeinstall_target() {
	# Copy game client and server
	cp ../bin_unix/native_client $INSTALL/usr/bin/sauerbraten-client
	cp ../bin_unix/native_server $INSTALL/usr/bin/sauerbraten-server
	# data, packages folders go in here
	#mkdir -p $INSTALL/usr/share/games/sauerbraten
	#cp -r ../data $INSTALL/usr/share/games/sauerbraten
	#cp -r ../packages $INSTALL/usr/share/games/sauerbraten
	# docs folder goes in here
	#mkdir -p $INSTALL/usr/share/doc/sauerbraten
	#cp -r ../docs $INSTALL/usr/share/games/sauerbraten
}

The make install function needs some work. As for compiling the game itself I get this “CROSS COMPILE Badness” error and don’t know how to proceed:

e[1;33mBUILDe[0m      sauerbraten e[1;37m(target)e[0m
    e[1;35mTOOLCHAINe[0m      make
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ -O3 -fomit-frame-pointer -ffast-math -Wall -fsigned-char -fno-exceptions -fno-rtti -Ishared -Iengine -Ifpsgame -Ienet/include -I/usr/X11R6/include `sdl2-config --cflags` -x c++-header -o shared/cube.h.gch.tmp shared/cube.h
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ -O3 -fomit-frame-pointer -ffast-math -Wall -fsigned-char -fno-exceptions -fno-rtti -DSTANDALONE -Ishared -Iengine -Ifpsgame -Ienet/include -c -o engine/worldio-standalone.o engine/worldio.cpp
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ -O3 -fomit-frame-pointer -ffast-math -Wall -fsigned-char -fno-exceptions -fno-rtti -DSTANDALONE -Ishared -Iengine -Ifpsgame -Ienet/include -c -o fpsgame/entities-standalone.o fpsgame/entities.cpp
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ -O3 -fomit-frame-pointer -ffast-math -Wall -fsigned-char -fno-exceptions -fno-rtti -DSTANDALONE -Ishared -Iengine -Ifpsgame -Ienet/include -c -o fpsgame/server-standalone.o fpsgame/server.cpp
CROSS COMPILE Badness: /usr/include in INCLUDEPATH: /usr/include/SDL2
cc1plus: internal compiler error: in add_path, at incpath.cc:481
0x194fb68 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
	???:0
0x19508af internal_error(char const*, ...)
	???:0
0x6ea289 fancy_abort(char const*, int, char const*)
	???:0
0x8de827 add_path(char*, incpath_kind, int, bool)
	???:0
0x92667c c_common_handle_option(unsigned long, char const*, long, int, unsigned int, cl_option_handlers const*)
	???:0
0x19418b3 handle_option(gcc_options*, gcc_options*, cl_decoded_option const*, unsigned int, int, unsigned int, cl_option_handlers const*, bool, diagnostic_context*)
	???:0
0x19419fa read_cmdline_option(gcc_options*, gcc_options*, cl_decoded_option*, unsigned int, unsigned int, cl_option_handlers const*, diagnostic_context*)
	???:0
0xcfd732 decode_options(gcc_options*, gcc_options*, cl_decoded_option*, unsigned int, unsigned int, diagnostic_context*, void (*)())
	???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [Makefile:176: shared/cube.h.gch] Error 1
make: *** Waiting for unfinished jobs....
e[1;31mFAILURE: ./scripts/build sauerbraten during make_target (package.mk)e[0m
*********** FAILED COMMAND ***********
make install
**************************************

This usually means that the makefile is using absolute paths, so its trying to use your local libraries and applications, a makefile needs to be patched to use the toolchain path.

There were 3 Makefiles in the source, 2 of them use the sdl2-config executable from my debian container host rather than the one in the toolchain path, this causes it to use the host libraries.

It seems there is no /home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/sdl2-config available so it uses the one in /usr/bin/sdl2-config

I tried patching the Makefiles to call it by using ${SYSROOT_PREFIX}/usr/bin/sdl2-config instead and I verified that the Makefiles were indeed patched but I kept getting the same error (maybe I didn’t pass the SYSROOT_PREFIX correctly).

What I did instead that seemed to work is I removed the patches and added export PATH="${SYSROOT_PREFIX}/usr/bin:$PATH" before the make install, but then I get this error:

I patched the makefiles to use ${SYSROOT_PREFIX}/usr/bin/sdl2-config for flags and it worked.

Also the Makefiles did want the X11 library, since I know the game can run inside a framebuffer I patched the makefiles to remove X11.

e[1;33mBUILDe[0m      sauerbraten e[1;37m(target)e[0m
    e[1;35mTOOLCHAINe[0m      make
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ -O3 -fomit-frame-pointer -ffast-math -Wall -fsigned-char -fno-exceptions -fno-rtti -o sauer_client shared/crypto.o shared/geom.o shared/glemu.o shared/stream.o shared/tools.o shared/zip.o engine/3dgui.o engine/bih.o engine/blend.o engine/blob.o engine/client.o engine/command.o engine/console.o engine/cubeloader.o engine/decal.o engine/dynlight.o engine/glare.o engine/grass.o engine/lightmap.o engine/main.o engine/material.o engine/menus.o engine/movie.o engine/normal.o engine/octa.o engine/octaedit.o engine/octarender.o engine/physics.o engine/pvs.o engine/rendergl.o engine/rendermodel.o engine/renderparticles.o engine/rendersky.o engine/rendertext.o engine/renderva.o engine/server.o engine/serverbrowser.o engine/shader.o engine/shadowmap.o engine/sound.o engine/texture.o engine/water.o engine/world.o engine/worldio.o fpsgame/ai.o fpsgame/client.o fpsgame/entities.o fpsgame/fps.o fpsgame/monster.o fpsgame/movable.o fpsgame/render.o fpsgame/scoreboard.o fpsgame/server.o fpsgame/waypoint.o fpsgame/weapon.o -Lenet -lenet -L/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/lib -lSDL2 -lSDL2_image -lSDL2_mixer -lz -lGL -lrt
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ -O3 -fomit-frame-pointer -ffast-math -Wall -fsigned-char -fno-exceptions -fno-rtti -o sauer_server shared/crypto-standalone.o shared/stream-standalone.o shared/tools-standalone.o engine/command-standalone.o engine/server-standalone.o engine/worldio-standalone.o fpsgame/entities-standalone.o fpsgame/server-standalone.o -Lenet -lenet -lz
/home/emuelec/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/toolchain/lib/gcc/aarch64-libreelec-linux-gnueabi/12.2.0/../../../../aarch64-libreelec-linux-gnueabi/bin/ld: cannot find -lGL: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:206: client] Error 1
make: *** Waiting for unfinished jobs....
e[1;31mFAILURE: scripts/build sauerbraten during make_target (package.mk)e[0m
*********** FAILED COMMAND ***********
make
**************************************

It seems like the OpenGL library was not found? I didn’t add it to the dependencies in the packages.mk file since I didn’t find a package that provides it, not sure where/which it is, gl4es didn’t seem to work.