gamemode
gamemode copied to clipboard
building 32 bit fails and questions about 64bit to 32bit compabilty
Describe the bug I was trying to biuld 32bit version so lutris would allow me to use gamemode
To Reproduce Steps used to reproduce the behavior:
utku3@pop-os:~$ sudo apt install meson libsystemd-dev pkg-config ninja-build git libdbus-1-dev libsystemd-dev:i386
[sudo] password for utku3:
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.20.1-2ubuntu1).
pkg-config is already the newest version (0.29.1-0ubuntu2).
meson is already the newest version (0.49.0-2ubuntu1).
ninja-build is already the newest version (1.8.2-1).
libdbus-1-dev is already the newest version (1.12.12-1ubuntu1.1).
libdbus-1-dev set to manually installed.
The following NEW packages will be installed:
libsystemd-dev libsystemd-dev:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 673 kB of archives.
After this operation, 1,790 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/system76/pop/ubuntu disco/main amd64 libsystemd-dev amd64 240-6ubuntu5.2pop1 [336 kB]
Get:2 http://ppa.launchpad.net/system76/pop/ubuntu disco/main i386 libsystemd-dev i386 240-6ubuntu5.2pop1 [336 kB]
Fetched 673 kB in 1s (563 kB/s)
Selecting previously unselected package libsystemd-dev:amd64.
(Reading database ... 284848 files and directories currently installed.)
Preparing to unpack .../libsystemd-dev_240-6ubuntu5.2pop1_amd64.deb ...
Unpacking libsystemd-dev:amd64 (240-6ubuntu5.2pop1) ...
Selecting previously unselected package libsystemd-dev:i386.
Preparing to unpack .../libsystemd-dev_240-6ubuntu5.2pop1_i386.deb ...
Unpacking libsystemd-dev:i386 (240-6ubuntu5.2pop1) ...
Setting up libsystemd-dev:amd64 (240-6ubuntu5.2pop1) ...
Setting up libsystemd-dev:i386 (240-6ubuntu5.2pop1) ...
Processing triggers for man-db (2.8.5-2) ...
utku3@pop-os:~$ sudo apt install dbus-user-session
Reading package lists... Done
Building dependency tree
Reading state information... Done
dbus-user-session is already the newest version (1.12.12-1ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
utku3@pop-os:~$ cd Programlar;git clone https://github.com/FeralInteractive/gamemode.git;cd gamemode
Cloning into 'gamemode'...
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 2383 (delta 8), reused 14 (delta 5), pack-reused 2352
Receiving objects: 100% (2383/2383), 575.90 KiB | 1.28 MiB/s, done.
Resolving deltas: 100% (1713/1713), done.
utku3@pop-os:~/Programlar/gamemode$ sudo apt install gcc-multilib
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-multilib is already the newest version (4:8.3.0-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
utku3@pop-os:~/Programlar/gamemode$ git checkout 1.4
Note: checking out '1.4'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 7ced21f Update version to 1.4
utku3@pop-os:~/Programlar/gamemode$ export CFLAGS=-m32
utku3@pop-os:~/Programlar/gamemode$ export CXXFLAGS=-m32
utku3@pop-os:~/Programlar/gamemode$ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
utku3@pop-os:~/Programlar/gamemode$ meson build32 -Dwith-daemon=false -Dwith-examples=false -Dwith-systemd=false --prefix=/usr --libdir i386-linux-gnu
The Meson build system
Version: 0.49.0
Source dir: /home/utku/Programlar/gamemode
Build dir: /home/utku/Programlar/gamemode/build32
Build type: native build
Project name: gamemode
Project version: 1.4
Appending CFLAGS from environment: '-m32'
Native C compiler: cc (gcc 8.3.0 "cc (Ubuntu 8.3.0-6ubuntu1) 8.3.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Compiler for C supports arguments -Waggregate-return: YES
Compiler for C supports arguments -Wunused: YES
Compiler for C supports arguments -Warray-bounds: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wclobbered: YES
Compiler for C supports arguments -Wempty-body: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-signedness: YES
Compiler for C supports arguments -Wignored-qualifiers: YES
Compiler for C supports arguments -Wimplicit-function-declaration: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmissing-format-attribute: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wmissing-parameter-type: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wno-discarded-qualifiers -Wdiscarded-qualifiers: YES
Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
Compiler for C supports arguments -Wno-suggest-attribute=format -Wsuggest-attribute=format: YES
Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Woverride-init: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wreturn-type: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-aliasing=3: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wstringop-overflow: YES
Compiler for C supports arguments -Wstringop-truncation: YES
Compiler for C supports arguments -Wtype-limits: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wuninitialized: YES
Compiler for C supports arguments -Wunused-but-set-variable: YES
Compiler for C supports arguments -Wwrite-strings: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Dependency libsystemd found: YES 240
Dependency dbus-1 found: YES 1.12.12
Dependency threads found: YES
Library dl found: YES
Configuring build-config.h using configuration
Message:
Build configuration:
====================
prefix: /usr
bindir: /usr/bin
datadir: /usr/share
libdir: /usr/i386-linux-gnu
libexecdir: /usr/libexec
includedir: /usr/include
D-BUS service directory: /usr/share/dbus-1/services
PolKit Action Directory: /usr/share/polkit-1/actions
Options:
========
daemon: false
examples: false
util: true
systemd: false
Build targets in project: 5
Found ninja-1.8.2 at /usr/bin/ninja
utku3@pop-os:~/Programlar/gamemode$ cd build32
utku3@pop-os:~/Programlar/gamemode/build32$ ninja
[7/14] Linking target lib/libgamemode.so.0.0.0.
FAILED: lib/libgamemode.so.0.0.0
cc -o lib/libgamemode.so.0.0.0 'lib/76b5a35@@gamemode@sha/client_impl.c.o' -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,libgamemode.so.0 -m32 /usr/lib/x86_64-linux-gnu/libdbus-1.so -Wl,--end-group -Wl,-rpath,/usr/lib/x86_64-linux-gnu -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libdbus-1.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[11/14] Compiling C object 'common/92a...aemon-common@sta/common-external.c.o'.
ninja: build stopped: subcommand failed.
Expected behavior successful build
System Info (please complete the following information):
- OS and version: Pop!_OS 19.04
- GameMode Version: git, 1.4 master
Additional context I have tried this to compile 32bit version.
This issue also seems to be happening at AUR
I couldn't found any information on if gamemode 64 bit version compatible with 32 bit applications and just running them with gamemoderun
would work
if this commit lets 64 bit gamemode run with 32bit apps then i will open bug report at lutris.
For now i will just add gamemoderun
to command prefix.
Do you have the 32-bit dbus development package installed (libdbus-1-dev.i686
)? It builds correctly for me with that.
And yes, with commit 51606c1b1b4def30e49a28365d5961bad61103ce, gamemoderun
should work for 32-bit apps so long as you have the 32-bit GameMode libraries installed. Lutris can either use gamemoderun
, or set LD_LIBRARY_PATH
in the same way that gamemoderun
does.
Thanks! , installing libdbus-1-dev:i386
fixed the build issue and install was successful, however since upgrading to ubuntu eoan gamemode started to not work and after further digging i found that libgamemode0
installs the cpugovctl
and gpuclockctl
to wrong places.
After building 32-bit and installing it
gamemoderun
started to work properly again and it can set cpu governor now, however lutris feral gamemode is still greyed out.
Also here is the output of the build:
utku3@pop-os:~/Programlar$ rm -rf gamemode
utku3@pop-os:~/Programlar$ git clone https://github.com/FeralInteractive/gamemode.git
Cloning into 'gamemode'...
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 2383 (delta 8), reused 14 (delta 5), pack-reused 2352
Receiving objects: 100% (2383/2383), 575.90 KiB | 1.30 MiB/s, done.
Resolving deltas: 100% (1713/1713), done.
utku3@pop-os:~/Programlar$ cd gamemode
utku3@pop-os:~/Programlar/gamemode$ export CFLAGS=-m32
utku3@pop-os:~/Programlar/gamemode$ export CXXFLAGS=-m32
utku3@pop-os:~/Programlar/gamemode$ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
utku3@pop-os:~/Programlar/gamemode$ meson build32 -Dwith-daemon=false -Dwith-examples=false -Dwith-systemd=false --prefix=/usr --libdir i386-linux-gnu
The Meson build system
Version: 0.51.2
Source dir: /home/utku/Programlar/gamemode
Build dir: /home/utku/Programlar/gamemode/build32
Build type: native build
Project name: gamemode
Project version: 1.5-dev
Appending CFLAGS from environment: '-m32'
Appending CFLAGS from environment: '-m32'
C compiler for the host machine: cc (gcc 9.2.1 "cc (Ubuntu 9.2.1-8ubuntu1) 9.2.1 20190909")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Compiler for C supports arguments -Waggregate-return: YES
Compiler for C supports arguments -Wunused: YES
Compiler for C supports arguments -Warray-bounds: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wclobbered: YES
Compiler for C supports arguments -Wempty-body: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-signedness: YES
Compiler for C supports arguments -Wignored-qualifiers: YES
Compiler for C supports arguments -Wimplicit-function-declaration: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmissing-format-attribute: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wmissing-parameter-type: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wno-discarded-qualifiers -Wdiscarded-qualifiers: YES
Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
Compiler for C supports arguments -Wno-suggest-attribute=format -Wsuggest-attribute=format: YES
Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Woverride-init: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wreturn-type: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-aliasing=3: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wstringop-overflow: YES
Compiler for C supports arguments -Wstringop-truncation: YES
Compiler for C supports arguments -Wtype-limits: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wuninitialized: YES
Compiler for C supports arguments -Wunused-but-set-variable: YES
Compiler for C supports arguments -Wwrite-strings: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency libsystemd found: YES 242
Run-time dependency dbus-1 found: YES 1.12.14
Run-time dependency threads found: YES
Library dl found: YES
Configuring build-config.h using configuration
Message:
Build configuration:
====================
prefix: /usr
bindir: /usr/bin
datadir: /usr/share
libdir: /usr/i386-linux-gnu
libexecdir: /usr/libexec
includedir: /usr/include
D-BUS service directory: /usr/share/dbus-1/services
PolKit Action Directory: /usr/share/polkit-1/actions
Options:
========
daemon: false
examples: false
util: true
systemd: false
Build targets in project: 5
Found ninja-1.9.0 at /usr/bin/ninja
utku3@pop-os:~/Programlar/gamemode$ cd build32
utku3@pop-os:~/Programlar/gamemode/build32$ ninja
[14/14] Linking target util/gpuclockctl.
utku3@pop-os:~/Programlar/gamemode/build32$ sudo ninja install
[0/1] Installing files.
Installing lib/libgamemode.so.0.0.0 to /usr/i386-linux-gnu
Installing lib/libgamemodeauto.so.0.0.0 to /usr/i386-linux-gnu
Installing util/cpugovctl to /usr/libexec
Installing util/gpuclockctl to /usr/libexec
Installing /home/utku/Programlar/gamemode/lib/gamemode_client.h to /usr/include
Installing /home/utku/Programlar/gamemode/build32/meson-private/gamemode.pc to /usr/i386-linux-gnu/pkgconfig
Installing /home/utku/Programlar/gamemode/build32/meson-private/gamemode-auto.pc to /usr/i386-linux-gnu/pkgconfig