FeralInteractive / gamemode

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

bootstrap.sh fails on Linux Mint 18.3 and Ubuntu 16.04 #32

Open supertriodo opened 6 years ago

supertriodo commented 6 years ago

Hi, I have followed the steps to install and I get to this error:

triodo@led ~/gamemode-1.0 $ ./bootstrap.sh
+ meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user
The Meson build system
Version: 0.40.1
Source dir: /home/triodo/gamemode-1.0
Build dir: /home/triodo/gamemode-1.0/build
Build type: native build
Project name: gamemode
Native c compiler: cc (gcc 5.4.0)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency libsystemd found: YES 229
Dependency threads found: YES
Library dl found: YES
Configuring config.h using configuration
Clonar en «inih»...
remote: Counting objects: 341, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 341 (delta 0), reused 2 (delta 0), pack-reused 338
Receiving objects: 100% (341/341), 63.05 KiB | 0 bytes/s, done.
Resolving deltas: 100% (202/202), done.
Comprobando la conectividad… hecho.

Executing subproject inih.

Project name: inih
Native c compiler: cc (gcc 5.4.0)
Build targets in project: 3

Subproject inih finished.
Configuring gamemoded.service using configuration
Configuring com.feralinteractive.GameMode.policy using configuration
Message: 

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

    prefix:                                 /usr
    bindir:                                 /usr/bin
    datadir:                                /usr/share
    libdir:                                 /usr/lib/x86_64-linux-gnu
    libexecdir:                             /usr/libexec
    includedir:                             /usr/include
    systemd user unit directory:            /etc/systemd/user
    PolKit Action Directory:                /usr/share/polkit-1/actions

    Options:
    ========

    daemon:                                 true
    examples:                               true
    systemd:                                true

Build targets in project: 7
+ cd build
+ ninja
[1/20] Compiling c object 'daemon/gamemoded@exe/dbus_messaging.c.o'
FAILED: daemon/gamemoded@exe/dbus_messaging.c.o 
cc  '-Idaemon/gamemoded@exe' '-Idaemon' '-I../daemon' '-I.' '-I../' '-Isubprojects/inih' '-I../subprojects/inih' '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Wall' '-Winvalid-pch' '-std=c11' '-O0' '-g' '-fstack-protector' '-Wall' '-pedantic' '-Wstrict-prototypes' '-Wundef' '-fno-common' '-Werror-implicit-function-declaration' '-Wformat' '-Wformat-security' '-Werror=format-security' '-Wconversion' '-Wunused-variable' '-Wunreachable-code' '-W' '-pthread' '-MMD' '-MQ' 'daemon/gamemoded@exe/dbus_messaging.c.o' '-MF' 'daemon/gamemoded@exe/dbus_messaging.c.o.d' -o 'daemon/gamemoded@exe/dbus_messaging.c.o' -c ../daemon/dbus_messaging.c
In file included from /usr/include/systemd/sd-bus.h:28:0,
                 from ../daemon/dbus_messaging.c:40:
/usr/include/systemd/sd-event.h:72:67: error: unknown type name ‘siginfo_t’
 typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata);
                                                                   ^
[2/20] Compiling c object 'lib/gamemode@sha/client_impl.c.o'
FAILED: lib/gamemode@sha/client_impl.c.o 
cc  '-Ilib/gamemode@sha' '-Ilib' '-I../lib' '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Wall' '-Winvalid-pch' '-std=c11' '-O0' '-g' '-fstack-protector' '-Wall' '-pedantic' '-Wstrict-prototypes' '-Wundef' '-fno-common' '-Werror-implicit-function-declaration' '-Wformat' '-Wformat-security' '-Werror=format-security' '-Wconversion' '-Wunused-variable' '-Wunreachable-code' '-W' '-fPIC' '-MMD' '-MQ' 'lib/gamemode@sha/client_impl.c.o' '-MF' 'lib/gamemode@sha/client_impl.c.o.d' -o 'lib/gamemode@sha/client_impl.c.o' -c ../lib/client_impl.c
In file included from /usr/include/systemd/sd-bus.h:28:0,
                 from ../lib/client_impl.c:36:
/usr/include/systemd/sd-event.h:72:67: error: unknown type name ‘siginfo_t’
 typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata);
                                                                   ^
[13/20] Compiling c object 'daemon/gamemoded@exe/gamemode.c.o'
ninja: build stopped: subcommand failed.
RaitaroH commented 6 years ago

Please see in #3 my commend here. I have the same issue in KDE Neon, also based on Ubuntu 16.04.

surajmandalcell commented 6 years ago

same problem here

surajmandalcell commented 6 years ago

Its gotta do something with make file

mdiluz commented 6 years ago

