FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.8k stars 185 forks source link

Unable to build on clear linux #399

Closed nobbysheep closed 1 year ago

nobbysheep commented 1 year ago

Describe the bug As I can't find any other way to install I'm following the documented approach for building from source however when I run the build fails. Here's the output;

./bootstrap.sh warning: unable to rmdir 'subprojects/inih': Directory not empty Previous HEAD position was d58c59c Update version to 1.5 HEAD is now at 4dc99df Specify correct inih directory after update to r54

Executing subproject inih

inih| Project name: inih inih| Project version: undefined inih| C compiler for the host machine: gcc (gcc 12.2.1 "gcc (Clear Linux OS for Intel Architecture) 12.2.1 20221215 releases/gcc-12.2.0-290-g7525c9d7e7") inih| C linker for the host machine: gcc ld.bfd 2.39.0 inih| C++ compiler for the host machine: g++ (gcc 12.2.1 "g++ (Clear Linux OS for Intel Architecture) 12.2.1 20221215 releases/gcc-12.2.0-290-g7525c9d7e7") inih| C++ linker for the host machine: g++ ld.bfd 2.39.0 inih| Build targets in project: 9 inih| Subproject inih finished.

Dependency inih from subproject subprojects/inih-r54 found: YES undefined Configuring gamemoded.service using configuration Configuring com.feralinteractive.GameMode.service using configuration Configuring com.feralinteractive.GameMode.policy using configuration Configuring gamemoded.8 using configuration Configuring gamemoderun.1 using configuration Configuring gamemodelist.1 using configuration Configuring gamemode-simulate-game.1 using configuration Program appstreamcli found: YES (/usr/bin/appstreamcli) Message:

Build configuration:
====================

prefix:                                 /usr
bindir:                                 /usr/bin
datadir:                                /usr/share
libdir:                                 /usr/lib64
libexecdir:                             /usr/libexec
includedir:                             /usr/include
systemd user unit directory:            /etc/systemd/user
D-BUS service directory:                /usr/share/dbus-1/services
PolKit Action Directory:                /usr/share/polkit-1/actions

Options:
========

sd-bus provier:                         systemd
examples:                               true
util:                                   true

Build targets in project: 11

gamemode 1.7

Subprojects inih : YES

User defined options buildtype : debugoptimized prefix : /usr with-systemd-user-unit-dir: /etc/systemd/user

Found ninja-1.11.1 at /usr/bin/ninja WARNING: Running the setup command as meson [options] instead of meson setup [options] is ambiguous and deprecated.

Not too sure what's wrong / missing

Expected behavior Build should not fail

System Info (please complete the following information):

Additional context I believe i've installed all of the required packages but new to clear linux so may have missed something very obvious

nobbysheep commented 1 year ago

Seems to be typo in 1.7 so swapped to master and build worked. Managed to install but test run (using gamemoded -t) seems to fail;

gamemode request succeeded and is active Quitting by request... : Loading config Loading config file [/usr/share/gamemode/gamemode.ini] : Running tests

:: Basic client tests :: Passed

:: Dual client tests :: Passed

:: Gamemoderun and reaper thread tests : Loading config Loading config file [/usr/share/gamemode/gamemode.ini] : Running tests

:: Basic client tests :: Passed

:: Dual client tests :: Passed

:: Gamemoderun and reaper thread tests ...Waiting for child to quit... ...Waiting for reaper thread (reaper_frequency set to 5 seconds)... :: Supervisor tests :: Passed

: Client tests failed, skipping feature tests : Tests Failed!

nobbysheep commented 1 year ago

NOTE ; might be worth updating documentation referencing ver 1.7

sazaland commented 1 year ago

For me, using Meson 1.0.0 got past this when building the master. May work for you as well.

szymon-gniado commented 1 year ago

I have fixed the issue by changing line 29 in bootstrap.sh to:

meson setup builddir --prefix=$prefix --buildtype debugoptimized -Dwith-systemd-user-unit-dir=/etc/systemd/user "$@"

before running the script

nobbysheep commented 1 year ago

Thanks - I've actually switched from Clearlinux to EnveavourOS which is pretty much as performant but not saddled with having to jump through hoops to get software working. If I swap back I'll be sure to try this out. Thanks again