FeralInteractive / gamemode

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

No join_paths function on Xubuntu (Meson < 0.36.0) #22

Open PezaoPJ opened 6 years ago

PezaoPJ commented 6 years ago

gustavo@gustavo-Lenovo-G400s:~/gamemode$ ./bootstrap.sh

  • meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user Error during basic setup:

[Errno 2] No such file or directory: '/home/gustavo/gamemode/build'

So, I created the "build" folder and then

gustavo@gustavo-Lenovo-G400s:~/gamemode$ ./bootstrap.sh

  • meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user The Meson build system Version: 0.29.0 Source dir: /home/gustavo/gamemode Build dir: /home/gustavo/gamemode/build Build type: native build Build machine cpu family: x86_64 Build machine cpu: x86_64 Project name: gamemode Native c compiler: cc (gcc 5.4.0-6ubuntu1)

Meson encountered an error in file meson.build, line 32, column 0: Unknown function "join_paths".

Any tips?

mdiluz commented 6 years ago

http://mesonbuild.com/Reference-manual.html#join_paths

It was added in meson 0.36.0, and you're on 0.29.0. Are you able to upgrade meson? Otherwise, we may be able to implement an alternative for join_paths

wleoncio commented 6 years ago

This also affects Ubuntu 16.04 LTS. The next LTS release is just around the corner and it should update meson to a suitable version, but an alternative for join_paths could be interesting because many LTS users will not upgrade before 18.04.1 rolls out in July.

mdiluz commented 6 years ago

FWIW, meson is incredibly standalone so can be downloaded from https://github.com/mesonbuild/meson/releases and used from a local directory. I think that'd be the best way to work around this instead of trying to shoehorn in an early meson version.

mdeguzis commented 6 years ago

What I used for SteamOS:

python 3.6

wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
tar xvf Python-3.6.3.tgz
cd Python-3.6.3
./configure --enable-optimizations
make -j8
sudo make altinstall
python3.6 --version

ninja (you can also use the binary releases)

https://github.com/ninja-build/ninja
cd ninja
python 3.6 boostrap.py
python 3.6 configure.py

meson

git clone https://github.com/mesonbuild/meson
sudo python3.6 setup.py install --install-scripts=/usr/bin
meson --version
0.48.999

Finally, this project:

cd gamemode/
git checkout 1.2
export PATH=/home/desktop/gamemode/ninja:$PATH
./bootstrap.sh

Problem though was systemd was too old (possible to work around) - SteamOS is still on Jessie :(

 ../daemon/dbus_messaging.c
../daemon/dbus_messaging.c:42:28: fatal error: systemd/sd-bus.h: No such file or directory
 #include <systemd/sd-bus.h>

https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=contents&keywords=sd-bus.h

mdeguzis commented 6 years ago

For now, while not what this does, a simple, but hacky script that changes the cpu mode as described here and waits: https://github.com/mdeguzis/SteamOS-Tools/blob/master/utilities/set-cpu-perf.sh

Maybe other tweaks could help make the script an alternative for older systems.