Same with #34, this specific issue may be resolved in master.

You may still get the issues in #3 however

unmellow commented 6 years ago

one possible problem I noticed is that the command to run feral LD_PRELOAD=/usr/\$LIB/libgamemodeauto.so ./game calls into $lib which doesn't exist on Linux mint lib does maybe make it install there? it's probably not that simple but i tried to help

unmellow commented 6 years ago

also, I get this error

unmellow@melton-Inspiron-3551 ~ $ apt install meson libsystemd-dev pkg-config ninja-build Reading package lists... Done Building dependency tree
Reading state information... Done pkg-config is already the newest version (0.29.1-0ubuntu1). libsystemd-dev is already the newest version (229-4ubuntu21.2). meson is already the newest version (0.40.1-1~ubuntu16.04.1). ninja-build is already the newest version (1.7.1-1~ubuntu16.04.1). The following packages were automatically installed and are no longer required: android-libadb android-libbase android-libcutils android-liblog baloo-kf5 kinit kio libdbusmenu-qt5 libdolphinvcs5 libepub0 libfam0 libkf5archive5 libkf5attica5 libkf5auth-data libkf5auth5 libkf5baloo5 libkf5balooengine5 libkf5baloowidgets-bin libkf5baloowidgets5 libkf5bookmarks-data libkf5bookmarks5 libkf5codecs-data libkf5codecs5 libkf5completion-data libkf5completion5 libkf5config-data libkf5configcore5 libkf5configgui5 libkf5configwidgets-data libkf5configwidgets5 libkf5coreaddons-data libkf5coreaddons5 libkf5crash5 libkf5dbusaddons-data libkf5dbusaddons5 libkf5declarative-data libkf5declarative5 libkf5filemetadata-bin libkf5filemetadata-data libkf5filemetadata3 libkf5globalaccel-data libkf5globalaccel5 libkf5gpgmepp5 libkf5guiaddons5 libkf5i18n-data libkf5i18n5 libkf5iconthemes-data libkf5iconthemes5 libkf5idletime5 libkf5itemviews-data libkf5itemviews5 libkf5jobwidgets-data libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiocore5 libkf5kiofilewidgets5 libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5 libkf5notifications-data libkf5notifications5 libkf5package-data libkf5package5 libkf5parts-data libkf5parts5 libkf5quickaddons5 libkf5service-bin libkf5service-data libkf5service5 libkf5solid5 libkf5solid5-data libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data libkf5textwidgets5 libkf5wallet-bin libkf5wallet-data libkf5wallet5 libkf5widgetsaddons-data libkf5widgetsaddons5 libkf5windowsystem-data libkf5windowsystem5 libkf5xmlgui-data libkf5xmlgui5 libkwalletbackend5-5 libllvm5.0 libllvm5.0:i386 liblmdb0 libphonon4qt5-4 libpolkit-qt5-1-1 libpoppler-qt5-1 libqt5script5 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. unmellow@melton-Inspiron-3551 ~ $ wget https://github.com/FeralInteractive/gamemode/archive/1.0.tar.gz && tar -xvf 1.0.tar.gz --2018-04-18 20:01:01-- https://github.com/FeralInteractive/gamemode/archive/1.0.tar.gz Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113 Connecting to github.com (github.com)|192.30.253.112|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/FeralInteractive/gamemode/tar.gz/1.0 [following] --2018-04-18 20:01:01-- https://codeload.github.com/FeralInteractive/gamemode/tar.gz/1.0 Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121 Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 21279 (21K) [application/x-gzip] Saving to: ‘1.0.tar.gz.4’

1.0.tar.gz.4 100%[===================>] 20.78K --.-KB/s in 0.02s

2018-04-18 20:01:01 (1.09 MB/s) - ‘1.0.tar.gz.4’ saved [21279/21279]

