Created attachment 875406 [details] emerge --info The following behavior is observed: $ prismlauncher prismlauncher: error while loading shared libraries: libgamemode.so: cannot open shared object file: No such file or directory
I don't see this requirement. Even so it should be optional in prismlauncher as it should detect availability at runtime and then either allow or disallow enabling it for a Minecraft instance. $ prismlauncher --version QGuiApplication::setDesktopFileName: the specified desktop file name ends with .desktop. For compatibility reasons, the .desktop suffix will be removed. Please specify a desktop file name without .desktop suffix PrismLauncher 8.0 $ ldd /usr/bin/prismlauncher linux-vdso.so.1 (0x00007ffd5b1a6000) libz.so.1 => /lib64/libz.so.1 (0x00007f60a6f66000) libQt6Widgets.so.6 => /usr/lib64/libQt6Widgets.so.6 (0x00007f60a5a00000) libQt6Xml.so.6 => /usr/lib64/libQt6Xml.so.6 (0x00007f60a6394000) libquazip1-qt6.so.1.4.0 => /usr/lib64/libquazip1-qt6.so.1.4.0 (0x00007f60a6353000) libcmark.so.0.30.3 => /usr/lib64/libcmark.so.0.30.3 (0x00007f60a6306000) libQt6Network.so.6 => /usr/lib64/libQt6Network.so.6 (0x00007f60a5816000) libQt6Core5Compat.so.6 => /usr/lib64/libQt6Core5Compat.so.6 (0x00007f60a6296000) libQt6Gui.so.6 => /usr/lib64/libQt6Gui.so.6 (0x00007f60a4e00000) libQt6Core.so.6 => /usr/lib64/libQt6Core.so.6 (0x00007f60a4600000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libstdc++.so.6 (0x00007f60a4200000) libm.so.6 => /lib64/libm.so.6 (0x00007f60a4d20000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgcc_s.so.1 (0x00007f60a6264000) libc.so.6 => /lib64/libc.so.6 (0x00007f60a4017000) libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f60a57fb000) libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f60a3f2b000) libcrypto.so.3 => /usr/lib64/libcrypto.so.3 (0x00007f60a3800000) libicuuc.so.74 => /usr/lib64/libicuuc.so.74 (0x00007f60a3400000) libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f60a57e8000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f60a578a000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f60a3dc6000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f60a36a1000) libQt6DBus.so.6 => /usr/lib64/libQt6DBus.so.6 (0x00007f60a331d000) libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007f60a4cd3000) libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007f60a5757000) libOpenGL.so.0 => /usr/lib64/libOpenGL.so.0 (0x00007f60a4ca8000) libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f60a45b1000) libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f60a31ee000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f60a30f3000) libicui18n.so.74 => /usr/lib64/libicui18n.so.74 (0x00007f60a2c00000) libdouble-conversion.so.3 => /usr/lib64/libdouble-conversion.so.3 (0x00007f60a4599000) libb2.so.1 => /usr/lib64/libb2.so.1 (0x00007f60a6256000) libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007f60a3057000) /lib64/ld-linux-x86-64.so.2 (0x00007f60a6f88000) libicudata.so.74 => /usr/lib64/libicudata.so.74 (0x00007f60a0e00000) libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007f60a2f9f000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f60a456a000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f60a453c000) libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f60a0d54000) libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007f60a3d73000) libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f60a3d47000) libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgomp.so.1 (0x00007f60a3640000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f60a5751000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f60a4ca0000)
Build.log for your successful prismlauncher build could helpful for debugging why it links against gamemode for you.
Here is the final linking for my successful build that doesn't link against libgamemode in the final binary. It links aga [493/493] : && /usr/bin/x86_64-pc-linux-gnu-g++ -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -flto=auto -fno-fat-lto-objects -Wl,-O1 -Wl,--as-needed -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-typ e-mismatch -Werror=strict-aliasing -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wno-gnu-zero-variadic-macro-arguments -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast launcher/CMakeFiles/PrismLauncher.dir/PrismLauncher_autogen/mocs_compilation. cpp.o launcher/CMakeFiles/PrismLauncher.dir/main.cpp.o -o prismlauncher -Wl,-rpath,/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build: launcher/libLauncher_logic.a libraries/systeminfo/libsysteminfo.a l ibraries/murmur2/libLauncher_murmur2.a libraries/libnbtplusplus/libnbt++.a -lz libraries/qdcss/libqdcss.a buildconfig/libBuildConfig.a libraries/katabasis/libKatabasis.a /usr/lib64/libQt6Widgets.so.6.6.0 libgamemode.so -ldl /usr/lib64/libQt6Xml.so.6.6.0 /usr/lib64/libQt6Concurrent.so.6.6.0 /usr/lib64/libquazip1-qt6.so.1.4 /usr/lib64/libz.so -lbz2 /usr/lib64/libcmark.so.0.30.3 libraries/LocalPeer/libLocalPeer.a /usr/lib64/libQt6Network.so.6.6.0 /usr/lib64/libQt6Core5Compat.so.6.6.0 libraries/rainbow/libLauncher_rainbow.a /usr/lib64/libQt6Gui.so.6.6.0 /usr/lib64/libQt6Core.so.6.6.0 /usr/lib64/libGLX.so /usr/lib64/libOpenGL.so && : It links libgamemode.so which was created here [43/493] /usr/bin/x86_64-pc-linux-gnu-g++ -Dgamemode_EXPORTS -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/libraries/gamemode -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0/libraries/gamemode -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/libraries/gamemode/gamemode_autogen/include -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0/libraries/gamemode/include -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -std=gnu++17 -flto=auto -fno-fat-lto-objects -fPIC -MD -MT libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o -MF libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o.d -o libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o -c /var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/libraries/gamemode/gamemode_autogen/mocs_compilation.cpp [46/493] : && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch -Werror=strict-alia sing -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -flto=auto -fno-fat-lto-objects -Wl,-O1 -Wl,--as-needed -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin -Werror=odr -Werror=l to-type-mismatch -Werror=strict-aliasing -shared -Wl,-soname,libgamemode.so -o libgamemode.so libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o -ldl && : The library is created due to this https://github.com/PrismLauncher/PrismLauncher/blob/8.0/libraries/gamemode/CMakeLists.txt and is meant for dynamic loading of libgamemode https://github.com/PrismLauncher/PrismLauncher/blob/8.0/libraries/gamemode/include/gamemode_client.h#L87..L92 Ps. it would be good to include information on the active use flags, like "emerge --info <package>" would've achieved that. This would also include important information like the actually used CFLAGS and LDFLAGS.
** important to mention: i'm on wayland and this is prismlauncher[-qt6, +lto] $ ldd /usr/bin/prismlauncher linux-vdso.so.1 (0x00007ffd0b1f2000) libz.so.1 => /lib64/libz.so.1 (0x00007fdf0b2b6000) libQt5Widgets.so.5 => /usr/lib64/libQt5Widgets.so.5 (0x00007fdf0a000000) libgamemode.so => not found libQt5Xml.so.5 => /usr/lib64/libQt5Xml.so.5 (0x00007fdf0a7ba000) libQt5Concurrent.so.5 => /usr/lib64/libQt5Concurrent.so.5 (0x00007fdf0b2ad000) libquazip1-qt5.so.1.3.0 => /usr/lib64/libquazip1-qt5.so.1.3.0 (0x00007fdf0a782000) libcmark.so.0.30.3 => /usr/lib64/libcmark.so.0.30.3 (0x00007fdf0a734000) libQt5Network.so.5 => /usr/lib64/libQt5Network.so.5 (0x00007fdf09e56000) libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007fdf09800000) libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007fdf09200000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6 (0x00007fdf08e00000) libm.so.6 => /lib64/libm.so.6 (0x00007fdf09123000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgcc_s.so.1 (0x00007fdf0b284000) libc.so.6 => /lib64/libc.so.6 (0x00007fdf08c27000) libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fdf0977a000) libssl.so.3 => /usr/lib64/libssl.so.3 (0x00007fdf09073000) libcrypto.so.3 => /usr/lib64/libcrypto.so.3 (0x00007fdf08600000) libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fdf0a6e9000) libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007fdf08aa6000) libdouble-conversion.so.3 => /usr/lib64/libdouble-conversion.so.3 (0x00007fdf0a6d3000) libicui18n.so.73 => /usr/lib64/libicui18n.so.73 (0x00007fdf08200000) libicuuc.so.73 => /usr/lib64/libicuuc.so.73 (0x00007fdf07e00000) libicudata.so.73 => /usr/lib64/libicudata.so.73 (0x00007fdf05e00000) libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007fdf08566000) libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007fdf0a6ce000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fdf080a4000) /lib64/ld-linux-x86-64.so.2 (0x00007fdf0b2e9000) libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007fdf07d47000) libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007fdf09e22000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fdf05d0b000) libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007fdf09df5000) libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fdf07c9f000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fdf05bc6000) libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fdf08a8b000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fdf08079000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fdf0a6c7000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fdf0a6bf000)
hmm, removing gamemode results in only 308 files being built.... [308/308] : && /usr/bin/x86_64-pc-linux-gnu-g++ -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -march=native -O3 -pipe -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -DUNICODE -D_UNICODE -flto=auto -fno-fat-lto-objects -Wl,-O2 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wno-gnu-zero-variadic-macro-arguments -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast launcher/CMakeFiles/PrismLauncher.dir/PrismLauncher_autogen/mocs_compilation.cpp.o launcher/CMakeFiles/PrismLauncher.dir/main.cpp.o -o prismlauncher -Wl,-rpath,/var/tmp/portage/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build: launcher/libLauncher_logic.a libraries/systeminfo/libsysteminfo.a libraries/murmur2/libLauncher_murmur2.a libraries/libnbtplusplus/libnbt++.a -lz libraries/qdcss/libqdcss.a buildconfig/libBuildConfig.a libraries/katabasis/libKatabasis.a /usr/lib64/libQt5Widgets.so.5.15.11 libgamemode.so -ldl /usr/lib64/libQt5Xml.so.5.15.11 /usr/lib64/libQt5Concurrent.so.5.15.11 /usr/lib64/libquazip1-qt5.so.1.3 /usr/lib64/libz.so /usr/lib64/libcmark.so.0.30.3 libraries/LocalPeer/libLocalPeer.a /usr/lib64/libQt5Network.so.5.15.11 libraries/rainbow/libLauncher_rainbow.a /usr/lib64/libQt5Gui.so.5.15.11 /usr/lib64/libQt5Core.so.5.15.11 && :
I have ABI="64" set in make.conf on a multilib profile with the needed 32-bit packages set in package.conf so i suspect it has to do with that.
Here's my gamemode.so being created: [13/493] /usr/bin/x86_64-pc-linux-gnu-g++ -Dgamemode_EXPORTS -I/var/tmp/portage/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/libraries/gamemode -I/var/tmp/portage/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0/libraries/gamemode -I/var/tmp/portage/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/libraries/gamemode/gamemode_autogen/include -I/var/tmp/portage/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0/libraries/gamemode/include -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -march=native -O3 -pipe -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -DUNICODE -D_UNICODE -std=gnu++17 -flto=auto -fno-fat-lto-objects -fPIC -MD -MT libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o -MF libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o.d -o libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o -c /var/tmp/portage/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/libraries/gamemode/gamemode_autogen/mocs_compilation.cpp ** snip ** [44/493] : && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 -march=native -O3 -pipe -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -DUNICODE -D_UNICODE -flto=auto -fno-fat-lto-objects -Wl,-O2 -shared -Wl,-soname,libgamemode.so -o libgamemode.so libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation.cpp.o -ldl && :
(In reply to Alfred Wingate from comment #3) > Here is the final linking for my successful build that doesn't link against > libgamemode in the final binary. It links aga > > [493/493] : && /usr/bin/x86_64-pc-linux-gnu-g++ -Wall -pedantic > -fstack-protector-strong --param=ssp-buffer-size=4 -O3 -march=znver2 -pipe > -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch > -Werror=strict-aliasing > -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 > -DTOML_ENABLE_FLOAT16=0 -flto=auto -fno-fat-lto-objects -Wl,-O1 > -Wl,--as-needed -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin > -Werror=odr -Werror=lto-typ > e-mismatch -Werror=strict-aliasing -Wall -Wextra -Wshadow > -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused > -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion > -Wnull-dereference -Wdouble-promotion -Wformat=2 > -Wimplicit-fallthrough -Wno-gnu-zero-variadic-macro-arguments > -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches > -Wlogical-op -Wuseless-cast > launcher/CMakeFiles/PrismLauncher.dir/PrismLauncher_autogen/mocs_compilation. > cpp.o launcher/CMakeFiles/PrismLauncher.dir/main.cpp.o -o prismlauncher > -Wl,-rpath,/var/tmp/portage/games-action/prismlauncher-8.0/work/ > PrismLauncher-8.0_build: launcher/libLauncher_logic.a > libraries/systeminfo/libsysteminfo.a l > ibraries/murmur2/libLauncher_murmur2.a libraries/libnbtplusplus/libnbt++.a > -lz libraries/qdcss/libqdcss.a buildconfig/libBuildConfig.a > libraries/katabasis/libKatabasis.a /usr/lib64/libQt6Widgets.so.6.6.0 > libgamemode.so -ldl > /usr/lib64/libQt6Xml.so.6.6.0 /usr/lib64/libQt6Concurrent.so.6.6.0 > /usr/lib64/libquazip1-qt6.so.1.4 /usr/lib64/libz.so -lbz2 > /usr/lib64/libcmark.so.0.30.3 libraries/LocalPeer/libLocalPeer.a > /usr/lib64/libQt6Network.so.6.6.0 > /usr/lib64/libQt6Core5Compat.so.6.6.0 > libraries/rainbow/libLauncher_rainbow.a /usr/lib64/libQt6Gui.so.6.6.0 > /usr/lib64/libQt6Core.so.6.6.0 /usr/lib64/libGLX.so > /usr/lib64/libOpenGL.so && : > > It links libgamemode.so which was created here > > [43/493] /usr/bin/x86_64-pc-linux-gnu-g++ -Dgamemode_EXPORTS > -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8. > 0_build/libraries/gamemode > -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0/ > libraries/gamemode > -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8. > 0_build/libraries/gamemode/gamemode_autogen/include > -I/var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0/ > libraries/gamemode/include -Wall -pedantic -fstack-protector-strong > --param=ssp-buffer-size=4 -O3 -march=znver2 -pipe -flto=auto > -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch > -Werror=strict-aliasing -DQT_NO_DEPRECATED_WARNINGS=Y > -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DTOML_ENABLE_FLOAT16=0 -std=gnu++17 > -flto=auto -fno-fat-lto-objects -fPIC -MD -MT > libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation. > cpp.o -MF > libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation. > cpp.o.d -o > libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation. > cpp.o -c > /var/tmp/portage/games-action/prismlauncher-8.0/work/PrismLauncher-8.0_build/ > libraries/gamemode/gamemode_autogen/mocs_compilation.cpp > > [46/493] : && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -Wall -pedantic > -fstack-protector-strong --param=ssp-buffer-size=4 -O3 -march=znver2 -pipe > -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch > -Werror=strict-alia > sing -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 > -DTOML_ENABLE_FLOAT16=0 -flto=auto -fno-fat-lto-objects -Wl,-O1 > -Wl,--as-needed -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin > -Werror=odr -Werror=l > to-type-mismatch -Werror=strict-aliasing -shared -Wl,-soname,libgamemode.so > -o libgamemode.so > libraries/gamemode/CMakeFiles/gamemode.dir/gamemode_autogen/mocs_compilation. > cpp.o -ldl && : > > The library is created due to this > https://github.com/PrismLauncher/PrismLauncher/blob/8.0/libraries/gamemode/ > CMakeLists.txt and is meant for dynamic loading of libgamemode > https://github.com/PrismLauncher/PrismLauncher/blob/8.0/libraries/gamemode/ > include/gamemode_client.h#L87..L92 > > > Ps. it would be good to include information on the active use flags, like > "emerge --info <package>" would've achieved that. This would also include > important information like the actually used CFLAGS and LDFLAGS. games-action/prismlauncher-8.0::gentoo was built with the following: USE="lto -debug -qt6 -test" ABI_X86="(64)" FEATURES="fixlafiles parallel-fetch keepwork binpkg-docompress distlocks xattr parallel-install unknown-features-warn sandbox strict qa-unresolved-soname-deps userfetch network-sandbox merge-sync unmerge-orphans unmerge-logs binpkg-dostrip protect-owned news sfperms userpriv buildpkg-live binpkg-multi-instance config-protect-if-modified binpkg-logs usersync preserve-libs ipc-sandbox assume-digests multilib-strict ebuild-locks pid-sandbox usersandbox" CFLAGS are "-march=native -O3 -pipe" CXXFLAGS is the same
(In reply to connor-gh from comment #5) > hmm, removing gamemode results in only 308 files being built.... > > > [308/308] : && /usr/bin/x86_64-pc-linux-gnu-g++ -Wall -pedantic > -fstack-protector-strong --param=ssp-buffer-size=4 -march=native -O3 -pipe > -DQT_NO_DEPRECATED_WARNINGS=Y -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 > -DTOML_ENABLE_FLOAT16=0 -DUNICODE -D_UNICODE -flto=auto -fno-fat-lto-objects > -Wl,-O2 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast > -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion > -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 > -Wimplicit-fallthrough -Wno-gnu-zero-variadic-macro-arguments > -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches > -Wlogical-op -Wuseless-cast > launcher/CMakeFiles/PrismLauncher.dir/PrismLauncher_autogen/mocs_compilation. > cpp.o launcher/CMakeFiles/PrismLauncher.dir/main.cpp.o -o prismlauncher > -Wl,-rpath,/var/tmp/portage/portage/games-action/prismlauncher-8.0/work/ > PrismLauncher-8.0_build: launcher/libLauncher_logic.a > libraries/systeminfo/libsysteminfo.a > libraries/murmur2/libLauncher_murmur2.a libraries/libnbtplusplus/libnbt++.a > -lz libraries/qdcss/libqdcss.a buildconfig/libBuildConfig.a > libraries/katabasis/libKatabasis.a /usr/lib64/libQt5Widgets.so.5.15.11 > libgamemode.so -ldl /usr/lib64/libQt5Xml.so.5.15.11 > /usr/lib64/libQt5Concurrent.so.5.15.11 /usr/lib64/libquazip1-qt5.so.1.3 > /usr/lib64/libz.so /usr/lib64/libcmark.so.0.30.3 > libraries/LocalPeer/libLocalPeer.a /usr/lib64/libQt5Network.so.5.15.11 > libraries/rainbow/libLauncher_rainbow.a /usr/lib64/libQt5Gui.so.5.15.11 > /usr/lib64/libQt5Core.so.5.15.11 && : Ignore this, this was just ninja autorebuilds
Copying the one made from the build directory into any directory and putting it in LD_PRELOAD works, so it boils down to a linking/loading/installing issue.
Please post your build.log as I requested previously. Using wayland or not using wayland doesn't affect the linking of the package.
-Wl,--as-needed fixes it and doesn't link in gamemode, but *why was it included in the first place?*
LDFLAGS includes -Wl,--as-needed by default on Gentoo. That is of course unless you override LDFLAGS in make.conf etc.
Created attachment 875445 [details] build.log
(In reply to Alfred Wingate from comment #13) > LDFLAGS includes -Wl,--as-needed by default on Gentoo. That is of course > unless you override LDFLAGS in make.conf etc. My LDFLAGS in emerge --info lack them.... let me see what might have caused this as it is not set in my environment.
(In reply to connor-gh from comment #15) > (In reply to Alfred Wingate from comment #13) > > LDFLAGS includes -Wl,--as-needed by default on Gentoo. That is of course > > unless you override LDFLAGS in make.conf etc. > > My LDFLAGS in emerge --info lack them.... let me see what might have caused > this as it is not set in my environment. Oh my gosh. Right there in my make.conf: LDFLAGS="-Wl,-O2" sigh...