gamemode-1.0/ gamemode-1.0/.clang-format gamemode-1.0/.gitignore gamemode-1.0/CHANGELOG gamemode-1.0/LICENSE.txt gamemode-1.0/README.md gamemode-1.0/bootstrap.sh gamemode-1.0/daemon/ gamemode-1.0/daemon/cpugovctl.c gamemode-1.0/daemon/daemon_config.c gamemode-1.0/daemon/daemon_config.h gamemode-1.0/daemon/daemonize.c gamemode-1.0/daemon/daemonize.h gamemode-1.0/daemon/dbus_messaging.c gamemode-1.0/daemon/dbus_messaging.h gamemode-1.0/daemon/gamemode.c gamemode-1.0/daemon/gamemode.h gamemode-1.0/daemon/governors-query.c gamemode-1.0/daemon/governors-query.h gamemode-1.0/daemon/governors.c gamemode-1.0/daemon/governors.h gamemode-1.0/daemon/logging.c gamemode-1.0/daemon/logging.h gamemode-1.0/daemon/main.c gamemode-1.0/daemon/meson.build gamemode-1.0/data/ gamemode-1.0/data/com.feralinteractive.GameMode.policy.in gamemode-1.0/data/com.feralinteractive.GameMode.service.in gamemode-1.0/data/gamemoded.1 gamemode-1.0/data/gamemoded.service.in gamemode-1.0/data/meson.build gamemode-1.0/example/ gamemode-1.0/example/archlinux/ gamemode-1.0/example/archlinux/gamemode-git/ gamemode-1.0/example/archlinux/gamemode-git/PKGBUILD gamemode-1.0/example/archlinux/readme.txt gamemode-1.0/example/gamemode.ini gamemode-1.0/example/main.c gamemode-1.0/example/meson.build gamemode-1.0/lib/ gamemode-1.0/lib/client_impl.c gamemode-1.0/lib/client_loader.c gamemode-1.0/lib/gamemode_client.h gamemode-1.0/lib/meson.build gamemode-1.0/meson.build gamemode-1.0/meson_options.txt gamemode-1.0/subprojects/ gamemode-1.0/subprojects/inih.wrap unmellow@melton-Inspiron-3551 ~ $ cd gamemode-1.0 unmellow@melton-Inspiron-3551 ~/gamemode-1.0 $ ./bootstrap.sh

Trying to run Meson on a build directory that has already been configured. If you want to build it, just run your build command (e.g. ninja) inside the build directory. Meson will autodetect any changes in your setup and regenerate itself as required.

If you want to change option values, use the mesonconf tool instead. unmellow@melton-Inspiron-3551 ~/gamemode-1.0 $

ps i ran the commands before so that's why it says they're already installed

mdiluz commented 6 years ago

one possible problem I noticed is that the command to run feral LD_PRELOAD=/usr/$LIB/libgamemodeauto.so ./game calls into $lib which doesn't exist on Linux mint lib does maybe make it install there? it's probably not that simple but i tried to help

The command should have \$LIB not just plain $LIB, the backslash lets it get passed to ld which will then look in the right directories.

The second error is strange, it implies the gamemode-1.0/ directory already existed with a build directory inside. I'd either cd gamemode-1.0/build && sudo ninja install or delete the whole directory and start again. Does that work?

omicron-b commented 6 years ago

Linux Mint 18.3 just updated meson and ninja-build packages (I suppose all Ubuntu 16.04 based distributions did too), I tried compiling, and just as @RaitaroH said, we now have issue #3

omicron-b commented 6 years ago

I tried steps from issues #3 #8 #34 (fresh clone with git, update submodules, install dbus-user-session and reboot) on Linux Mint 18.3 but I still get this:

./bootstrap.sh

Executing subproject inih.

Project name: inih Native c compiler: cc (gcc 5.4.0) Build targets in project: 3

Subproject inih finished.

Meson encountered an error in file daemon/meson.build, line 27, column 0: Include directory to be added is not an include directory object.

mdiluz commented 6 years ago

I bet I caused that with 2317bcde14c42ec92fb28 somehow, although it works for me.

I'll see if I can figure it out.

FWIW meson should handle the submodule itself, so there's no need to run the git submodule commands.

mdiluz commented 6 years ago

Could you try this patch?

--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -24,6 +24,9 @@ daemon_sources = [
     'daemon_config.c',
 ]

+gamemoded_includes = libgamemode_includes
+gamemoded_includes += config_h_dir
+
 executable(
     'gamemoded',
     sources: daemon_sources,
@@ -34,10 +37,7 @@ executable(
         inih_dependency,
         libdl,
     ],
-    include_directories: [
-        config_h_dir,
-        libgamemode_includes,
-    ],
+    include_directories: gamemoded_includes,
     install: true,
 )

I suspect meson 0.40.1 doesn't like me adding an array into another array there, whereas my meson 0.45.1 didn't care.

omicron-b commented 6 years ago

Yes, you are correct, git submodule was not relevant I checked that. And yes the patch fixed it, build is successful now and the service is running, thanks!

unmellow commented 6 years ago

mdiluz now i get this after running cd gamemode-1.0/build && sudo ninja install https://docs.google.com/document/d/1DLYuQ21qWPO1V2HwgyMOs5-QAgUFfyI_QpMQt2FyiLM/edit?usp=sharing

unmellow commented 6 years ago

redownloaded it and now I get this

https://docs.google.com/document/d/1_8tGDSxFt3TRIbwcGMHuKmhJUeWdIRunKWvPgs52bhM/edit?usp=sharing

just saving space

Delikt commented 6 years ago

same issue like the opener @ Mint 18.3 using AMDGPU Open Source driver